From 7a1f3dcdba5718875000a75647de71e1ce24fbc8 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 15 Nov 2019 23:14:28 +0100 Subject: [PATCH 1/2] Fixing the ghost roles/mid-round antag lock out suicide/cryo refactor. --- code/modules/mob/dead/observer/observer.dm | 7 +++---- config/game_options.txt | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index b323f13362..8ea295c6c4 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -306,7 +306,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(stat == DEAD) ghostize(1) else - var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty != CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! 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(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! 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 if(istype(loc, /obj/machinery/cryopod)) @@ -331,7 +331,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(penalty + world.realtime - SSshuttle.realtimeofstart > SSshuttle.auto_call + SSshuttle.emergencyCallTime + SSshuttle.emergencyDockTime + SSshuttle.emergencyEscapeTime) penalty = CANT_REENTER_ROUND - var/response = alert(src, "Are you -sure- you want to ghost?\n(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty != CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! 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(You are alive. If you ghost whilst alive you won't be able to re-enter this round [penalty ? "or play ghost roles [penalty == CANT_REENTER_ROUND ? "until the round is over" : "for the next [DisplayTimeText(penalty)]"]" : ""]! You can't change your mind so choose wisely!!)","Are you sure you want to ghost?","Ghost","Stay in body") if(response != "Ghost") return ghostize(0, penalize = TRUE) @@ -629,8 +629,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set name = "Possess!" set desc= "Take over the body of a mindless creature!" - if(reenter_round_timeout > world.realtime) - to_chat(src, "You are unable to re-enter the round yet. Your ghost role blacklist will expire in [DisplayTimeText(reenter_round_timeout - world.realtime)].") + if(!can_reenter_round()) return FALSE var/list/possessible = list() diff --git a/config/game_options.txt b/config/game_options.txt index 93fd00446b..ad5b148002 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -627,13 +627,13 @@ MIDROUND_ANTAG_LIFE_CHECK 0.7 ## during which the player shouldn't be able to come back through ## midround playable roles or mob spawners. ## Set to 0 to completely disable it. -SUICIDE_REENTER_ROUND_TIMER 18000 +SUICIDE_REENTER_ROUND_TIMER 30 ## A time, in real-time deciseconds, below which the player receives ## a timed penalty, for purposes similar to the aforementioned one (can also stack) ## and equal to this config difference with world.time. ## Both configs are indipendent from each other, disabling one won't affect the other. -ROUNDSTART_SUICIDE_TIME_LIMIT 18000 +ROUNDSTART_SUICIDE_TIME_LIMIT 30 ##Limit Spell Choices## ## Uncomment to disallow wizards from using certain spells that may be too chaotic/fun for your playerbase From d0580e8ecbeff8711237f1d3f836e22452de41e9 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Fri, 15 Nov 2019 23:32:46 +0100 Subject: [PATCH 2/2] Comments were awful. --- config/game_options.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/game_options.txt b/config/game_options.txt index ad5b148002..77cc3e0df2 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -623,15 +623,15 @@ MIDROUND_ANTAG_TIME_CHECK 60 ## A ratio of living to total crew members, the lower this is, the more people will have to die in order for midround antag to be skipped MIDROUND_ANTAG_LIFE_CHECK 0.7 -## A time, in real-time deciseconds, applied upon suicide, cryosleep or ghosting whilst alive -## during which the player shouldn't be able to come back through +## A "timeout", in real-time minutes, applied upon suicide, cryosleep or ghosting whilst alive, +## during which the player shouldn't be able to come back into the round through ## midround playable roles or mob spawners. ## Set to 0 to completely disable it. SUICIDE_REENTER_ROUND_TIMER 30 -## A time, in real-time deciseconds, below which the player receives -## a timed penalty, for purposes similar to the aforementioned one (can also stack) -## and equal to this config difference with world.time. +## A world time threshold, in minutes, under which the player receives +## an extra timeout, purposely similar to the above one (and also stacks with), +## equal to the difference between the current world.time and this threshold. ## Both configs are indipendent from each other, disabling one won't affect the other. ROUNDSTART_SUICIDE_TIME_LIMIT 30