mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
Ensures some ling ability icon always update correctly, Fixes a potential input stall in Revival Stasis (#73616)
## About The Pull Request - For Fleshmend, on apply kinda happens before alerts are made, so using Fleshmend when you're on fire wouldn't make the alert the "you're on fire" alert. - For Revival Stasis, I think I just missed an update call? Which made it not update on occasion. - I also patched a potential issue with input stalling on Revival Stasis while here. ## Changelog 🆑 Melbert fix: Using Fleshmend while on fire gives the "on fire" fleshmend icon. fix: Using Revival stasis more accurately updates the icon where relevant fix: Fixes a potential input stall with revival stasis /🆑
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user