Part 1 - Respawning every 30mins.

Allow people to respawn (return to the menu) every 30mins after death, or ghost.

To do- option to user ban respawns, and stop respawns on certain antags/roles.
This commit is contained in:
QuoteFox
2020-09-25 15:51:49 +01:00
parent fc4c7c3bc0
commit 1d5cf4bde1
6 changed files with 22 additions and 5 deletions

View File

@@ -222,9 +222,9 @@
if(!..())
return
if(IsStun() || IsKnockdown()) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
to_chat(src, "You can't commit suicide while stunned! ((You can type Ghost instead however.))")
to_chat(src, "You can't commit suicide while stunned!")
return
if(restrained())
to_chat(src, "You can't commit suicide while restrained! ((You can type Ghost instead however.))")
to_chat(src, "You can't commit suicide while restrained!")
return
return TRUE

View File

@@ -269,6 +269,7 @@ Works together with spawning an observer, noted above.
ghost.can_reenter_corpse = can_reenter_corpse
ghost.can_reenter_round = (can_reenter_corpse && !suiciding)
ghost.key = key
ghost.client.lastrespawn = world.time + 1800 SECONDS
return ghost
/*
@@ -282,8 +283,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
// CITADEL EDIT
if(istype(loc, /obj/machinery/cryopod))
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you won't be able to re-enter this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
var/response = alert(src, "Are you -sure- you want to ghost?\n(If you ghost now, you will have to wait 30 minutes before you are able to respawn!)","Are you sure you want to ghost?","Ghost","Stay in body")
if(response != "Ghost")//darn copypaste
client.lastrespawn = world.time + 1800 SECONDS //set respawn time
return
var/obj/machinery/cryopod/C = loc
C.despawn_occupant()
@@ -295,11 +297,16 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(stat == DEAD)
ghostize(1)
else
//Low RP, removing.
/*
var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst still alive you won't be able to re-enter this round! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body")
if(response != "Ghost")
return //didn't want to ghost after-all
ghostize(0) //0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3
suicide_log(TRUE)
*/
to_chat(usr, "<span class='boldnotice'>You cannot ghost, if you wish to remove yourself from the round, please locate a cryogenic freezer.</span>")
message_admins("[usr] attempted to ghost.")
/mob/camera/verb/ghost()
set category = "OOC"

View File

@@ -84,6 +84,7 @@
if (client)
client.move_delay = initial(client.move_delay)
client.lastrespawn = world.time + 1800 SECONDS //on death, 30 min respawn time.
for(var/s in ownedSoullinks)
var/datum/soullink/S = s

View File

@@ -423,9 +423,15 @@
to_chat(usr, "<span class='boldnotice'>You must be dead to use this!</span>")
return
if(usr.client.lastrespawn <= world.time)
usr.client.lastrespawn = world.time + 1800 SECONDS
else
to_chat(usr, "<span class='warning'>You must wait [DisplayTimeText(usr.client.lastrespawn - world.time)] before respawning!</span>")
return
log_game("[key_name(usr)] used abandon mob.")
to_chat(usr, "<span class='boldnotice'>Please roleplay correctly!</span>")
to_chat(usr, "<span class='boldnotice'>Please roleplay correctly, do not meta-game, and use information from a different character or characters, to influence your actions!</span>")
if(!client)
log_game("[key_name(usr)] AM failed due to disconnect.")
@@ -442,6 +448,7 @@
qdel(M)
return
message_admins("[client.ckey] respawned.")
M.key = key
// M.Login() //wat
return
@@ -530,7 +537,7 @@
/mob/proc/is_muzzled()
return 0
/mob/Stat()
..()