Nuclear bombs now actually detonate (#22586)

* BOOM

* Forgot this check

* Fix remaining objectives

* This is better

* MSO params

* >When you copy paste directly from the comment

* Merge fixes

* Revert "Fix remaining objectives"

This reverts commit b1d1bf40f615019bb57088c24fae8f89c5d2e834.

* Revert "Forgot this check"

This reverts commit cea6ad2381d44a44ef3a93064997454cf7b1ccf5.

* After all that work I did to make objectives work...

* Oh this is important
This commit is contained in:
Cyberboss
2017-01-29 15:41:42 -05:00
committed by oranges
parent a37d4c75ca
commit 2aef76bdce
6 changed files with 64 additions and 35 deletions
+2
View File
@@ -43,6 +43,8 @@ var/datum/subsystem/shuttle/SSshuttle
var/shuttle_purchased = FALSE //If the station has purchased a replacement escape shuttle this round
var/list/shuttle_purchase_requirements_met = list() //For keeping track of ingame events that would unlock new shuttles, such as defeating a boss or discovering a secret item
var/lockdown = FALSE //disallow transit after nuke goes off
/datum/subsystem/shuttle/New()
NEW_SS_GLOBAL(SSshuttle)
+48 -20
View File
@@ -218,32 +218,36 @@ var/datum/subsystem/ticker/ticker
if(!adm["present"])
send2irc("Server", "Round just started with no active admins online!")
/datum/subsystem/ticker/proc/station_explosion_detonation(atom/bomb)
if(bomb) //BOOM
var/turf/epi = bomb.loc
qdel(bomb)
if(epi)
explosion(epi, 0, 256, 512, 0, TRUE, TRUE, 0, TRUE)
//Plus it provides an easy way to make cinematics for other events. Just use this as a template
/datum/subsystem/ticker/proc/station_explosion_cinematic(station_missed=0, override = null)
/datum/subsystem/ticker/proc/station_explosion_cinematic(station_missed=0, override = null, atom/bomb = null)
if( cinematic )
return //already a cinematic in progress!
for (var/datum/html_interface/hi in html_interfaces)
hi.closeAll()
SStgui.close_all_uis()
//Turn off the shuttles, there's no escape now
if(!station_missed && bomb)
SSshuttle.registerHostileEnvironment(src)
SSshuttle.lockdown = TRUE
//initialise our cinematic screen object
cinematic = new /obj/screen{icon='icons/effects/station_explosion.dmi';icon_state="station_intact";layer=21;mouse_opacity=0;screen_loc="1,0";}(src)
if(station_missed)
for(var/mob/M in mob_list)
M.notransform = TRUE //stop everything moving
if(M.client)
M.client.screen += cinematic //show every client the cinematic
else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived"
for(var/mob/M in mob_list)
if(M.client)
M.client.screen += cinematic
if(M.stat != DEAD)
var/turf/T = get_turf(M)
if(T && T.z==1)
M.death(0) //no mercy
else
M.notransform=TRUE //no moving for you
for(var/mob/M in mob_list)
M.notransform = TRUE //stop everything moving
if(M.client)
M.client.screen += cinematic //show every client the cinematic
var/actually_blew_up = TRUE
//Now animate the cinematic
switch(station_missed)
if(NUKE_NEAR_MISS) //nuke was nearby but (mostly) missed
@@ -254,27 +258,32 @@ var/datum/subsystem/ticker/ticker
flick("intro_nuke",cinematic)
sleep(35)
world << sound('sound/effects/explosionfar.ogg')
station_explosion_detonation(bomb)
flick("station_intact_fade_red",cinematic)
cinematic.icon_state = "summary_nukefail"
if("gang war") //Gang Domination (just show the override screen)
cinematic.icon_state = "intro_malf_still"
flick("intro_malf",cinematic)
actually_blew_up = FALSE
sleep(70)
if("fake") //The round isn't over, we're just freaking people out for fun
flick("intro_nuke",cinematic)
sleep(35)
world << sound('sound/items/bikehorn.ogg')
flick("summary_selfdes",cinematic)
actually_blew_up = FALSE
else
flick("intro_nuke",cinematic)
sleep(35)
world << sound('sound/effects/explosionfar.ogg')
//flick("end",cinematic)
station_explosion_detonation(bomb)
if(NUKE_MISS_STATION || NUKE_SYNDICATE_BASE) //nuke was nowhere nearby //TODO: a really distant explosion animation
sleep(50)
world << sound('sound/effects/explosionfar.ogg')
station_explosion_detonation(bomb)
actually_blew_up = station_missed == NUKE_SYNDICATE_BASE //don't kill everyone on station if it detonated off station
else //station was destroyed
if( mode && !override )
override = mode.name
@@ -284,18 +293,21 @@ var/datum/subsystem/ticker/ticker
sleep(35)
flick("station_explode_fade_red",cinematic)
world << sound('sound/effects/explosionfar.ogg')
station_explosion_detonation(bomb)
cinematic.icon_state = "summary_nukewin"
if("AI malfunction") //Malf (screen,explosion,summary)
flick("intro_malf",cinematic)
sleep(76)
flick("station_explode_fade_red",cinematic)
world << sound('sound/effects/explosionfar.ogg')
station_explosion_detonation(bomb) //TODO: If we ever decide to actually detonate the vault bomb
cinematic.icon_state = "summary_malf"
if("blob") //Station nuked (nuke,explosion,summary)
flick("intro_nuke",cinematic)
sleep(35)
flick("station_explode_fade_red",cinematic)
world << sound('sound/effects/explosionfar.ogg')
station_explosion_detonation(bomb) //TODO: no idea what this case could be
cinematic.icon_state = "summary_selfdes"
if("no_core") //Nuke failed to detonate as it had no core
flick("intro_nuke",cinematic)
@@ -314,16 +326,32 @@ var/datum/subsystem/ticker/ticker
sleep(35)
flick("station_explode_fade_red", cinematic)
world << sound('sound/effects/explosionfar.ogg')
station_explosion_detonation(bomb)
cinematic.icon_state = "summary_selfdes"
//If its actually the end of the round, wait for it to end.
//Otherwise if its a verb it will continue on afterwards.
addtimer(CALLBACK(src, .proc/finish_cinematic), 300)
/datum/subsystem/ticker/proc/finish_cinematic()
if(mode)
mode.explosion_in_progress = 0
world << "<B>The station was destoyed by the nuclear blast!</B>"
mode.station_was_nuked = (station_missed<2) //station_missed==1 is a draw. the station becomes irradiated and needs to be evacuated.
//kinda shit but I couldn't get permission to do what I wanted to do.
var/bombloc = null
if(actually_blew_up)
if(bomb && bomb.loc)
bombloc = bomb.z
else if(!station_missed)
bombloc = ZLEVEL_STATION
addtimer(CALLBACK(src, .proc/finish_cinematic, bombloc), 300)
/datum/subsystem/ticker/proc/finish_cinematic(killz)
if(cinematic)
qdel(cinematic) //end the cinematic
for(var/mob/M in mob_list)
M.notransform = FALSE //gratz you survived
M.notransform = FALSE
if(!isnull(killz) && M.stat != DEAD && M.z == killz)
M.gib()
/datum/subsystem/ticker/proc/create_characters()
for(var/mob/new_player/player in player_list)