mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-02-03 21:09:37 +00:00
[MIRROR] Rearranges and adds user check to ghost spawners. (#1643)
* Rearranges and adds user check to ghost spawners. (#54684) * Rearranges and adds user check to ghost spawners. Co-authored-by: skoglol <33292112+kriskog@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user