diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 7edc73e2585..9f7fdf87a7a 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1476,6 +1476,10 @@ /atom/proc/setClosed() return + +///Called when something resists while this atom is its loc +/atom/proc/container_resist_act(mob/living/user) + /** * Used to attempt to charge an object with a payment component. * diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 448e37312e3..c4dc81902f0 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -776,7 +776,7 @@ . = dense_object_backup ///called when a mob resists while inside a container that is itself inside something. -/atom/movable/proc/relay_container_resist(mob/living/user, obj/O) +/atom/movable/proc/relay_container_resist_act(mob/living/user, obj/O) return diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 4fb316a8410..19cfd3c10b7 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -59,18 +59,18 @@ else icon_state = initial(icon_state) -/obj/machinery/sleeper/container_resist(mob/living/user) +/obj/machinery/sleeper/container_resist_act(mob/living/user) visible_message("[occupant] emerges from [src]!", "You climb out of [src]!") open_machine() /obj/machinery/sleeper/Exited(atom/movable/user) if (!state_open && user == occupant) - container_resist(user) + container_resist_act(user) /obj/machinery/sleeper/relaymove(mob/user) if (!state_open) - container_resist(user) + container_resist_act(user) /obj/machinery/sleeper/open_machine() if(!state_open && !panel_open) diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index 735ce9fcf11..172bffd8113 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -66,7 +66,7 @@ open_machine() -/obj/machinery/dna_scannernew/container_resist(mob/living/user) +/obj/machinery/dna_scannernew/container_resist_act(mob/living/user) if(!locked) open_machine() return diff --git a/code/game/machinery/fat_sucker.dm b/code/game/machinery/fat_sucker.dm index da6b34af812..b1ce8c8f519 100644 --- a/code/game/machinery/fat_sucker.dm +++ b/code/game/machinery/fat_sucker.dm @@ -68,7 +68,7 @@ stop() ..() -/obj/machinery/fat_sucker/container_resist(mob/living/user) +/obj/machinery/fat_sucker/container_resist_act(mob/living/user) if(!free_exit || state_open) to_chat(user, "The emergency release is not responding! You start pushing against the hull!") user.changeNext_move(CLICK_CD_BREAKOUT) diff --git a/code/game/machinery/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index d59968df15f..6a839bd61e5 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -94,7 +94,7 @@ The console is located at computer/gulag_teleporter.dm return open_machine() -/obj/machinery/gulag_teleporter/container_resist(mob/living/user) +/obj/machinery/gulag_teleporter/container_resist_act(mob/living/user) if(!locked) open_machine() return diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index f236fcaee7a..2bd531a7c73 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -168,7 +168,7 @@ allow_living = TRUE to_chat(user, "You overload [src]'s lifesign scanners.") -/obj/machinery/harvester/container_resist(mob/living/user) +/obj/machinery/harvester/container_resist_act(mob/living/user) if(!harvesting) visible_message("[occupant] emerges from [src]!", "You climb out of [src]!") @@ -178,11 +178,11 @@ /obj/machinery/harvester/Exited(atom/movable/user) if (!state_open && user == occupant) - container_resist(user) + container_resist_act(user) /obj/machinery/harvester/relaymove(mob/user) if (!state_open) - container_resist(user) + container_resist_act(user) /obj/machinery/harvester/examine(mob/user) . = ..() diff --git a/code/game/machinery/hypnochair.dm b/code/game/machinery/hypnochair.dm index 5a3a0d56f50..5fec81169c7 100644 --- a/code/game/machinery/hypnochair.dm +++ b/code/game/machinery/hypnochair.dm @@ -175,7 +175,7 @@ else icon_state += "_occupied" -/obj/machinery/hypnochair/container_resist(mob/living/user) +/obj/machinery/hypnochair/container_resist_act(mob/living/user) user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("You see [user] kicking against the door of [src]!", \ diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 0278cb49f59..061045cbdaf 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -332,7 +332,7 @@ open_machine() dump_contents() -/obj/machinery/suit_storage_unit/container_resist(mob/living/user) +/obj/machinery/suit_storage_unit/container_resist_act(mob/living/user) if(!locked) open_machine() dump_contents() diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index dd06a162dd0..66e5e470ef3 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -270,9 +270,9 @@ GLOBAL_LIST_INIT(dye_registry, list( ..() /obj/machinery/washing_machine/relaymove(mob/user) - container_resist(user) + container_resist_act(user) -/obj/machinery/washing_machine/container_resist(mob/living/user) +/obj/machinery/washing_machine/container_resist_act(mob/living/user) if(!busy) add_fingerprint(user) open_machine() diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 6b0cd953a68..eec39abcda1 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -210,7 +210,7 @@ return 1 return -/obj/item/mecha_parts/mecha_equipment/medical/sleeper/container_resist(mob/living/user) +/obj/item/mecha_parts/mecha_equipment/medical/sleeper/container_resist_act(mob/living/user) go_out() /obj/item/mecha_parts/mecha_equipment/medical/sleeper/process() diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index fd23c016437..45f716bc4b7 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -1002,7 +1002,7 @@ log_game("[key_name(user)] has put the MMI/posibrain of [key_name(B)] into [src] at [AREACOORD(src)]") return TRUE -/obj/mecha/container_resist(mob/living/user) +/obj/mecha/container_resist_act(mob/living/user) is_currently_ejecting = TRUE to_chat(occupant, "You begin the ejection procedure. Equipment is disabled during this process. Hold still to finish ejecting.") if(do_after(occupant, has_gravity() ? exit_delay : 0 , target = src)) diff --git a/code/game/mecha/mecha_actions.dm b/code/game/mecha/mecha_actions.dm index a3cdff769c6..2eae851d1b6 100644 --- a/code/game/mecha/mecha_actions.dm +++ b/code/game/mecha/mecha_actions.dm @@ -48,7 +48,7 @@ return if(!chassis || chassis.occupant != owner) return - chassis.container_resist(chassis.occupant) + chassis.container_resist_act(chassis.occupant) /datum/action/innate/mecha/mech_toggle_internals name = "Toggle Internal Airtank Usage" diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm index d9253a493db..6731e6bcfa7 100644 --- a/code/game/mecha/working/ripley.dm +++ b/code/game/mecha/working/ripley.dm @@ -174,7 +174,7 @@ output += "" return output -/obj/mecha/working/ripley/relay_container_resist(mob/living/user, obj/O) +/obj/mecha/working/ripley/relay_container_resist_act(mob/living/user, obj/O) to_chat(user, "You lean on the back of [O] and start pushing so it falls out of [src].") if(do_after(user, 300, target = O)) if(!user || user.stat != CONSCIOUS || user.loc != src || O.loc != src ) diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 4f672691273..cc968a6a6b0 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -243,7 +243,7 @@ icon_state = pick("cocoon1","cocoon2","cocoon3") . = ..() -/obj/structure/spider/cocoon/container_resist(mob/living/user) +/obj/structure/spider/cocoon/container_resist_act(mob/living/user) var/breakout_time = 600 user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index e2fa652abb8..b72954eac9b 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -69,7 +69,7 @@ R.foldedbag_instance = src moveToNullspace() -/obj/item/bodybag/bluespace/container_resist(mob/living/user) +/obj/item/bodybag/bluespace/container_resist_act(mob/living/user) if(user.incapacitated()) to_chat(user, "You can't get out while you're restrained like this!") return diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 50707e4e93d..a5a4f7f3ef4 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -121,7 +121,7 @@ ready = TRUE update_icon() -/obj/machinery/implantchair/container_resist(mob/living/user) +/obj/machinery/implantchair/container_resist_act(mob/living/user) user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("You see [user] kicking against the door of [src]!", \ diff --git a/code/game/objects/items/pet_carrier.dm b/code/game/objects/items/pet_carrier.dm index 57fe19f9561..75e1f271b6f 100644 --- a/code/game/objects/items/pet_carrier.dm +++ b/code/game/objects/items/pet_carrier.dm @@ -115,9 +115,9 @@ update_icon() return else if(user.client) - container_resist(user) + container_resist_act(user) -/obj/item/pet_carrier/container_resist(mob/living/user) +/obj/item/pet_carrier/container_resist_act(mob/living/user) user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT if(user.mob_size <= MOB_SIZE_SMALL) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index a6867e11d8a..262684e4e9a 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -170,9 +170,6 @@ return ui_interact(user) -/obj/proc/container_resist(mob/living/user) - return - /mob/proc/unset_machine() if(machine) machine.on_unset_machine(src) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index fbe2fe73096..1a11a1253a9 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -351,7 +351,7 @@ message_cooldown = world.time + 50 to_chat(user, "[src]'s door won't budge!") return - container_resist(user) + container_resist_act(user) /obj/structure/closet/attack_hand(mob/living/user) . = ..() @@ -396,14 +396,14 @@ return 0 return 1 -/obj/structure/closet/container_resist(mob/living/user) +/obj/structure/closet/container_resist_act(mob/living/user) if(opened) return if(ismovable(loc)) user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT var/atom/movable/AM = loc - AM.relay_container_resist(user, src) + AM.relay_container_resist_act(user, src) return if(!welded && !locked) open() diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 262cb9fa564..b76a67407b4 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -105,7 +105,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an recursive_organ_check(src) qdel(src) -/obj/structure/bodycontainer/container_resist(mob/living/user) +/obj/structure/bodycontainer/container_resist_act(mob/living/user) if(!locked) open() return diff --git a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm index b371c0f5436..b9c53ca22ad 100644 --- a/code/game/objects/structures/transit_tubes/transit_tube_pod.dm +++ b/code/game/objects/structures/transit_tubes/transit_tube_pod.dm @@ -72,7 +72,7 @@ if(current_size >= STAGE_FIVE) deconstruct(FALSE) -/obj/structure/transit_tube_pod/container_resist(mob/living/user) +/obj/structure/transit_tube_pod/container_resist_act(mob/living/user) if(!user.incapacitated()) empty_pod() return diff --git a/code/modules/antagonists/abductor/machinery/experiment.dm b/code/modules/antagonists/abductor/machinery/experiment.dm index 889a4c36a53..100c186ff20 100644 --- a/code/modules/antagonists/abductor/machinery/experiment.dm +++ b/code/modules/antagonists/abductor/machinery/experiment.dm @@ -41,7 +41,7 @@ message_cooldown = world.time + 50 to_chat(user, "[src]'s door won't budge!") -/obj/machinery/abductor/experiment/container_resist(mob/living/user) +/obj/machinery/abductor/experiment/container_resist_act(mob/living/user) user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("You see [user] kicking against the door of [src]!", \ diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index c6e8d784d72..9c2f1247b3e 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -302,7 +302,7 @@ ..(user) return occupant -/obj/machinery/atmospherics/components/unary/cryo_cell/container_resist(mob/living/user) +/obj/machinery/atmospherics/components/unary/cryo_cell/container_resist_act(mob/living/user) user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("You see [user] kicking against the glass of [src]!", \ diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm index 55a70812324..413ead35403 100644 --- a/code/modules/clothing/shoes/miscellaneous.dm +++ b/code/modules/clothing/shoes/miscellaneous.dm @@ -411,7 +411,7 @@ target.forceMove(src) to_chat(user, "[target] slithers into [src].") -/obj/item/clothing/shoes/cowboy/container_resist(mob/living/user) +/obj/item/clothing/shoes/cowboy/container_resist_act(mob/living/user) if(!do_after(user, 10, target = user)) return user.forceMove(user.drop_location()) diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 04248903157..7ce6592bb9a 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -54,7 +54,7 @@ /obj/machinery/gibber/attack_paw(mob/user) return attack_hand(user) -/obj/machinery/gibber/container_resist(mob/living/user) +/obj/machinery/gibber/container_resist_act(mob/living/user) go_out() /obj/machinery/gibber/relaymove(mob/living/user) diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index 3d2bf21ac37..e7dc449ec3c 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -140,7 +140,7 @@ empty() add_fingerprint(usr) -/obj/machinery/processor/container_resist(mob/living/user) +/obj/machinery/processor/container_resist_act(mob/living/user) user.forceMove(drop_location()) user.visible_message("[user] crawls free of the processor!") diff --git a/code/modules/mob/living/inhand_holder.dm b/code/modules/mob/living/inhand_holder.dm index d8e34bf031e..c1b608ab46e 100644 --- a/code/modules/mob/living/inhand_holder.dm +++ b/code/modules/mob/living/inhand_holder.dm @@ -69,7 +69,7 @@ /obj/item/clothing/head/mob_holder/relaymove(mob/user) release() -/obj/item/clothing/head/mob_holder/container_resist() +/obj/item/clothing/head/mob_holder/container_resist_act() release() /obj/item/clothing/head/mob_holder/drone/deposit(mob/living/L) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 624d6222843..a0935606b36 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -792,9 +792,8 @@ resist_buckle() //Breaking out of a container (Locker, sleeper, cryo...) - else if(isobj(loc)) - var/obj/C = loc - C.container_resist(src) + else if(loc) + loc.container_resist_act(src) else if(mobility_flags & MOBILITY_MOVE) if(on_fire) diff --git a/code/modules/recycling/disposal/bin.dm b/code/modules/recycling/disposal/bin.dm index db07523ef1a..d65f6419033 100644 --- a/code/modules/recycling/disposal/bin.dm +++ b/code/modules/recycling/disposal/bin.dm @@ -147,7 +147,7 @@ attempt_escape(user) // resist to escape the bin -/obj/machinery/disposal/container_resist(mob/living/user) +/obj/machinery/disposal/container_resist_act(mob/living/user) attempt_escape(user) /obj/machinery/disposal/proc/attempt_escape(mob/user) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index a58bb4ddb87..1dda3566a44 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -140,10 +140,10 @@ else return ..() -/obj/structure/big_delivery/relay_container_resist(mob/living/user, obj/O) +/obj/structure/big_delivery/relay_container_resist_act(mob/living/user, obj/O) if(ismovable(loc)) var/atom/movable/AM = loc //can't unwrap the wrapped container if it's inside something. - AM.relay_container_resist(user, O) + AM.relay_container_resist_act(user, O) return to_chat(user, "You lean on the back of [O] and start pushing to rip the wrapping around it.") if(do_after(user, 50, target = O)) diff --git a/code/modules/research/nanites/nanite_chamber.dm b/code/modules/research/nanites/nanite_chamber.dm index 73871777689..79712aa9b2a 100644 --- a/code/modules/research/nanites/nanite_chamber.dm +++ b/code/modules/research/nanites/nanite_chamber.dm @@ -144,7 +144,7 @@ open_machine() -/obj/machinery/nanite_chamber/container_resist(mob/living/user) +/obj/machinery/nanite_chamber/container_resist_act(mob/living/user) if(!locked) open_machine() return diff --git a/code/modules/research/nanites/public_chamber.dm b/code/modules/research/nanites/public_chamber.dm index 625f3cd7bee..210ace02ce4 100644 --- a/code/modules/research/nanites/public_chamber.dm +++ b/code/modules/research/nanites/public_chamber.dm @@ -124,7 +124,7 @@ open_machine() -/obj/machinery/public_nanite_chamber/container_resist(mob/living/user) +/obj/machinery/public_nanite_chamber/container_resist_act(mob/living/user) if(!locked) open_machine() return