Fox update

This commit is contained in:
Kyep
2019-03-12 19:05:19 -07:00
parent 6c3fc730a8
commit db6484b027
3 changed files with 18 additions and 20 deletions
+4 -20
View File
@@ -181,19 +181,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
warningmsg = "You have committed suicide too early in the round"
else if(stat != DEAD)
warningmsg = "You are alive"
if(isAI(src))
warningmsg = "You are a living AI! You should probably use OOC -> Wipe Core instead."
else if(GLOB.non_respawnable_keys[ckey])
warningmsg = "You have lost your right to respawn"
if(stat == CONSCIOUS)
if(isAI(src))
to_chat(src, "<span class='userdanger'>AIs cannot ghost while alive. If you must leave the round, use OOC -> Wipe Core instead.</span>")
return
if(sees_someone_nearby())
to_chat(src, "<span class='userdanger'>You cannot ghost while alive with another player nearby. Go somewhere more secluded first.</span>")
return
if(warningmsg)
var/response
var/alertmsg = "Are you -sure- you want to ghost?\n([warningmsg]. If you ghost now, you probably won't be able to rejoin the round! You can't change your mind, so choose wisely!)"
@@ -201,15 +193,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(response != "Ghost")
return
var/move_to_cryo = ishuman(src) && stat == CONSCIOUS && !P && !restrained()
if(move_to_cryo)
if(!do_after(src, 600, 0, target = src))
return
if(restrained())
move_to_cryo = FALSE
if(stat == CONSCIOUS)
player_ghosted = 1
if(move_to_cryo)
cryo_ssd(src)
if(warningmsg)
// Not respawnable
var/mob/dead/observer/ghost = ghostize(0) // 0 parameter stops them re-entering their body
@@ -217,8 +203,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
else
// Respawnable
ghostize(1)
if(move_to_cryo)
force_cryo_human(src)
// If mob in morgue tray, update tray
var/obj/structure/morgue/Morgue = locate() in M.loc
@@ -39,6 +39,17 @@
if(life_tick == 1)
regenerate_icons() // Make sure the inventory updates
handle_ghosted()
/mob/living/carbon/human/proc/handle_ghosted()
if(player_ghosted > 0 && stat == CONSCIOUS && !restrained())
if(key)
player_ghosted = 0
else
player_ghosted++
if(player_ghosted % 150 == 0)
force_cryo_human(src)
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
..()
var/pressure_difference = abs( pressure - ONE_ATMOSPHERE )
+3
View File
@@ -173,6 +173,9 @@
//SSD var, changed it up some so people can have special things happen for different mobs when SSD.
var/player_logged = 0
//Ghosted var, set only if a player has manually ghosted out of this mob.
var/player_ghosted = 0
var/turf/listed_turf = null //the current turf being examined in the stat panel
var/list/shouldnt_see = list(/atom/movable/lighting_overlay) //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes