mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Allows admins to override respawning failure (#10401)
This commit is contained in:
@@ -888,7 +888,7 @@ mob/abstract/observer/MayRespawn(var/feedback = 0, var/respawn_type = null)
|
||||
var/timedifference = world.time- get_death_time(respawn_type)
|
||||
var/respawn_time = 0
|
||||
if (respawn_type == CREW)
|
||||
respawn_time = config.respawn_delay *600
|
||||
respawn_time = config.respawn_delay MINUTES
|
||||
else if (respawn_type == ANIMAL)
|
||||
respawn_time = RESPAWN_ANIMAL
|
||||
else if (respawn_type == MINISYNTH)
|
||||
|
||||
+23
-18
@@ -451,30 +451,35 @@
|
||||
if (!client)
|
||||
return//This shouldnt happen
|
||||
|
||||
var/failure = null
|
||||
if (!( config.abandon_allowed ))
|
||||
to_chat(usr, "<span class='notice'>Respawn is disabled.</span>")
|
||||
return
|
||||
if (stat != DEAD)
|
||||
to_chat(usr, "<span class='notice'><B>You must be dead to use this!</B></span>")
|
||||
return
|
||||
if (SSticker.mode && SSticker.mode.deny_respawn) //BS12 EDIT
|
||||
to_chat(usr, "<span class='notice'>Respawn is disabled for this roundtype.</span>")
|
||||
return
|
||||
failure = "Respawn is disabled."
|
||||
else if (stat != DEAD)
|
||||
failure = "You must be dead to use this!"
|
||||
else if (SSticker.mode && SSticker.mode.deny_respawn)
|
||||
failure = "Respawn is disabled for this roundtype."
|
||||
else if(!MayRespawn(1, CREW))
|
||||
return
|
||||
failure = ""
|
||||
|
||||
if(!isnull(failure))
|
||||
if(check_rights(R_ADMIN, show_msg = FALSE))
|
||||
if(failure == "")
|
||||
failure = "You are not allowed to respawn."
|
||||
if(alert(failure + " Override?", "Respawn not allowed", "Yes", "Cancel") != "Yes")
|
||||
return
|
||||
log_admin("[key_name(usr)] bypassed respawn restrictions (they failed with message \"[failure]\").", admin_key=key_name(usr))
|
||||
else
|
||||
if(failure != "")
|
||||
to_chat(usr, SPAN_DANGER(failure))
|
||||
return
|
||||
|
||||
to_chat(usr, "You can respawn now, enjoy your new life!")
|
||||
|
||||
log_game("[usr.name]/[usr.key] used abandon mob.",ckey=key_name(usr))
|
||||
|
||||
log_game("[usr.name]/[usr.key] used abandon mob.", ckey=key_name(usr))
|
||||
to_chat(usr, "<span class='notice'><B>Make sure to play a different character, and please roleplay correctly!</B></span>")
|
||||
|
||||
client?.screen.Cut()
|
||||
if(!client)
|
||||
log_game("[usr.key] AM failed due to disconnect.",ckey=key_name(usr))
|
||||
return
|
||||
client.screen.Cut()
|
||||
if(!client)
|
||||
log_game("[usr.key] AM failed due to disconnect.",ckey=key_name(usr))
|
||||
log_game("[usr.key] AM failed due to disconnect.", ckey=key_name(usr))
|
||||
return
|
||||
|
||||
announce_ghost_joinleave(client, 0)
|
||||
@@ -486,7 +491,7 @@
|
||||
M.reset_death_timers()
|
||||
|
||||
if(!client)
|
||||
log_game("[usr.key] AM failed due to disconnect.",ckey=key_name(usr))
|
||||
log_game("[usr.key] AM failed due to disconnect.", ckey=key_name(usr))
|
||||
qdel(M)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user