modifications
This commit is contained in:
@@ -7,6 +7,11 @@
|
||||
config_entry_value = 15.0
|
||||
integer = FALSE
|
||||
|
||||
/// Minutes before allowing respawn, if user cryo'd.
|
||||
/datum/config_entry/number/respawn_delay_cryo
|
||||
config_entry_value = 5.0
|
||||
integer = FALSE
|
||||
|
||||
/// Allows respawning as non-assistant. Overrides all others of this type.
|
||||
/datum/config_entry/flag/allow_non_assistant_respawn
|
||||
config_entry_value = FALSE
|
||||
|
||||
@@ -383,7 +383,7 @@
|
||||
|
||||
// Ghost and delete the mob.
|
||||
if(!mob_occupant.get_ghost(1))
|
||||
mob_occupant.ghostize(FALSE, penalize = TRUE, voluntary = TRUE)
|
||||
mob_occupant.ghostize(FALSE, penalize = TRUE, voluntary = TRUE, cryo = TRUE)
|
||||
|
||||
QDEL_NULL(occupant)
|
||||
QDEL_LIST(destroy_later)
|
||||
|
||||
@@ -1805,12 +1805,15 @@
|
||||
if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
|
||||
message_admins("[key_name(usr)] has sent [key_name(M)] back to the Lobby.")
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby, removing their respawn restrictions if they existed.")
|
||||
message_admins("[key_name(usr)] has sent [key_name(M)] back to the Lobby, removing their respawn restrictions if they existed.")
|
||||
|
||||
var/mob/dead/new_player/NP = new()
|
||||
NP.ckey = M.ckey
|
||||
qdel(M)
|
||||
if(GLOB.preferences_datums[NP.ckey])
|
||||
var/datum/preferences/P = GLOB.preferences_datums[NP.ckey]
|
||||
P.respawn_restrictions_active = FALSE
|
||||
|
||||
else if(href_list["tdome1"])
|
||||
if(!check_rights(R_FUN))
|
||||
|
||||
@@ -31,6 +31,8 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/respawn_time_of_death = -INFINITY
|
||||
/// did they DNR? used to prevent respawns.
|
||||
var/dnr_triggered = FALSE
|
||||
/// did they cryo on their last ghost?
|
||||
var/respawn_did_cryo = FALSE
|
||||
|
||||
// Intra-round persistence end
|
||||
|
||||
|
||||
@@ -264,7 +264,7 @@ Transfer_mind is there to check if mob is being deleted/not going to have a body
|
||||
Works together with spawning an observer, noted above.
|
||||
*/
|
||||
|
||||
/mob/proc/ghostize(can_reenter_corpse = TRUE, special = FALSE, penalize = FALSE, voluntary = FALSE)
|
||||
/mob/proc/ghostize(can_reenter_corpse = TRUE, special = FALSE, penalize = FALSE, voluntary = FALSE, cryo = FALSE)
|
||||
var/sig_flags = SEND_SIGNAL(src, COMSIG_MOB_GHOSTIZE, can_reenter_corpse, special, penalize)
|
||||
penalize = !(sig_flags & COMPONENT_DO_NOT_PENALIZE_GHOSTING) && (suiciding || penalize) // suicide squad.
|
||||
voluntary_ghosted = voluntary
|
||||
@@ -282,6 +282,7 @@ Works together with spawning an observer, noted above.
|
||||
if(P)
|
||||
P.respawn_restrictions_active = TRUE
|
||||
P.respawn_time_of_death = world.time
|
||||
P.respawn_did_cryo = cryo
|
||||
transfer_ckey(ghost, FALSE)
|
||||
ghost.client.init_verbs()
|
||||
if(penalize)
|
||||
|
||||
@@ -18,7 +18,10 @@
|
||||
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]
|
||||
if(!valid.len)
|
||||
to_chat(src, "<span class='warning'>No player found that is either a ghost or is in lobby with restrictions active.</span>")
|
||||
return
|
||||
var/ckey = valid[input(src, "Choose a player (only showing logged in players who have restrictions)", "Unrestricted Respawn") as null|anything in valid
|
||||
var/client/player = GLOB.directory[ckey]
|
||||
if(!player)
|
||||
to_chat(src, "<span class='warning'>Client not found.</span>")
|
||||
@@ -60,7 +63,11 @@
|
||||
if(!I.client)
|
||||
continue
|
||||
valid["[I.ckey] - [I.name]"] = I
|
||||
var/mob/dead/observer/O = valid[input(src, "Choose a player (only showing logged in)", "Remove Respawn Timer") as null|anything in valid]
|
||||
|
||||
if(!valid.len)
|
||||
to_chat(src, "<span class='warning'>No logged in ghosts found.</span>")
|
||||
return
|
||||
var/mob/dead/observer/O = valid[input(src, "Choose a player (only showing logged in)", "Remove Respawn Timer") as null|anything in valid
|
||||
|
||||
if(!O.client)
|
||||
to_chat(src, "<span class='warning'>[O] has no client.</span>")
|
||||
@@ -126,7 +133,7 @@
|
||||
*/
|
||||
/mob/dead/observer/verb/time_left_to_respawn()
|
||||
ASSERT(client)
|
||||
return max(0, (CONFIG_GET(number/respawn_delay) MINUTES + client.prefs.respawn_time_of_death) - world.time)
|
||||
return max(0, ((client.prefs.respawn_did_cryo? CONFIG_GET(number/respawn_delay_cryo) : CONFIG_GET(number/respawn_delay)) MINUTES + client.prefs.respawn_time_of_death) - world.time)
|
||||
|
||||
/**
|
||||
* Handles respawning
|
||||
|
||||
@@ -4,6 +4,9 @@ RESPAWNS_ENABLED
|
||||
## Minutes delay before allowing respawns, either from death or observing. Not an integer.
|
||||
RESPAWN_DELAY 15.0
|
||||
|
||||
## Minutes delay before allowing respawns, if the user cryo'd. Not an integer.
|
||||
RESPAWN_DELAY_CRYO 5.0
|
||||
|
||||
## Allow respawning as anything but an assistant.
|
||||
ALLOW_NON_ASSISTANT_RESPAWN
|
||||
|
||||
|
||||
Reference in New Issue
Block a user