This commit is contained in:
silicons
2020-12-12 11:19:45 -07:00
parent 24c09edd03
commit 07d8e72125
6 changed files with 17 additions and 42 deletions
+2 -2
View File
@@ -679,8 +679,8 @@
set category = "Server"
set desc="Respawn basically"
set name="Toggle Respawn"
var/new_nores = !CONFIG_GET(flag/norespawn)
CONFIG_SET(flag/norespawn, new_nores)
var/new_nores = CONFIG_GET(flag/respawns_enabled)
CONFIG_SET(flag/respawns_enabled, !new_nores)
if (!new_nores)
to_chat(world, "<B>You may now respawn.</B>", confidential = TRUE)
else
@@ -449,8 +449,8 @@
GLOB.joined_player_list += character.ckey
GLOB.latejoiners += character
LAZYOR(prefs.slots_joined_as, prefs.slot)
LAZYOR(prefs.characters_joined_as, character.real_name))
LAZYOR(character.client.prefs.slots_joined_as, prefs.slot)
LAZYOR(character.client.prefs.characters_joined_as, character.real_name)
if(CONFIG_GET(flag/allow_latejoin_antagonists) && humanc) //Borgs aren't allowed to be antags. Will need to be tweaked if we get true latejoin ais.
if(SSshuttle.emergency)
+7 -36
View File
@@ -15,7 +15,7 @@
continue
valid["[I.ckey] - Observing: [I]"] = I.ckey
for(var/mob/dead/new_player/I in GLOB.dead_mob_list)
if(!I.client || !I.prefs.respawn_restrictions_active)
if(!I.client || !I.client.prefs.respawn_restrictions_active)
continue
valid["[I.ckey] - IN LOBBY"] = I.ckey
var/ckey = valid[input(src, "Choose a player (only showing logged in players who have restrictions)", "Unrestricted Respawn") as null|anything in valid]
@@ -39,7 +39,7 @@
if(confirm != "Yes")
return
message_admins("[key_name_admin(src)] removed [ckey]'s respawn restrictions.")
log_admins("[key_name(src)] removed [ckey]'s respawn restrictions")
log_admin("[key_name(src)] removed [ckey]'s respawn restrictions")
NP.client.prefs.respawn_restrictions_active = FALSE
to_chat(NP, "<span class='boldnotie'>Your respawn restrictions have been removed.")
else
@@ -54,7 +54,7 @@
set category = "Admin"
var/list/mob/dead/observer/valid = list()
for(var/mob/dead/observer/i in GLOB.dead_mob_list)
for(var/mob/dead/observer/I in GLOB.dead_mob_list)
if(!I.client)
continue
valid["[I.ckey] - [I.name]"] = I
@@ -99,6 +99,10 @@
set name = "Respawn"
set category = "OOC"
if(!CONFIG_GET(flag/respawns_enabled))
to_chat(src, "<span class='warning'>Respawns are disabled in configuration.</span>")
return
var/timeleft = time_left_to_respawn()
if(timeleft)
to_chat(src, "<span class='warning'>It's been too short of a time since you died/observed! Please wait [round(timeleft / 600, 0.1)] more minutes.</span>")
@@ -145,36 +149,3 @@
var/mob/dead/new_player/M = new /mob/dead/new_player
M.ckey = ckey
/mob/verb/abandon_mob()
set name = "Respawn"
set category = "OOC"
if (CONFIG_GET(flag/norespawn))
return
if ((stat != DEAD || !( SSticker )))
to_chat(usr, "<span class='boldnotice'>You must be dead to use this!</span>")
return
log_game("[key_name(usr)] used abandon mob.")
to_chat(usr, "<span class='boldnotice'>Please roleplay correctly!</span>")
if(!client)
log_game("[key_name(usr)] AM failed due to disconnect.")
return
client.screen.Cut()
client.screen += client.void
if(!client)
log_game("[key_name(usr)] AM failed due to disconnect.")
return
var/mob/dead/new_player/M = new /mob/dead/new_player()
if(!client)
log_game("[key_name(usr)] AM failed due to disconnect.")
qdel(M)
return
M.key = key
// M.Login() //wat
return
+4
View File
@@ -66,6 +66,10 @@
GLOB.alive_mob_list -= src
if(!gibbed)
GLOB.dead_mob_list += src
if(mind.key)
var/datum/preferences/P = GLOB.preferences_datums[ckey(mind.key)]
if(P)
P.respawn_time_of_death = world.time
set_drugginess(0)
set_disgust(0)
SetSleeping(0, 0)