diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 6df031ef3b4..35ff5cf2e35 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -158,6 +158,13 @@ RegisterSignal(owner, COMSIG_LIVING_IGNITED, PROC_REF(on_ignited)) RegisterSignal(owner, COMSIG_LIVING_EXTINGUISHED, PROC_REF(on_extinguished)) +/datum/status_effect/fleshmend/on_creation(mob/living/new_owner, ...) + . = ..() + if(!. || !owner || !linked_alert) + return + if(owner.on_fire) + linked_alert.icon_state = "fleshmend_fire" + /datum/status_effect/fleshmend/on_remove() UnregisterSignal(owner, list(COMSIG_LIVING_IGNITED, COMSIG_LIVING_EXTINGUISHED)) diff --git a/code/modules/antagonists/changeling/changeling_power.dm b/code/modules/antagonists/changeling/changeling_power.dm index 9ae7ac977be..96cad510735 100644 --- a/code/modules/antagonists/changeling/changeling_power.dm +++ b/code/modules/antagonists/changeling/changeling_power.dm @@ -82,7 +82,7 @@ the same goes for Remove(). if you override Remove(), call parent or else your p if(req_stat < user.stat) user.balloon_alert(user, "incapacitated!") return FALSE - if((HAS_TRAIT(user, TRAIT_DEATHCOMA)) && (!ignores_fakedeath)) + if(HAS_TRAIT(user, TRAIT_DEATHCOMA) && !ignores_fakedeath) user.balloon_alert(user, "playing dead!") return FALSE return TRUE diff --git a/code/modules/antagonists/changeling/powers/fakedeath.dm b/code/modules/antagonists/changeling/powers/fakedeath.dm index 8166e23f310..40a71f6ce84 100644 --- a/code/modules/antagonists/changeling/powers/fakedeath.dm +++ b/code/modules/antagonists/changeling/powers/fakedeath.dm @@ -20,7 +20,7 @@ build_all_button_icons(UPDATE_BUTTON_NAME|UPDATE_BUTTON_ICON) else to_chat(user, span_notice("We begin our stasis, preparing energy to arise once more.")) - user.fakedeath("changeling") //play dead + user.fakedeath(CHANGELING_TRAIT) //play dead addtimer(CALLBACK(src, PROC_REF(ready_to_regenerate), user), LING_FAKEDEATH_TIME, TIMER_UNIQUE) return TRUE @@ -28,7 +28,7 @@ if(!istype(user)) return - user.cure_fakedeath("changeling") + user.cure_fakedeath(CHANGELING_TRAIT) // Heal all damage and some minor afflictions, var/flags_to_heal = (HEAL_DAMAGE|HEAL_BODY|HEAL_STATUS|HEAL_CC_STATUS) // but leave out limbs so we can do it specially @@ -57,20 +57,31 @@ return to_chat(user, span_notice("We are ready to revive.")) - build_all_button_icons(UPDATE_BUTTON_NAME|UPDATE_BUTTON_ICON) chemical_cost = 0 revive_ready = TRUE + build_all_button_icons(UPDATE_BUTTON_NAME|UPDATE_BUTTON_ICON) /datum/action/changeling/fakedeath/can_sting(mob/living/user) - if(HAS_TRAIT_FROM(user, TRAIT_DEATHCOMA, "changeling") && !revive_ready) - user.balloon_alert(user, "already reviving!") + if(revive_ready) + return ..() + + if(!can_enter_stasis(user)) return - if(!user.stat && !revive_ready) //Confirmation for living changelings if they want to fake their death - switch(tgui_alert(usr,"Are we sure we wish to fake our own death?", "Feign Death", list("Yes", "No"))) - if("No") - return + //Confirmation for living changelings if they want to fake their death + if(user.stat != DEAD) + if(tgui_alert(user, "Are we sure we wish to fake our own death?", "Feign Death", list("Yes", "No")) != "Yes") + return + if(QDELETED(user) || QDELETED(src) || !can_enter_stasis(user)) + return + return ..() +/datum/action/changeling/fakedeath/proc/can_enter_stasis(mob/living/user) + if(HAS_TRAIT_FROM(user, TRAIT_DEATHCOMA, CHANGELING_TRAIT)) + user.balloon_alert(user, "already reviving!") + return FALSE + return TRUE + /datum/action/changeling/fakedeath/update_button_name(atom/movable/screen/movable/action_button/button, force) if(revive_ready) name = "Revive"