PlayerHospital Class
Method Index
- _adviseBenches()
- _adviseDrinksMachines()
- _adviseHeatingForPatients()
- _adviseHeatingForStaff()
- _adviseMoney()
- _adviseStaffRoom()
- _adviseToilets()
- _fixBoiler() (inherited from Hospital)
- _getAverageHumanoidsAttribute(humanoids, attribute, default_value, min_count) (inherited from Hospital)
- _warnForLongQueues()
- addHandymanTask(object, taskType, priority, x, y, call) (inherited from Hospital)
- addInsuranceMoney(company, amount) (inherited from Hospital)
- addPatient(patient) (inherited from Hospital)
- addRathole(x, y, wall, parcel) (inherited from Hospital)
- addStaff(staff) (inherited from Hospital)
- addTileObject(object_category) (inherited from Hospital)
- addToEpidemic(patient) (inherited from Hospital)
- adviseBoilerBreakdown(broken_heat) (overrides Hospital:adviseBoilerBreakdown)
- adviseCannotAffordPlot() (overrides Hospital:adviseCannotAffordPlot)
- adviseDiscoverDisease(disease) (overrides Hospital:adviseDiscoverDisease)
- adviseNoGPOffice() (overrides Hospital:adviseNoGPOffice)
- advisePlants(placed) (overrides Hospital:advisePlants)
- advisePriceLevelImpact(judgment, name) (overrides Hospital:advisePriceLevelImpact)
- afterLoad(old, new) (overrides Hospital:afterLoad)
- announceRepair(room) (overrides Hospital:announceRepair)
- announceStaffLeave(staff) (overrides Hospital:announceStaffLeave)
- assignHandymanToTask(handyman, task_index, task_type) (inherited from Hospital)
- boilerBreakdown(broken_heat) (inherited from Hospital)
- buildReceptionDesksCache() (inherited from Hospital)
- canAcceptPatients() (inherited from Hospital)
- canConcentrateResearch(disease) (inherited from Hospital)
- cancelEpidemics(disease) (inherited from Hospital)
- changeReputation(reason, disease, valueChange) (inherited from Hospital)
- changeValue(changeValue) (inherited from Hospital)
- checkDiseaseRequirements(disease) (inherited from Hospital)
- checkEmergencyOver() (inherited from Hospital)
- checkReceptionAdvice(current_month, current_year)
- computePriceLevelImpact(patient, casebook) (inherited from Hospital)
- countEpidemics() (inherited from Hospital)
- countFireExtinguishers() (inherited from Hospital)
- countGeneralObjects() (inherited from Hospital)
- countNewPatient() (inherited from Hospital)
- countPatients(max_count) (inherited from Hospital)
- countPlants() (inherited from Hospital)
- countRadiators() (inherited from Hospital)
- countReceptionDesks() (inherited from Hospital)
- countRoomOfType(type, max_count) (inherited from Hospital)
- countSittingStanding() (inherited from Hospital)
- countStaffOfCategory(category, max_count) (inherited from Hospital)
- createEmergency(emergency) (inherited from Hospital)
- createVip() (overrides Hospital:createVip)
- dailyAdviceChecks()
- daysUntilNextDisaster() (inherited from Hospital)
- determineIfContagious(patient) (inherited from Hospital)
- findAssignedTasksToHandyman(handyman) (inherited from Hospital)
- findHandymanTaskSubtable(taskType) (inherited from Hospital)
- findRatholeTiles(count, left, top, right, bottom) (inherited from Hospital)
- getAveragePatientAttribute(attribute, default_value, min_count) (inherited from Hospital)
- getAverageStaffAttribute(attribute, default_value) (inherited from Hospital)
- getCampaignData() (inherited from Hospital)
- getDebugPatient() (inherited from Hospital)
- getDiseaseReputation(disease) (inherited from Hospital)
- getDiseaseReputationPriceFactor(disease) (inherited from Hospital)
- getHandymanTaskPriority(taskIndex, taskType) (inherited from Hospital)
- getHeliportPosition() (inherited from Hospital)
- getHeliportSpawnPosition() (inherited from Hospital)
- getIndexOfTask(x, y, taskType, obj) (inherited from Hospital)
- getObjectBuildCost(name) (inherited from Hospital)
- getOwnedTileCount() (inherited from Hospital)
- getPlayerIndex() (inherited from Hospital)
- getRandomBusyRoom() (inherited from Hospital)
- getReceptionDesks(is_staffed) (inherited from Hospital)
- getReputationChangeLikelihood() (inherited from Hospital)
- getTreatmentPrice(disease) (inherited from Hospital)
- getWallsAround(x, y) (inherited from Hospital)
- giveAdvice(msgs, rnd_frac, stay_up) (overrides Hospital:giveAdvice)
- hadPatients() (inherited from Hospital)
- hasReceptionDesk(is_staffed) (inherited from Hospital)
- humanoidDeath(patient) (inherited from Hospital)
- initOwnedPlots() (inherited from Hospital)
- initStaff() (inherited from Hospital)
- isInHospital(x, y) (inherited from Hospital)
- isPlayerHospital() (inherited from Hospital)
- isReputationChangeAllowed(amount) (inherited from Hospital)
- isRoomDiscovered(room_id) (inherited from Hospital)
- logTransaction(transaction) (inherited from Hospital)
- makeDebugRat(left, top, right, bottom) (inherited from Hospital)
- makeEmergencyEndFax(rescued_patients, total, max_bonus, earned) (overrides Hospital:makeEmergencyEndFax)
- makeEmergencyStartFax() (overrides Hospital:makeEmergencyStartFax)
- makeNoDiagnosisRoomFax(patient) (overrides Hospital:makeNoDiagnosisRoomFax)
- makeNoTreatmentRoomFax(patient) (overrides Hospital:makeNoTreatmentRoomFax)
- makeRaiseRequest(amount, staff) (overrides Hospital:makeRaiseRequest)
- makeVipEndFax(vip_rating, name, cash_reward, vip_message) (overrides Hospital:makeVipEndFax)
- manageEpidemics() (inherited from Hospital)
- modifyHandymanTaskPriority(taskIndex, newPriority, taskType) (inherited from Hospital)
- monthlyAdviceChecks()
- msgCured() (overrides Hospital:msgCured)
- msgKilled() (overrides Hospital:msgKilled)
- msgMultiReceptionDesks() (overrides Hospital:msgMultiReceptionDesks)
- msgNeedFirstReceptionDesk() (overrides Hospital:msgNeedFirstReceptionDesk)
- msgReceptionDesk() (overrides Hospital:msgReceptionDesk)
- notifyOfStaffChange(staff) (inherited from Hospital)
- objectPlaced(entity, id) (inherited from Hospital)
- onEndDay() (overrides Hospital:onEndDay)
- onEndMonth() (overrides Hospital:onEndMonth)
- onEndYear() (inherited from Hospital)
- onSpawnVIP() (overrides Hospital:onSpawnVIP)
- open() (inherited from Hospital)
- paySupplierForDrug(disease_id) (inherited from Hospital)
- playSound(sound) (overrides Hospital:playSound)
- purchasePlot(plot_number) (inherited from Hospital)
- receiveMoney(amount, reason, changeValue) (inherited from Hospital)
- receiveMoneyForProduct(patient, amount, reason) (inherited from Hospital)
- receiveMoneyForTreatment(patient) (inherited from Hospital)
- removeDebugPatient(patient) (inherited from Hospital)
- removeHandymanTask(taskIndex, taskType) (inherited from Hospital)
- removeMessage(humanoid) (overrides Hospital:removeMessage)
- removePatient(patient) (inherited from Hospital)
- removeRathole(hole) (inherited from Hospital)
- removeRatholeXY(x, y) (inherited from Hospital)
- removeRatholesAroundRoom(room) (inherited from Hospital)
- removeStaff(staff) (inherited from Hospital)
- removeTileObject(object_category) (inherited from Hospital)
- resetDeathCount() (inherited from Hospital)
- resolveEmergency() (inherited from Hospital)
- roomNotYetResearched(disease) (inherited from Hospital)
- searchForHandymanTask(handyman, task_type) (inherited from Hospital)
- sellSodaToPatient(patient) (inherited from Hospital)
- setCampaignData(campaign_data) (inherited from Hospital)
- showGatesToHell(entity) (overrides Hospital:showGatesToHell)
- spawnContagiousPatient() (inherited from Hospital)
- spawnPatient() (inherited from Hospital)
- spawnRat(hole) (inherited from Hospital)
- spendMoney(amount, reason, changeValue) (inherited from Hospital)
- tick() (inherited from Hospital)
- tickEarthquake(stage) (overrides Hospital:tickEarthquake)
- unassignHandymanTasks(handyman) (inherited from Hospital)
- unconditionalChangeReputation(valueChange) (inherited from Hospital)
- updateCuredCounts(patient) (inherited from Hospital)
- updateNotCuredCounts(patient, reason) (inherited from Hospital)
- updatePercentages() (inherited from Hospital)
- warnPatientNotPaying(treatment_name)
Member Index
- acc_heating (*)
- acc_loan_interest (*)
- acc_overdraft (*)
- acc_research_cost (*)
- adviser_data
- announce_vip
- autopsy_discovered (*)
- balance
- bench_msg (*)
- boiler_can_break (*)
- boiler_countdown (*)
- cash_msg (*)
- concurrent_epidemic_limit (*)
- curr_setting (*)
- current_inflation (*)
- debug_patients (*)
- disasterless_days (*)
- discover_autopsy_risk (*)
- discovered_diseases (*)
- discovered_rooms (*)
- disease_casebook
- emergency
- emergency_patients (*)
- epidemic
- epidemics_disabled (*)
- free_build_mode (*)
- future_epidemics_pool (*)
- handymanTasks (*)
- handyman_popup (*)
- has_impressive_reputation (*)
- has_seen_pay_rise
- heating
- heating_broke (*)
- hosp_cheats
- hospital_littered (*)
- inflation_rate (*)
- initial_grace (*)
- insurance (*)
- insurance_balance (*)
- interest_rate (*)
- is_in_world (*)
- loan
- message_popup (*)
- money_in (*)
- money_out (*)
- msg_counter (*)
- name (*)
- next_month_start (*)
- not_cured (*)
- not_cured_ty (*)
- num_cured
- num_cured_ty (*)
- num_deaths
- num_deaths_this_year (*)
- num_explosions (*)
- num_vips
- num_vips_ty (*)
- num_visitors
- num_visitors_pm (*)
- num_visitors_tm (*)
- num_visitors_ty (*)
- opened (*)
- over_priced_threshold (*)
- overdraft_interest_rate (*)
- ownedPlots (*)
- patientcount (*)
- patients (*)
- percentage_cured (*)
- percentage_killed (*)
- player_salary (*)
- pleased_vips_ty (*)
- policies (*)
- population (*)
- radiator_heat (*)
- ratholes (*)
- reception_desks (*)
- receptionist_count (*)
- receptionist_msg
- reputation (*)
- reputation_above_threshold (*)
- reputation_max (*)
- reputation_min (*)
- research (*)
- research_dep_built (*)
- room_discoveries (*)
- sal_min (*)
- salary_incr (*)
- salary_offer (*)
- seating_warning (*)
- show_progress_screen_warnings (*)
- sodas_sold (*)
- spawn_attempts (*)
- spawn_rate_cheat (*)
- staff
- staff_room_msg (*)
- staffed_reception_desks (*)
- statistics (*)
- thirst_msg (*)
- tile_object_counts (*)
- toilet_msg (*)
- transactions (*)
- under_priced_threshold (*)
- undiscovered_rooms (*)
- value (*)
- vip_declined (*)
- visitors
- warmth_msg (*)
- win_declined
- world
function PlayerHospital:PlayerHospital(world, avail_rooms, name)
Measurement interval in days.
Parameters:
| Name | Type | Description |
|---|---|---|
| world | ? | ? |
| avail_rooms | ? | ? |
| name | ? | ? |
Declared on: line 31 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:_adviseBenches()
Private function to check if patients have adequate seating
Declared on: line 172 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:_adviseDrinksMachines()
Private function to check if patients are getting thirsty
Declared on: line 248 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:_adviseHeatingForPatients()
Private function to check warmth of the patients.
Only too hot or cold triggers advice
Declared on: line 208 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:_adviseHeatingForStaff()
Private function to check warmth of the staff.
Only too hot or cold triggers advise
Declared on: line 232 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:_adviseMoney()
This must occur after monthly maintenance and salary costs
or it may give invalid advice
Declared on: line 128 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:_adviseStaffRoom()
Private function to warn about lack of a staff room.
Declared on: line 152 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:_adviseToilets()
Private function to warn about a lack of toilets.
Declared on: line 162 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:_warnForLongQueues()
Private function to advise about long queues
Rooms requiring a doctor occasionally trigger the generic message
Declared on: line 265 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:adviseBoilerBreakdown(broken_heat)
Select a relevant message to be displayed to the user
Parameters:
| Name | Type | Description |
|---|---|---|
| broken_heat | 0 or or or 1 | Boiler output due to being broken. |
Overrides: Hospital:adviseBoilerBreakdown.
Declared on: line 468 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:adviseCannotAffordPlot()
Give visual warning that player doesn't have enough $ to build
Let the message remain until cancelled by the player as it is being displayed behind the town map
Overrides: Hospital:adviseCannotAffordPlot.
Declared on: line 563 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:adviseDiscoverDisease(disease)
Parameters:
| Name | Type | Description |
|---|---|---|
| disease | ? | ? |
Overrides: Hospital:adviseDiscoverDisease.
Declared on: line 448 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:adviseNoGPOffice()
Give advice that a patient is waiting for the player to build a GP's office
Called when a patient has passed reception and is waiting for a room to be built.
Each piece of advice is only given once per month
Overrides: Hospital:adviseNoGPOffice.
Declared on: line 839 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:advisePlants(placed)
Give advice to the user about maintenance of plants.
Parameters:
| Name | Type | Description |
|---|---|---|
| placed | bool | If a plant was placed |
Overrides: Hospital:advisePlants.
Declared on: line 284 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:advisePriceLevelImpact(judgment, name)
Tell the player, through the advisor, about the impact of casebook prices
Parameters:
| Name | Type | Description |
|---|---|---|
| judgment | string or under or over or fair | The judgment of the price, from Hospital:computePriceLevelImpact |
| name | string | The name of the casebook entry of the diagnosis or disease |
Overrides: Hospital:advisePriceLevelImpact.
Declared on: line 569 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:afterLoad(old, new)
Parameters:
| Name | Type | Description |
|---|---|---|
| old | ? | ? |
| new | ? | ? |
Overrides: Hospital:afterLoad.
Declared on: line 856 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:announceRepair(room)
Announces a machine needing repair
Parameters:
| Name | Type | Description |
|---|---|---|
| room | ? | The room of the machine |
Overrides: Hospital:announceRepair.
Declared on: line 481 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:announceStaffLeave(staff)
Announce to the player that a staff member is leaving the hospital
Parameters:
| Name | Type | Description |
|---|---|---|
| staff | table | The staff member |
Overrides: Hospital:announceStaffLeave.
Declared on: line 600 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:checkReceptionAdvice(current_month, current_year)
Make players aware of the need for a receptionist and desk.
Parameters:
| Name | Type | Description |
|---|---|---|
| current_month | int | Month of the year. |
| current_year | int | Current game year. |
Declared on: line 307 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:createVip()
Makes the fax which may spawn a VIP
Overrides: Hospital:createVip.
Declared on: line 734 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:dailyAdviceChecks()
Give advice to the player at the end of a day.
Note: For patient/staff warmth checks, advice is only on one or the other per month
Declared on: line 52 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:giveAdvice(msgs, rnd_frac, stay_up)
Advises the player.
Parameters:
| Name | Type | Description |
|---|---|---|
| msgs | array or of or string | Messages to select from. |
| rnd_frac | optional or float or in or range or 0 or 1 | Fraction of times that the call actually says something. |
| stay_up | bool | If true, let the adviser remain visible afterwards. |
Overrides: Hospital:giveAdvice.
Declared on: line 395 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:makeEmergencyEndFax(rescued_patients, total, max_bonus, earned)
Makes the fax at the end of an emergency
Parameters:
| Name | Type | Description |
|---|---|---|
| rescued_patients | ? | ? |
| total | ? | ? |
| max_bonus | ? | ? |
| earned | ? | ? |
Overrides: Hospital:makeEmergencyEndFax.
Declared on: line 721 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:makeEmergencyStartFax()
Makes the fax at the start of an emergency
Overrides: Hospital:makeEmergencyStartFax.
Declared on: line 666 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:makeNoDiagnosisRoomFax(patient)
Makes the fax requesting player action for the patient who needs a diagnosis room
Parameters:
| Name | Type | Description |
|---|---|---|
| patient | table |
Overrides: Hospital:makeNoDiagnosisRoomFax.
Declared on: line 644 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:makeNoTreatmentRoomFax(patient)
Makes the fax requesting player action for the patient who needs a diagnosis room
Parameters:
| Name | Type | Description |
|---|---|---|
| patient | table |
Overrides: Hospital:makeNoTreatmentRoomFax.
Declared on: line 606 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:makeRaiseRequest(amount, staff)
Makes the raise request for a staff member
Parameters:
| Name | Type | Description |
|---|---|---|
| amount | num | the requested raise increase |
| staff | table | the staff member |
Overrides: Hospital:makeRaiseRequest.
Declared on: line 586 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:makeVipEndFax(vip_rating, name, cash_reward, vip_message)
Called when the vip is out of the hospital grounds and ready to make their report
Parameters:
| Name | Type | Description |
|---|---|---|
| vip_rating | int | |
| name | string | |
| cash_reward | int | |
| vip_message | int |
Overrides: Hospital:makeVipEndFax.
Declared on: line 756 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:monthlyAdviceChecks()
Give advice to the player at the end of a month.
Declared on: line 294 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:msgCured()
Give the user possibly a message about a cured patient.
Overrides: Hospital:msgCured.
Declared on: line 416 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:msgKilled()
Give the user possibly a message about a dead patient.
Overrides: Hospital:msgKilled.
Declared on: line 432 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:msgMultiReceptionDesks()
Give advice about having more desks.
Overrides: Hospital:msgMultiReceptionDesks.
Declared on: line 359 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:msgNeedFirstReceptionDesk()
Give advice to the user about the need to buy the first reception desk.
Overrides: Hospital:msgNeedFirstReceptionDesk.
Declared on: line 336 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:msgReceptionDesk()
Give advice to the user about having bought a reception desk.
Overrides: Hospital:msgReceptionDesk.
Declared on: line 346 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:onEndDay()
Called at the end of each day.
Overrides: Hospital:onEndDay.
Declared on: line 497 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:onEndMonth()
Called at the end of each day.
Overrides: Hospital:onEndMonth.
Declared on: line 543 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:onSpawnVIP()
Overrides: Hospital:onSpawnVIP.
Declared on: line 493 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:playSound(sound)
Play a sound file
Parameters:
| Name | Type | Description |
|---|---|---|
| sound | ? | ? |
Overrides: Hospital:playSound.
Declared on: line 791 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:removeMessage(humanoid)
Remove any message (fax) relating to this humanoid
Parameters:
| Name | Type | Description |
|---|---|---|
| humanoid | table | The humanoid |
Overrides: Hospital:removeMessage.
Declared on: line 748 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:showGatesToHell(entity)
Show the 'Gates to hell' animation.
Parameters:
| Name | Type | Description |
|---|---|---|
| entity | Entity | Gates to hell. |
Overrides: Hospital:showGatesToHell.
Declared on: line 381 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:tickEarthquake(stage)
The UI parts of earthquake ticks
Parameters:
| Name | Type | Description |
|---|---|---|
| stage | string | Stage of the active earthquake. This must be one of the following, "warning_start", "main_start", "end", "pause", "small_damage", "large damage", "sound" |
Overrides: Hospital:tickEarthquake.
Declared on: line 798 of Lua/hospitals/player_hospital.lua.
function PlayerHospital:warnPatientNotPaying(treatment_name)
To avoid spamming the player, the notification is only shown once per month.
param treatment_name (string) The name of the treatment the patient refused to pay for.
Parameters:
| Name | Type | Description |
|---|---|---|
| treatment_name | ? | ? |
Declared on: line 118 of Lua/hospitals/player_hospital.lua.