Permalink
Browse files

Add drug and drug effectiveness message to emergency fax

Corrected time for fax refusal was incorrectly calculating timer ticks  and adjusted that time to more closely match TH
  • Loading branch information...
mugmuggy committed Oct 13, 2018
1 parent 23dd52e commit c5ee84c2a964e7a57d16965bb47e57c41b2e95c5
Showing with 6 additions and 4 deletions.
  1. +6 −4 CorsixTH/Lua/hospital.lua
@@ -1226,9 +1226,11 @@ function Hospital:createEmergency(emergency)
if self:hasRoomOfType(emergency.disease.treatment_rooms[no_rooms]) then
room_name = nil
end
local added_info = _S.fax.emergency.cure_possible
-- TODO: Differentiate if a drug is needed, add drug effectiveness. Add undiscovered treatment.
-- added_info = _S.fax.emergency.cure_not_possible

local casebook = self.disease_casebook[random_disease.id]
local added_info = casebook.drug and
_S.fax.emergency.cure_possible_drug_name_efficiency:format(emergency.disease.name, casebook.cure_effectiveness)
or _S.fax.emergency.cure_possible
if room_name then
if staff_available then
added_info = _S.fax.emergency.cure_not_possible_build:format(room_name) .. "."
@@ -1255,7 +1257,7 @@ function Hospital:createEmergency(emergency)
{text = _S.fax.emergency.choices.refuse, choice = "refuse_emergency"},
},
}
self.world.ui.bottom_panel:queueMessage("emergency", message, nil, 24*20, 2) -- automatically refuse after 20 days
self.world.ui.bottom_panel:queueMessage("emergency", message, nil, Date.hoursPerDay() * 16, 2) -- automatically refuse after 16 days
created_one = true
end
return created_one

0 comments on commit c5ee84c

Please sign in to comment.