Nuke mode nuclear detonations now properly declare round end information

Added a second neutral victory condition to nuke mode, complete with its own cinematic


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@507 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2010-12-01 07:01:07 +00:00
parent a107e9cc7b
commit 649dc66253
3 changed files with 52 additions and 9 deletions

View File

@@ -10,6 +10,8 @@
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
var/derp = 0 //Used for tracking if the syndies actually haul the nuke to the station
/datum/game_mode/nuclear/announce()
world << "<B>The current game mode is - Nuclear Emergency!</B>"
world << "<B>A [syndicate_name()] Strike Force is approaching [station_name()]!</B>"
@@ -124,6 +126,9 @@
/datum/game_mode/nuclear/check_win()
if (src.nuke_detonated)
if(src.derp)
finished = 3
return
finished = 1
return
@@ -169,6 +174,14 @@
if ((M.current.client) && !(locate(M) in syndicates))
world << text("<B>[M.current.key] was [M.current.real_name]</B> [M.current.stat == 2 ? "(DEAD)" : ""]")
if(3)
world << "<FONT size = 3><B>Neutral Victory</B></FONT>"
world << "<B>[syndicate_name()] operatives secured the authentication disk but blew up something that wasn't [station_name()].</B> Next time, don't lose the disk!"
for(var/datum/mind/M in syndicates)
if(!M.current)
continue
if(M.current.client)
world << text("<B>[M.current.key] was [M.current.real_name]</B> [M.current.stat == 2 ? "(DEAD)" : ""]")
return 1
/datum/game_mode/nuclear/proc/get_possible_syndicates()

View File

@@ -139,22 +139,50 @@
*/
enter_allowed = 0
var/derp = 0
var/area/A = src.loc.loc
if (istype( A, /area))
if (A.name == "Space")
derp = 1
if (A.name == "Syndicate Station")
derp = 1
if (A.name == "Wizard's Den")
derp = 1
if (!derp)
for(var/direction in cardinal)
for(var/area/target in get_step(src,direction))
if (target.name == "Space")
derp = 1
if (target.name == "Syndicate Station")
derp = 1
if (target.name == "Wizard's Den")
derp = 1
for(var/mob/M in world)
if(M.client)
spawn(0)
M.client.station_explosion_cinematic()
M.client.station_explosion_cinematic(derp)
if(ticker.mode.name == "nuclear emergency")
ticker.mode:nuke_detonated = 1
ticker.mode.check_win()
ticker.mode.declare_completion()
sleep(110)
world << "<B>Everyone was killed by the nuclear blast! Resetting in 30 seconds!</B>"
if (ticker.mode.name != "nuclear emergency" || !derp)
world << "<B>Everyone was killed by the nuclear blast! Resetting in 30 seconds!</B>"
sleep(300)
log_game("Rebooting due to nuclear destruction of station")
world.Reboot()
return
sleep(300)
log_game("Rebooting due to nuclear destruction of station")
world.Reboot()
return
else if (ticker.mode.name == "nuclear emergency" && derp)
world << "<B>Resetting in 30 seconds!</B>"
sleep(300)
log_game("Rebooting due to nuclear detonation")
world.Reboot()
return
/obj/item/weapon/disk/nuclear/Del()
if (ticker.mode && ticker.mode.name == "nuclear emergency")

View File

@@ -2022,7 +2022,7 @@
stat(null, "([x], [y], [z])")
stat(null, "CPU: [world.cpu]")
/client/proc/station_explosion_cinematic()
/client/proc/station_explosion_cinematic(var/derp)
if(src.mob)
var/mob/M = src.mob
M.loc = null // HACK, but whatever, this works
@@ -2041,12 +2041,14 @@
sleep(40)
M << sound('explosionfar.ogg')
boom.icon_state = "end"
flick("explode", boom)
if(!derp) flick("explode", boom)
else flick("explode2", boom)
sleep(40)
if(ticker)
switch(ticker.mode.name)
if("nuclear emergency")
boom.icon_state = "loss_nuke"
if (!derp) boom.icon_state = "loss_nuke"
else boom.icon_state = "loss_nuke2"
if("AI malfunction")
boom.icon_state = "loss_malf"
else