From fba6a9e165d09da2c802825087f873683e4231d8 Mon Sep 17 00:00:00 2001 From: alex-gh Date: Fri, 29 Nov 2013 12:55:42 +0100 Subject: [PATCH] Nuke cinematic crash definite fix --- code/game/gamemodes/gameticker.dm | 86 +------------------------------ 1 file changed, 2 insertions(+), 84 deletions(-) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 8b203543eb7..7fed7fcbf98 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -162,34 +162,13 @@ var/global/datum/controller/gameticker/ticker return 1 -//Temporary Cinematic location for crash testing -/obj/screen/cinematic - icon = 'icons/effects/station_explosion.dmi' - icon_state = "station_intact" - screen_loc = "1,0" - /datum/controller/gameticker - //station_explosion used to be a variable for every mob's hud. Which was a waste! - //Now we have a general cinematic centrally held within the gameticker....far more efficient! - var/obj/screen/cinematic/C = null - //Plus it provides an easy way to make cinematics for other events. Just use this as a template :) proc/station_explosion_cinematic(var/station_missed=0, var/override = null) - C = new(src) - - var/obj/structure/stool/bed/temp_buckle = new(src) - //Incredibly hackish. It creates a bed within the gameticker (lol) to stop mobs running around if(station_missed) - for(var/mob/living/M in living_mob_list) - M.buckled = temp_buckle //buckles the mob so it can't do anything - if(M.client) - M.client.screen += C //show every client the cinematic + return else //nuke kills everyone on z-level 1 to prevent "hurr-durr I survived" for(var/mob/living/M in living_mob_list) - M.buckled = temp_buckle - if(M.client) - M.client.screen += C - switch(M.z) if(0) //inside a crate or something var/turf/T = get_turf(M) @@ -199,68 +178,7 @@ var/global/datum/controller/gameticker/ticker if(1) //on a z-level 1 turf. M.health = 0 M.stat = DEAD - - //Now animate the cinematic - switch(station_missed) - if(1) //nuke was nearby but (mostly) missed - if( mode && !override ) - override = mode.name - switch( override ) - if("nuclear emergency") //Nuke wasn't on station when it blew up - flick("intro_nuke",C) - sleep(35) - world << sound('sound/effects/explosionfar.ogg') - flick("station_intact_fade_red",C) - C.icon_state = "summary_nukefail" - else - flick("intro_nuke",C) - sleep(35) - world << sound('sound/effects/explosionfar.ogg') - //flick("end",cinematic) - - - if(2) //nuke was nowhere nearby //TODO: a really distant explosion animation - sleep(50) - world << sound('sound/effects/explosionfar.ogg') - - - else //station was destroyed - if( mode && !override ) - override = mode.name - switch( override ) - if("nuclear emergency") //Nuke Ops successfully bombed the station - flick("intro_nuke",C) - sleep(35) - flick("station_explode_fade_red",C) - world << sound('sound/effects/explosionfar.ogg') - C.icon_state = "summary_nukewin" - if("AI malfunction") //Malf (screen,explosion,summary) - flick("intro_malf",C) - sleep(76) - flick("station_explode_fade_red",C) - world << sound('sound/effects/explosionfar.ogg') - C.icon_state = "summary_malf" - if("blob") //Station nuked (nuke,explosion,summary) - flick("intro_nuke",C) - sleep(35) - flick("station_explode_fade_red",C) - world << sound('sound/effects/explosionfar.ogg') - C.icon_state = "summary_selfdes" - else //Station nuked (nuke,explosion,summary) - flick("intro_nuke",C) - sleep(35) - flick("station_explode_fade_red", C) - world << sound('sound/effects/explosionfar.ogg') - C.icon_state = "summary_selfdes" - for(var/mob/living/M in living_mob_list) - if(M.loc.z == 1) - M.death()//No mercy - //If its actually the end of the round, wait for it to end. - //Otherwise if its a verb it will continue on afterwards. - sleep(300) - - if(C) del(C) //end the cinematic - if(temp_buckle) del(temp_buckle) //release everybody + world << sound('sound/effects/explosionfar.ogg') return