/dports/games/corsix-th/CorsixTH-0.65.1/CorsixTH/Lua/humanoid_actions/ |
H A D | die.lua | 37 … humanoid:setTimer(humanoid.world:getAnimLength(humanoid.die_anims.extra_east), action_die_tick) 45 humanoid:setAnimation(humanoid.die_anims.rise_east, mirror) 50 humanoid:setLayer(0, humanoid.layers[0] - 8) 63 humanoid:setAnimation(humanoid.die_anims.fly_east, mirror) 64 humanoid:setTilePositionSpeed(humanoid.tile_x, humanoid.tile_y, nil, nil, 0, -4) 67 humanoid.world:destroyEntity(humanoid) 80 …humanoid:setTimer(humanoid.world:getAnimLength(humanoid.die_anims.extra_east), action_die_tick_rea… 92 humanoid:setAnimation(humanoid.on_ground_anim, mirror) 125 …if not humanoid.world:getPathDistance(humanoid.tile_x, humanoid.tile_y, humanoid.hole_use_tile_x, … 126 or humanoid.world:getRoom(humanoid.hole_use_tile_x, humanoid.hole_use_tile_y) then [all …]
|
H A D | seek_room.lua | 93 if not humanoid.world:findRoomNear(humanoid, rooms, nil, "advanced") then 99 return humanoid.world:findRoomNear(humanoid, room_type, nil, "advanced") 104 humanoid.waiting = nil 106 humanoid:setNextAction(room:createEnterAction(humanoid)) 127 humanoid.waiting = 60 135 local req = humanoid.hospital:checkDiseaseRequirements(humanoid.disease.id) 178 humanoid.waiting = 1 222 if humanoid:agreesToPay(humanoid.disease.id) then 229 humanoid:goHome("over_priced", humanoid.disease.id) 276 local req = humanoid.hospital:checkDiseaseRequirements(humanoid.disease.id) [all …]
|
H A D | use_screen.lua | 40 humanoid.user_of = nil 48 humanoid:finishAction() 79 humanoid.user_of:setLayer(1, humanoid.layers[1]) 80 return finish(humanoid) 86 return finish(humanoid) 100 return finish(humanoid) 112 humanoid:setLayer(0, 2) 114 humanoid:setLayer(2, 2) 210 humanoid:setSpeed(0, 0) 211 humanoid:setTimer(humanoid.world:getAnimLength(anim), when_done) [all …]
|
H A D | walk.lua | 86 humanoid:unexpectFromRoom(humanoid.world:getRoom(action.x, action.y)) 95 humanoid:setTimer(nil) 96 timer_function(humanoid) 100 local hospital = humanoid.hospital or humanoid.last_hospital 116 if humanoid.speed and humanoid.speed == "fast" then 245 humanoid.user_of = nil 335 humanoid.user_of = door 336 door:setUser(humanoid) 389 humanoid.in_room = room 400 …local path_x, path_y = humanoid.world:getPath(humanoid.tile_x, humanoid.tile_y, action.x, action.y) [all …]
|
H A D | queue.lua | 102 on_interrupt(action, humanoid) 156 interrupt_head(humanoid, index) 182 interrupt_head(humanoid, i) 207 (humanoid.disease and humanoid.disease.must_stand) 237 bench.reserved_for = humanoid 249 if person == humanoid then 299 interrupt_head(humanoid, i) 350 humanoid:finishAction() 368 queue:unexpect(humanoid) 369 queue:push(humanoid, action) [all …]
|
H A D | meander.lua | 33 if class.is(humanoid, Staff) and humanoid:isIdle() and not room then 41 elseif humanoid.world.dispatcher:answerCall(humanoid) then 43 humanoid:finishAction() 52 humanoid:queueAction(last_room:createEnterAction(humanoid)) 59 humanoid.last_room = nil 63 if humanoid.humanoid_class == "Doctor" or humanoid.humanoid_class == "Nurse" then 68 local x, y = humanoid.world.pathfinder:findIdleTile(humanoid.tile_x, 71 if x == humanoid.tile_x and y == humanoid.tile_y then 76 humanoid:finishAction() 80 humanoid:finishAction() [all …]
|
H A D | staff_reception.lua | 42 humanoid.associated_desk = nil 46 humanoid:finishAction() 48 HumanoidRawWalk(humanoid, humanoid.tile_x, humanoid.tile_y, dx, dy, nil, 51 humanoid:finishAction() 59 local anims = humanoid.walk_anims 71 object.receptionist = humanoid 89 humanoid.associated_desk = nil 90 humanoid:setTimer(nil) 92 humanoid:finishAction() 101 humanoid:finishAction(action) [all …]
|
H A D | use_object.lua | 123 HumanoidRawWalk(humanoid, 129 HumanoidRawWalk(humanoid, 265 humanoid.user_of = object 293 humanoid.user_of = nil 314 object:setUser(humanoid) 357 humanoid:despawn() 358 humanoid.world:destroyEntity(humanoid) 371 if humanoid.user_of then 376 humanoid:setTimer(nil) 378 humanoid:finishAction() [all …]
|
H A D | seek_reception.lua | 33 humanoid.hospital and 38 local world = humanoid.world 58 local this_score = humanoid.world:getPathDistance(humanoid.tile_x, humanoid.tile_y, x, y) 76 humanoid.waiting = nil 80 if can_join_queue_at(humanoid, humanoid.tile_x, humanoid.tile_y) then 86 humanoid:queueAction(walk, 0) 115 if humanoid.hospital:isInHospital(humanoid.tile_x, humanoid.tile_y) then 117 if not humanoid.waiting then 119 humanoid.waiting = 5 122 …local _, hosp_x, hosp_y = world.pathfinder:isReachableFromHospital(humanoid.tile_x, humanoid.tile_… [all …]
|
H A D | seek_toilets.lua | 36 humanoid.going_to_toilet = "no" 37 humanoid:finishAction() 43 local room = humanoid.world:findRoomNear(humanoid, "toilets", nil, "advanced") 45 humanoid:setNextAction(room:createEnterAction(humanoid):setMustHappen(true)) 47 if humanoid.next_room_to_visit then 50 queue:unexpect(humanoid) 52 humanoid:updateDynamicInfo("") 56 humanoid:finishAction() 62 humanoid:setNextAction(SeekRoomAction(humanoid.next_room_to_visit.room_info.id)) 66 humanoid.going_to_toilet = "no" [all …]
|
H A D | pee.lua | 31 local action_pee_end = permanent"action_pee_end"( function(humanoid) 32 local litter = humanoid.world:newObject("litter", humanoid.tile_x, humanoid.tile_y) 33 litter:setLitterType("pee", humanoid.last_move_direction == "south" and 0 or 1) 35 humanoid:finishAction() 38 local function action_pee_start(action, humanoid) 40 humanoid.last_move_direction = "east" 42 humanoid.last_move_direction = "south" 45 assert(humanoid.pee_anim, "Error: no pee animation for humanoid " .. humanoid.humanoid_class) 47 humanoid:setAnimation(humanoid.pee_anim, humanoid.last_move_direction == "east" and 0 or 1) 48 humanoid:setTimer(humanoid.world:getAnimLength(humanoid.pee_anim), action_pee_end)
|
H A D | vomit.lua | 31 local action_vomit_end = permanent"action_vomit_end"( function(humanoid) 32 local litter = humanoid.world:newObject("litter", humanoid.tile_x, humanoid.tile_y) 33 …litter:setLitterType("puke", humanoid.last_move_direction == "south" and 0 or 1) --For some reaso… 35 humanoid:finishAction() 38 local function action_vomit_start(action, humanoid) 40 humanoid.last_move_direction = "east" 42 humanoid.last_move_direction = "south" 45 assert(humanoid.vomit_anim, "Error: no vomit animation for humanoid " .. humanoid.humanoid_class) 47 humanoid:setAnimation(humanoid.vomit_anim, humanoid.last_move_direction == "east" and 0 or 1) 48 humanoid:setTimer(humanoid.world:getAnimLength(humanoid.vomit_anim), action_vomit_end)
|
H A D | vip_go_to_next_room.lua | 33 if humanoid.next_room_no == nil then 35 humanoid:goHome() 38 local x, y = humanoid.next_room:getEntranceXY() 40 humanoid:setNextAction(IdleAction()) 41 humanoid.waiting = 1 43 humanoid:queueAction(WalkAction(x, y)) 45 humanoid.next_room.door.queue:expect(humanoid, {callback = callback}) 50 humanoid.next_room.humanoids_enroute[humanoid] = nil 52 humanoid:evaluateRoom() 53 humanoid.waiting = nil [all …]
|
H A D | use_staffroom.lua | 38 local h_class = humanoid.humanoid_class 58 local obj, ox, oy = humanoid.world:findFreeObjectNearToUse(humanoid, new_type, "near") 90 action.target_obj.reserved_for = humanoid 106 humanoid:queueAction(MeanderAction():setCount(2), 0) 115 humanoid:wake(relaxation[action.target_type]) 117 if humanoid.attributes["fatigue"] == 0 then 118 humanoid:setNextAction(humanoid:getRoom():createLeaveAction()) 120 local room = humanoid.last_room 128 humanoid:queueAction(room:createEnterAction(humanoid)) 132 humanoid:queueAction(MeanderAction()) [all …]
|
H A D | idle.lua | 57 humanoid:setTimer(1, humanoid.finishAction) 61 local action = humanoid:getCurrentAction() 66 humanoid:finishAction() 71 local anims = humanoid.walk_anims 73 humanoid:setAnimation(anims.idle_north, 0) 75 humanoid:setAnimation(anims.idle_east, 0) 77 humanoid:setAnimation(anims.idle_east, 1) 79 humanoid:setAnimation(anims.idle_north, 1) 81 humanoid.th:setTile(humanoid.th:getTile()) 82 humanoid:setSpeed(0, 0) [all …]
|
H A D | sweep_floor.lua | 41 humanoid:finishAction() 45 humanoid.user_of:remove() 46 humanoid.user_of:setTile(nil) 47 humanoid.user_of = nil 48 humanoid:setTimer(humanoid.world:getAnimLength(animation_numbers[2]) * 2, finish) 53 humanoid:setAnimation(anim) 54 humanoid:setTimer(humanoid.world:getAnimLength(anim) * 2, remove_litter) 57 local function action_sweep_floor_start(action, humanoid) 59 humanoid.user_of = action.litter 66 humanoid:setAnimation(anim) [all …]
|
H A D | pickup.lua | 48 humanoid.th:makeVisible() 49 local room = humanoid:getRoom() 51 room:onHumanoidEnter(humanoid) 53 humanoid:onPlaceInCorridor() 55 humanoid:finishAction() 68 if class.is(humanoid, Staff) then 69 humanoid:setDynamicInfoText("") 75 humanoid:setSpeed(0, 0) 76 humanoid.th:makeInvisible() 77 local room = humanoid:getRoom() [all …]
|
H A D | knock_door.lua | 41 local door = humanoid.user_of 42 door:removeUser(humanoid) 43 humanoid.user_of = nil 45 humanoid:finishAction() 48 local function action_knock_door_start(action, humanoid) 50 local anims = humanoid.door_anims 58 humanoid:setAnimation(anim, flag_mirror) 59 humanoid:setTilePositionSpeed(humanoid.tile_x, humanoid.tile_y) 60 humanoid:setTimer(humanoid.world:getAnimLength(anim), action_knock_door_tick) 61 humanoid.user_of = door [all …]
|
H A D | get_up.lua | 30 local action_get_up_end = permanent"action_get_up_end"( function(humanoid) 31 humanoid:finishAction() 35 local function action_get_up_start(action, humanoid) 37 humanoid.last_move_direction = "east" 39 humanoid.last_move_direction = "south" 42 …assert(humanoid.get_up_anim, "Error: no getting up animation for humanoid " .. humanoid.humanoid_c… 44 humanoid:setAnimation(humanoid.get_up_anim, humanoid.last_move_direction == "east" and 0 or 1) 45 humanoid:setTimer(humanoid.world:getAnimLength(humanoid.get_up_anim), action_get_up_end)
|
H A D | on_ground.lua | 30 local action_on_ground_end = permanent"action_on_ground_end"( function(humanoid) 31 humanoid:finishAction() 35 local function action_on_ground_start(action, humanoid) 37 humanoid.last_move_direction = "east" 39 humanoid.last_move_direction = "south" 42 …assert(humanoid.on_ground_anim, "Error: no on the ground animation for humanoid " .. humanoid.huma… 44 humanoid:setAnimation(humanoid.on_ground_anim, humanoid.last_move_direction == "east" and 0 or 1) 45 humanoid:setTimer(humanoid.world:getAnimLength(humanoid.on_ground_anim), action_on_ground_end)
|
H A D | falling.lua | 31 local action_falling_end = permanent"action_falling_end"( function(humanoid) 32 humanoid:finishAction() 36 local function action_falling_start(action, humanoid) 38 humanoid.last_move_direction = "east" 40 humanoid.last_move_direction = "south" 43 …assert(humanoid.falling_anim, "Error: no falling animation for humanoid " .. humanoid.humanoid_cla… 45 humanoid:setAnimation(humanoid.falling_anim, humanoid.last_move_direction == "east" and 0 or 1) 46 humanoid:setTimer(humanoid.world:getAnimLength(humanoid.falling_anim), action_falling_end)
|
/dports/games/corsix-th/CorsixTH-0.65.1/CorsixTH/Lua/rooms/ |
H A D | training.lua | 133 humanoid:walkTo(sox, soy) 138 humanoid:walkTo(box, boy) 162 humanoid.in_room = self 165 humanoid:setCallCompleted() 167 self.humanoids[humanoid] = true 173 local profile = humanoid.profile 194 humanoid:walkTo(ox, oy) 205 obj.reserved_for = humanoid 206 humanoid:walkTo(ox, oy) 212 humanoid.last_room = nil [all …]
|
H A D | toilets.lua | 72 function ToiletRoom:onHumanoidEnter(humanoid) 73 if class.is(humanoid, Patient) then 76 humanoid:walkTo(lx, ly) 77 loo.reserved_for = humanoid 89 humanoid.going_to_toilet = "no" 97 humanoid:walkTo(sx, sy) 105 sink.reserved_for = humanoid 128 self:dealtWithPatient(humanoid) 140 humanoid:queueAction(self:createEnterAction(humanoid)) 152 for humanoid in pairs(self.humanoids) do [all …]
|
/dports/games/corsix-th/CorsixTH-0.65.1/CorsixTH/Lua/ |
H A D | queue.lua | 51 if not self.expected[humanoid] then 62 function Queue:unexpect(humanoid) 63 if self.expected[humanoid] then 64 self.expected[humanoid] = nil 127 for _, humanoid in ipairs(self) do 128 if humanoid.is_emergency then 162 elseif humanoid.is_emergency or class.is(humanoid, Vip) or class.is(humanoid, Inspector) then 250 local humanoid = self[i] 251 if humanoid.onAdvanceQueue then 325 humanoid:queueAction(clone) [all …]
|
H A D | room.lua | 131 return humanoid 215 … if class.is(humanoid, Staff) and humanoid.humanoid_class ~= "Handyman" and humanoid:isIdle() then 236 if class.is(humanoid, Staff) and humanoid:fulfillsCriterion(attribute) and 237 not humanoid:isLeaving() and not humanoid.fired and 238 not (humanoid.on_call and humanoid.on_call.object ~= self) then 299 humanoid.in_room = self 389 if (humanoid.infected) and not humanoid.diagnosed and 404 humanoid:queueAction(self:createEnterAction(humanoid)) 541 humanoid.in_room = nil 806 humanoid:die() [all …]
|