From 3d0dacc6ff78ec3761edb5214082e1c02a89b1d4 Mon Sep 17 00:00:00 2001 From: cib Date: Sat, 7 Jul 2012 19:17:44 +0200 Subject: [PATCH] Made it so vote-initiated transfer shuttle will come despite mode etc. --- .../game/machinery/computer/communications.dm | 40 ++++++++++--------- code/game/vote.dm | 4 +- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 8bf065bbea1..98986275f25 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -491,22 +491,10 @@ return -/proc/init_shift_change(var/mob/user) +/proc/init_shift_change(var/mob/user, var/force = 0) if ((!( ticker ) || emergency_shuttle.location)) return - if(emergency_shuttle.deny_shuttle) - user << "Centcom does not currently have a shuttle available in your sector. Please try again later." - return - - if(sent_strike_team == 1) - user << "Centcom will not allow the shuttle to be called. Consider all contracts terminated." - return - - if(world.time < 54000) // 30 minute grace period to let the game get going - user << "The shuttle is refueling. Please wait another [round((54000-world.time)/600)] minutes before trying again."//may need to change "/600" - return - if(emergency_shuttle.direction == -1) user << "The shuttle may not be called while returning to CentCom." return @@ -515,13 +503,27 @@ user << "The shuttle is already on its way." return - if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "sandbox") - //New version pretends to call the shuttle but cause the shuttle to return after a random duration. - emergency_shuttle.fake_recall = rand(300,500) + // if force is 0, some things may stop the shuttle call + if(!force) + if(emergency_shuttle.deny_shuttle) + user << "Centcom does not currently have a shuttle available in your sector. Please try again later." + return - if(ticker.mode.name == "blob" || ticker.mode.name == "epidemic") - user << "Under directive 7-10, [station_name()] is quarantined until further notice." - return + if(sent_strike_team == 1) + user << "Centcom will not allow the shuttle to be called. Consider all contracts terminated." + return + + if(world.time < 54000) // 30 minute grace period to let the game get going + user << "The shuttle is refueling. Please wait another [round((54000-world.time)/600)] minutes before trying again."//may need to change "/600" + return + + if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "sandbox") + //New version pretends to call the shuttle but cause the shuttle to return after a random duration. + emergency_shuttle.fake_recall = rand(300,500) + + if(ticker.mode.name == "blob" || ticker.mode.name == "epidemic") + user << "Under directive 7-10, [station_name()] is quarantined until further notice." + return emergency_shuttle.shuttlealert(1) emergency_shuttle.incall() diff --git a/code/game/vote.dm b/code/game/vote.dm index 36e39eaa4fd..4ec854055f6 100644 --- a/code/game/vote.dm +++ b/code/game/vote.dm @@ -118,8 +118,8 @@ log_game("Rebooting due to restart vote") world.Reboot() else - // Call the shift change shuttle instead - init_shift_change() + // Call the shift change shuttle instead, the 1 is to force the shuttle to come + init_shift_change(null, 1) return