Ensure the fake death power checks the status again after input (#22943)

This commit is contained in:
Farie82
2023-10-17 15:27:06 -05:00
committed by GitHub
parent 074959da06
commit e6c598e1c1
@@ -35,4 +35,10 @@
switch(alert("Are we sure we wish to fake our death?",,"Yes","No"))
if("No")
return FALSE
// Do the checks again since we had user input
if(cling.owner != user.mind)
return FALSE
if(HAS_TRAIT(user, TRAIT_FAKEDEATH))
to_chat(user, "<span class='warning'>We are already regenerating.</span>")
return FALSE
return ..()