Rearranges and adds user check to ghost spawners. (#54684)

This commit is contained in:
skoglol
2020-11-08 16:38:39 -08:00
committed by GitHub
parent 8fb08e587a
commit 22dbf0ed23
+3 -4
View File
@@ -40,6 +40,9 @@
/obj/effect/mob_spawn/attack_ghost(mob/user)
if(!SSticker.HasRoundStarted() || !loc || !ghost_usable)
return
var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be revived!)",,"Yes","No")
if(ghost_role == "No" || !loc || QDELETED(user))
return
if(!(GLOB.ghost_role_flags & GHOSTROLE_SPAWNER) && !(flags_1 & ADMIN_SPAWNED_1))
to_chat(user, "<span class='warning'>An admin has temporarily disabled non-admin ghost roles!</span>")
return
@@ -53,10 +56,6 @@
return
if(QDELETED(src) || QDELETED(user))
return
var/ghost_role = alert("Become [mob_name]? (Warning, You can no longer be revived!)",,"Yes","No")
if(ghost_role == "No" || !loc)
return
log_game("[key_name(user)] became [mob_name]")
create(ckey = user.ckey)