From d7bca48557435cb6491a440c7085683627f66afd Mon Sep 17 00:00:00 2001 From: Incoming Date: Wed, 21 Jan 2015 17:35:45 -0500 Subject: [PATCH 1/3] Shuttle stranding: Removes fake recalls, the shuttle will arrive in rounds that usually would not allow shuttles (rev, malf, blob) but when the time comes for the shuttle to leave, it simply won't. What this does: -It gives a bonus ~8 minute delay to antag discovery on shuttle calls -It punishes crews that call the shuttle at first sign of danger by: --Rev: having the heads/potential converts huddle in predictable locations --Blob/Malf: Distracting focus from the antag -Gives a nice little OH SHIT moment when the shuttle doesn't launch Essentially this turns shuttle calls into something you wouldn't attempt without confirmation of the round type, which is the opposite of how it functions currently. Malf AIs also gain the ability to recall the shuttle to avoid the hard tell if they prefer. --- code/__DEFINES/stat.dm | 5 +++-- code/controllers/subsystem/shuttles.dm | 5 ++++- code/controllers/subsystem/shuttles/emergency.dm | 12 ++++-------- code/game/gamemodes/blob/blob.dm | 2 +- code/game/gamemodes/malfunction/malfunction.dm | 5 +++-- code/game/gamemodes/revolution/revolution.dm | 4 ++-- code/game/gamemodes/sandbox/sandbox.dm | 2 +- code/game/machinery/status_display.dm | 3 +++ code/modules/mob/living/silicon/ai/ai.dm | 2 +- code/modules/mob/mob.dm | 2 ++ 10 files changed, 24 insertions(+), 18 deletions(-) diff --git a/code/__DEFINES/stat.dm b/code/__DEFINES/stat.dm index 5c68c8a5c0e..2b1cffb297f 100644 --- a/code/__DEFINES/stat.dm +++ b/code/__DEFINES/stat.dm @@ -30,5 +30,6 @@ #define SHUTTLE_RECALL 1 #define SHUTTLE_CALL 2 #define SHUTTLE_DOCKED 3 -#define SHUTTLE_ESCAPE 4 -#define SHUTTLE_ENDGAME 5 +#define SHUTTLE_STRANDED 4 +#define SHUTTLE_ESCAPE 5 +#define SHUTTLE_ENDGAME 6 diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index d492e160170..f4f1d88dd65 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -15,7 +15,7 @@ var/datum/subsystem/shuttle/SSshuttle var/emergencyDockTime = 1800 //time taken for emergency shuttle to leave again once it has docked (in deciseconds) var/emergencyEscapeTime = 1200 //time taken for emergency shuttle to reach a safe distance after leaving station (in deciseconds) var/area/emergencyLastCallLoc - var/emergencyAlwaysFakeRecall + var/emergencyNoEscape var/emergencyFakeRecall //supply shuttle stuff @@ -104,6 +104,9 @@ var/datum/subsystem/shuttle/SSshuttle if(SHUTTLE_ESCAPE) user << "The emergency shuttle is moving away to a safe distance." return + if(SHUTTLE_STRANDED) + user << "The emergency shuttle has been disabled by Centcom." + return call_reason = strip_html_properly(trim(call_reason)) diff --git a/code/controllers/subsystem/shuttles/emergency.dm b/code/controllers/subsystem/shuttles/emergency.dm index 745f23e39a7..90f3645f723 100644 --- a/code/controllers/subsystem/shuttles/emergency.dm +++ b/code/controllers/subsystem/shuttles/emergency.dm @@ -47,13 +47,6 @@ priority_announce("The emergency shuttle has been called. [redAlert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergencyLastCallLoc ? "\n\nCall signal traced. Results can be viewed on any communcations console." : "" ]", null, 'sound/AI/shuttlecalled.ogg', "Priority") - if(SSshuttle.emergencyAlwaysFakeRecall) - if((seclevel2num(get_security_level()) == SEC_LEVEL_RED)) - SSshuttle.emergencyFakeRecall = rand(2, 5) * 0.1 - else - SSshuttle.emergencyFakeRecall = rand(5, 8) * 0.1 - - /obj/docking_port/mobile/emergency/cancel(area/signalOrigin) if(mode != SHUTTLE_CALL) return @@ -97,7 +90,10 @@ send2irc("Server", "The Emergency Shuttle has docked with the station.") priority_announce("The Emergency Shuttle has docked with the station. You have [timeLeft(600)] minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority") if(SHUTTLE_DOCKED) - if(time_left <= 0) + if(time_left == 0 && SSshuttle.emergencyNoEscape) + priority_announce("Hostile enviroment detected. Departure has been postponed indefinitely pending conflict resolution.", null, 'sound/misc/notice1.ogg', "Priority") + mode = SHUTTLE_STRANDED + if(time_left <= 0 && !SSshuttle.emergencyNoEscape) //move each escape pod to its corresponding transit dock for(var/obj/docking_port/mobile/pod/M in SSshuttle.mobile) M.enterTransit() diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index d9e61f9222c..a8613af17f5 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -99,7 +99,7 @@ var/list/blob_nodes = list() for(var/datum/mind/blob in infected_crew) greet_blob(blob) - SSshuttle.emergencyAlwaysFakeRecall = 1 + SSshuttle.emergencyNoEscape = 1 // Disable the blob event for this round. var/datum/round_event_control/blob/B = locate() in SSevent.control diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index ea5984776d3..01a3286764f 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -77,13 +77,14 @@ AI_mind.special_role = "malfunction" AI_mind.current.verbs += /datum/game_mode/malfunction/proc/takeover + AI_mind.current.verbs += /mob/living/silicon/ai/proc/ai_cancel_call /* AI_mind.current.icon_state = "ai-malf" spawn(10) if(alert(AI_mind.current,"Do you want to use an alternative sprite for your real core?",,"Yes","No")=="Yes") AI_mind.current.icon_state = "ai-malf2" */ - SSshuttle.emergencyAlwaysFakeRecall = 1 + SSshuttle.emergencyNoEscape = 1 ..() @@ -146,7 +147,7 @@ return 1 if (is_malf_ai_dead()) if(config.continuous_round_malf) - SSshuttle.emergencyAlwaysFakeRecall = 0 + SSshuttle.emergencyNoEscape = 0 malf_mode_declared = 0 else return 1 diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 903896b6c8f..20427ecc5df 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -90,7 +90,7 @@ for(var/datum/mind/rev_mind in head_revolutionaries) greet_revolutionary(rev_mind) modePlayer += head_revolutionaries - SSshuttle.emergencyAlwaysFakeRecall = 1 + SSshuttle.emergencyNoEscape = 1 ..() @@ -207,7 +207,7 @@ /datum/game_mode/revolution/check_finished() if(config.continuous_round_rev) if(finished != 0) - SSshuttle.emergencyAlwaysFakeRecall = 0 + SSshuttle.emergencyNoEscape = 0 return ..() if(finished != 0) return 1 diff --git a/code/game/gamemodes/sandbox/sandbox.dm b/code/game/gamemodes/sandbox/sandbox.dm index 4d8371d517d..cc6b03f2ea1 100644 --- a/code/game/gamemodes/sandbox/sandbox.dm +++ b/code/game/gamemodes/sandbox/sandbox.dm @@ -14,4 +14,4 @@ /datum/game_mode/sandbox/post_setup() ..() - SSshuttle.emergencyAlwaysFakeRecall = 1 + SSshuttle.emergencyNoEscape = 1 diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index f5f968e5ff1..ff3f0fc4f5f 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -91,6 +91,9 @@ line1 = "-ETD-" if(SHUTTLE_ESCAPE) line1 = "-ESC-" + if(SHUTTLE_STRANDED) + line1 = "-ERR-" + line2 = "??:??" if(length(line2) > CHARS_PER_LINE) line2 = "Error!" update_display(line1, line2) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 98c5347f8e5..35249463b35 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -318,7 +318,7 @@ var/list/ai_list = list() return 0 /mob/living/silicon/ai/proc/ai_cancel_call() - set category = "AI Commands" + set category = "Malfuction" if(src.stat == 2) src << "You can't send the shuttle back because you are dead!" return diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9a1f9689eac..05009e7742d 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -705,6 +705,8 @@ var/list/slot_equipment_priority = list( \ ETA = "ETD" if(SHUTTLE_ESCAPE) ETA = "ESC" + if(SHUTTLE_STRANDED) + ETA = "ERR" if(ETA) var/timeleft = SSshuttle.emergency.timeLeft() stat(null, "[ETA]-[(timeleft / 60) % 60]:[add_zero(num2text(timeleft % 60), 2)]") From f6380f385e2ca65b7cf14424a7d1dd488022ebe8 Mon Sep 17 00:00:00 2001 From: Incoming Date: Wed, 21 Jan 2015 23:28:48 -0500 Subject: [PATCH 2/3] Removed some now obsoleted code Fixed an edge case --- code/controllers/subsystem/shuttles.dm | 1 - code/controllers/subsystem/shuttles/emergency.dm | 7 ++----- code/modules/admin/verbs/randomverbs.dm | 7 ------- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index f4f1d88dd65..91025890fc0 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -16,7 +16,6 @@ var/datum/subsystem/shuttle/SSshuttle var/emergencyEscapeTime = 1200 //time taken for emergency shuttle to reach a safe distance after leaving station (in deciseconds) var/area/emergencyLastCallLoc var/emergencyNoEscape - var/emergencyFakeRecall //supply shuttle stuff var/obj/docking_port/mobile/supply/supply diff --git a/code/controllers/subsystem/shuttles/emergency.dm b/code/controllers/subsystem/shuttles/emergency.dm index 90f3645f723..5c5577a262d 100644 --- a/code/controllers/subsystem/shuttles/emergency.dm +++ b/code/controllers/subsystem/shuttles/emergency.dm @@ -77,10 +77,7 @@ mode = SHUTTLE_IDLE timer = 0 if(SHUTTLE_CALL) - if(time_left < SSshuttle.emergencyFakeRecall * SSshuttle.emergencyCallTime) //recall due to fake recalls - cancel() - SSshuttle.emergencyFakeRecall = 0 - else if(time_left <= 0) + if(time_left <= 0) //move emergency shuttle to station if(dock(SSshuttle.getDock("emergency_home"))) setTimer(20) @@ -90,7 +87,7 @@ send2irc("Server", "The Emergency Shuttle has docked with the station.") priority_announce("The Emergency Shuttle has docked with the station. You have [timeLeft(600)] minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority") if(SHUTTLE_DOCKED) - if(time_left == 0 && SSshuttle.emergencyNoEscape) + if(time_left <= 0 && SSshuttle.emergencyNoEscape) priority_announce("Hostile enviroment detected. Departure has been postponed indefinitely pending conflict resolution.", null, 'sound/misc/notice1.ogg', "Priority") mode = SHUTTLE_STRANDED if(time_left <= 0 && !SSshuttle.emergencyNoEscape) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 716c923c789..5fa73c314ec 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -681,13 +681,6 @@ Traitors and the like can also be revived with the previous role mostly intact. var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No") if(confirm != "Yes") return - if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "confliction") - var/choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel") - if(choice == "Confirm") - SSshuttle.emergencyFakeRecall = rand(5,9) * 0.1 - else - return - SSshuttle.emergency.request() feedback_add_details("admin_verb","CSHUT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! log_admin("[key_name(usr)] admin-called the emergency shuttle.") From 7b97431a0b91bb8640ad029241363b17763c4129 Mon Sep 17 00:00:00 2001 From: Incoming Date: Sun, 25 Jan 2015 17:49:04 -0500 Subject: [PATCH 3/3] Fixes an edge case with continuous round malf where the round could become unresovable Fixes a spolling errar --- code/game/gamemodes/malfunction/malfunction.dm | 4 ++++ code/modules/mob/living/silicon/ai/ai.dm | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 01a3286764f..930b43848a9 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -147,6 +147,10 @@ return 1 if (is_malf_ai_dead()) if(config.continuous_round_malf) + if(SSshuttle.emergency.mode == SHUTTLE_STRANDED) + SSshuttle.emergency.mode = SHUTTLE_DOCKED + SSshuttle.emergency.timer = world.time + priority_announce("Hostile enviroment resolved. You have 3 minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority") SSshuttle.emergencyNoEscape = 0 malf_mode_declared = 0 else diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 35249463b35..f831e687de5 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -318,7 +318,7 @@ var/list/ai_list = list() return 0 /mob/living/silicon/ai/proc/ai_cancel_call() - set category = "Malfuction" + set category = "Malfunction" if(src.stat == 2) src << "You can't send the shuttle back because you are dead!" return