From b00a1dd30957eda17f71baf0d315e98b52ab53f6 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 16 Aug 2020 15:43:27 +0200 Subject: [PATCH] [MIRROR] fixes freon status effect never un-immobilizing victims (#361) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update gas.dm (#52957) About The Pull Request one of the overrides wasn't called i removed the double override and just combined them (hopefully in the right order) Why It's Good For The Game no need to override twice in one file Changelog 🆑 fix: freon should not have you stuck immobilized anymore /🆑 * fixes freon status effect never un-immobilizing victims Co-authored-by: silicons <2003111+silicons@users.noreply.github.com> --- code/datums/status_effects/gas.dm | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/code/datums/status_effects/gas.dm b/code/datums/status_effects/gas.dm index 78ceaf3bd87..1be7fffc104 100644 --- a/code/datums/status_effects/gas.dm +++ b/code/datums/status_effects/gas.dm @@ -6,29 +6,22 @@ var/icon/cube var/can_melt = TRUE -/datum/status_effect/freon/on_apply() - . = ..() - if(!.) - return - ADD_TRAIT(owner, TRAIT_IMMOBILIZED, TRAIT_STATUS_EFFECT(id)) - -/datum/status_effect/freon/on_remove() - REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, TRAIT_STATUS_EFFECT(id)) - return ..() - /obj/screen/alert/status_effect/freon name = "Frozen Solid" desc = "You're frozen inside an ice cube, and cannot move! You can still do stuff, like shooting. Resist out of the cube!" icon_state = "frozen" /datum/status_effect/freon/on_apply() + . = ..() + if(!.) + return + ADD_TRAIT(owner, TRAIT_IMMOBILIZED, TRAIT_STATUS_EFFECT(id)) RegisterSignal(owner, COMSIG_LIVING_RESIST, .proc/owner_resist) if(!owner.stat) to_chat(owner, "You become frozen in a cube!") cube = icon('icons/effects/freeze.dmi', "ice_cube") owner.add_overlay(cube) owner.update_mobility() - return ..() /datum/status_effect/freon/tick() owner.update_mobility() @@ -50,6 +43,8 @@ owner.adjust_bodytemperature(100) owner.update_mobility() UnregisterSignal(owner, COMSIG_LIVING_RESIST) + REMOVE_TRAIT(owner, TRAIT_IMMOBILIZED, TRAIT_STATUS_EFFECT(id)) + return ..() /datum/status_effect/freon/watcher duration = 8