mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-26 14:31:59 +01:00
Allows admins to override respawning failure (#10401)
This commit is contained in:
@@ -124,7 +124,7 @@
|
||||
|
||||
if(!check_rights(R_ADMIN, TRUE))
|
||||
return
|
||||
|
||||
|
||||
var/list/mob/message_mobs = list()
|
||||
var/choice = alert(usr, "Local narrate will send a plain message to mobs. Do you want the mobs messaged to be only ones that you can see, or ignore blocked vision and message everyone within seven tiles of you?", "Narrate Selection", "In my view", "In range of me", "Cancel")
|
||||
if(choice != "Cancel")
|
||||
@@ -285,7 +285,7 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
|
||||
/client/proc/allow_character_respawn()
|
||||
set category = "Special Verbs"
|
||||
set name = "Allow player to respawn"
|
||||
set desc = "Let's the player bypass the 30 minute wait to respawn or allow them to re-enter their corpse."
|
||||
set desc = "Lets the player bypass the wait to respawn or allow them to re-enter their corpse."
|
||||
if(!holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
var/list/ghosts = get_ghosts(1,1,src)
|
||||
@@ -313,15 +313,15 @@ proc/get_ghosts(var/notify = 0,var/what = 2, var/client/C = null)
|
||||
to_chat(src, "Something went wrong, couldn't find the target's preferences datum")
|
||||
return 0
|
||||
|
||||
for (var/entry in P.time_of_death)//Set all the prefs' times of death to a huge negative value so any respawn timers will be fine
|
||||
for (var/entry in P.time_of_death) //Set all the prefs' times of death to a huge negative value so any respawn timers will be fine
|
||||
P.time_of_death[entry] = -99999
|
||||
|
||||
G.has_enabled_antagHUD = 2
|
||||
G.can_reenter_corpse = 1
|
||||
|
||||
G:show_message(text("<span class='notice'><B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B></span>"), 1)
|
||||
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the 30 minute respawn limit",admin_key=key_name(usr),ckey=key_name(G))
|
||||
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the 30 minute respawn limit", 1)
|
||||
G:show_message(text("<span class='notice'><B>You may now respawn. You should roleplay as if you learned nothing about the round during your time with the dead.</B></span>"), 1)
|
||||
log_admin("[key_name(usr)] allowed [key_name(G)] to bypass the [config.respawn_delay] minute respawn limit", admin_key=key_name(usr), ckey=key_name(G))
|
||||
message_admins("Admin [key_name_admin(usr)] allowed [key_name_admin(G)] to bypass the [config.respawn_delay] minute respawn limit", 1)
|
||||
|
||||
/client/proc/allow_stationbound_reset(mob/living/silicon/robot/R in range(world.view))
|
||||
set category = "Special Verbs"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
author: Amunak
|
||||
delete-after: True
|
||||
changes:
|
||||
- admin: "Admins can now override a Respawn verb failure for themselves without calling Allow-Player-To-Respawn first."
|
||||
Reference in New Issue
Block a user