Permalink
Browse files

#1394 Kings complex patient in psych when forced to leave will not re…

…queue the walkTo/UseScreen upon navigating the door

Staff will also get a MeanderAction if patient no longer in the room.
  • Loading branch information...
mugmuggy committed Oct 4, 2018
1 parent f16a510 commit c02757559ce1d277d6468e68fe23799bc8bb85f9
Showing with 7 additions and 2 deletions.
  1. +7 −2 CorsixTH/Lua/rooms/psych.lua
@@ -91,10 +91,10 @@ function PsychRoom:commandEnteringPatient(patient)
if bookcase == nil then
bookcase, bx, by = self.world:findObjectNear(staff, "bookcase")
end
if patient and patient.user_of then
if patient and patient.user_of and patient.user_of.object_type.id == "couch" then
duration = duration - 1
end
if duration <= 0 then
if duration == 0 then
if patient.diagnosed and patient.disease.id == "king_complex" then
-- Diagnosed patients (Elvis) need to change clothes
local after_use_screen = --[[persistable:psych_screen_after_use]] function()
@@ -114,6 +114,11 @@ function PsychRoom:commandEnteringPatient(patient)
self:dealtWithPatient(patient)
end
return
else
if patient:getRoom() ~= self and self:getStaffMember() then
self:getStaffMember():setNextAction(MeanderAction())
return
end
end
if bookcase and (duration % 10) == 0 and math.random(1, 2) == 1 then
staff:walkTo(bx, by)

0 comments on commit c027575

Please sign in to comment.