Module CorsixTH.CorsixTH.Lua.hospitals.player_hospital
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
Functions
| PlayerHospital:_adviseBenches () | Private function to check if patients have adequate seating |
| PlayerHospital:_adviseDrinksMachines () | Private function to check if patients are getting thirsty |
| PlayerHospital:_adviseHeatingForPatients () | Private function to check warmth of the patients. |
| PlayerHospital:_adviseHeatingForStaff () | Private function to check warmth of the staff. |
| PlayerHospital:_adviseMoney () | Private function to check if our financial situation needs advice. |
| PlayerHospital:_adviseStaffRoom () | Private function to warn about lack of a staff room. |
| PlayerHospital:_adviseToilets () | Private function to warn about a lack of toilets. |
| PlayerHospital:_warnForLongQueues () | Private function to advise about long queues Rooms requiring a doctor occasionally trigger the generic message |
| PlayerHospital:adviseBoilerBreakdown (broken_heat) | Select a relevant message to be displayed to the user |
| PlayerHospital:adviseCannotAffordPlot () | Give visual warning that player doesn't have enough $ to build. |
| PlayerHospital:advisePlants (placed) | Give advice to the user about maintenance of plants. |
| PlayerHospital:advisePriceLevelImpact (judgment, name) | Tell the player, through the advisor, about the impact of casebook prices. |
| PlayerHospital:announceRepair (room) | Announces a machine needing repair |
| PlayerHospital:announceStaffLeave (staff) | Announce to the player that a staff member is leaving the hospital. |
| PlayerHospital:checkReceptionAdvice (current_month, current_year) | Make players aware of the need for a receptionist and desk. |
| PlayerHospital:createVip () | Makes the fax which may spawn a VIP. |
| PlayerHospital:giveAdvice (msgs, rnd_frac, stay_up) | Advises the player. |
| PlayerHospital:makeEmergencyEndFax (rescued_patients, total, max_bonus, earned) | Makes the fax at the end of an emergency. |
| PlayerHospital:makeEmergencyStartFax () | Makes the fax at the start of an emergency. |
| PlayerHospital:makeNoDiagnosisRoomFax (patient) | Makes the fax requesting player action for the patient who needs a diagnosis room. |
| PlayerHospital:makeNoTreatmentRoomFax (patient) | Makes the fax requesting player action for the patient who needs a diagnosis room. |
| PlayerHospital:makeRaiseRequest (amount, staff) | Makes the raise request for a staff member. |
| 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. |
| PlayerHospital:monthlyAdviceChecks () | Give advice to the player at the end of a month. |
| PlayerHospital:msgCured () | Give the user possibly a message about a cured patient. |
| PlayerHospital:msgKilled () | Give the user possibly a message about a dead patient. |
| PlayerHospital:msgMultiReceptionDesks () | Give advice about having more desks. |
| PlayerHospital:msgNeedFirstReceptionDesk () | Give advice to the user about the need to buy the first reception desk. |
| PlayerHospital:msgReceptionDesk () | Give advice to the user about having bought a reception desk. |
| PlayerHospital:onEndDay () | Called at the end of each day. |
| PlayerHospital:onEndMonth () | Called at the end of each day. |
| PlayerHospital:removeMessage (humanoid) | Remove any message (fax) relating to this humanoid. |
| PlayerHospital:showGatesToHell (entity) | Show the 'Gates to hell' animation. |
Functions
- PlayerHospital:_adviseBenches ()
- Private function to check if patients have adequate seating
- PlayerHospital:_adviseDrinksMachines ()
- Private function to check if patients are getting thirsty
- PlayerHospital:_adviseHeatingForPatients ()
- Private function to check warmth of the patients. Only too hot or cold triggers advice
- PlayerHospital:_adviseHeatingForStaff ()
- Private function to check warmth of the staff. Only too hot or cold triggers advise
- PlayerHospital:_adviseMoney ()
- Private function to check if our financial situation needs advice. This must occur after monthly maintenance and salary costs or it may give invalid advice
- PlayerHospital:_adviseStaffRoom ()
- Private function to warn about lack of a staff room.
- PlayerHospital:_adviseToilets ()
- Private function to warn about a lack of toilets.
- PlayerHospital:_warnForLongQueues ()
- Private function to advise about long queues Rooms requiring a doctor occasionally trigger the generic message
- PlayerHospital:adviseBoilerBreakdown (broken_heat)
-
Select a relevant message to be displayed to the user
Parameters:
- broken_heat (0 or 1) Boiler output due to being broken.
- 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
- PlayerHospital:advisePlants (placed)
-
Give advice to the user about maintenance of plants.
Parameters:
- placed (bool) If a plant was placed
- PlayerHospital:advisePriceLevelImpact (judgment, name)
-
Tell the player, through the advisor, about the impact of casebook prices.
Parameters:
- judgment (string - under, over, fair) The judgment of the price, from Hospital:computePriceLevelImpact
- name (string) The name of the casebook entry of the diagnosis or disease
- PlayerHospital:announceRepair (room)
-
Announces a machine needing repair
Parameters:
- room The room of the machine
- PlayerHospital:announceStaffLeave (staff)
-
Announce to the player that a staff member is leaving the hospital.
Parameters:
- staff (table) The staff member
- PlayerHospital:checkReceptionAdvice (current_month, current_year)
-
Make players aware of the need for a receptionist and desk.
Parameters:
- current_month (int) Month of the year.
- current_year (int) Current game year.
- PlayerHospital:createVip ()
- Makes the fax which may spawn a VIP.
- PlayerHospital:giveAdvice (msgs, rnd_frac, stay_up)
-
Advises the player.
Parameters:
- msgs (array of string) Messages to select from.
- rnd_frac (optional float in range (0, 1]) Fraction of times that the call actually says something.
- stay_up (bool) If true, let the adviser remain visible afterwards.
Returns:
-
(boolean) Whether a message was given to the user.
- PlayerHospital:makeEmergencyEndFax (rescued_patients, total, max_bonus, earned)
-
Makes the fax at the end of an emergency.
Parameters:
- rescued_patients
- total
- max_bonus
- earned
- PlayerHospital:makeEmergencyStartFax ()
- Makes the fax at the start of an emergency.
- PlayerHospital:makeNoDiagnosisRoomFax (patient)
-
Makes the fax requesting player action for the patient who needs a diagnosis room.
Parameters:
- patient (table)
- PlayerHospital:makeNoTreatmentRoomFax (patient)
-
Makes the fax requesting player action for the patient who needs a diagnosis room.
Parameters:
- patient (table)
- PlayerHospital:makeRaiseRequest (amount, staff)
-
Makes the raise request for a staff member.
Parameters:
- amount (num) the requested raise increase
- staff (table) the staff member
- 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:
- vip_rating (int)
- name (string)
- cash_reward (int)
- vip_message (int)
- PlayerHospital:monthlyAdviceChecks ()
- Give advice to the player at the end of a month.
- PlayerHospital:msgCured ()
- Give the user possibly a message about a cured patient.
- PlayerHospital:msgKilled ()
- Give the user possibly a message about a dead patient.
- PlayerHospital:msgMultiReceptionDesks ()
- Give advice about having more desks.
- PlayerHospital:msgNeedFirstReceptionDesk ()
- Give advice to the user about the need to buy the first reception desk.
- PlayerHospital:msgReceptionDesk ()
- Give advice to the user about having bought a reception desk.
- PlayerHospital:onEndDay ()
- Called at the end of each day.
- PlayerHospital:onEndMonth ()
- Called at the end of each day.
- PlayerHospital:removeMessage (humanoid)
-
Remove any message (fax) relating to this humanoid.
Parameters:
- humanoid (table) The humanoid
- PlayerHospital:showGatesToHell (entity)
-
Show the 'Gates to hell' animation.
Parameters:
- entity (Entity) Gates to hell.