diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 7bdf667a013..f5d84e7a032 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -246,7 +246,6 @@ opacity = 0 density = 0 - /obj/hud name = "hud" unacidable = 1 @@ -263,9 +262,8 @@ var/obj/screen/g_dither = null var/obj/screen/blurry = null var/list/darkMask = null - var/obj/screen/station_explosion = null - var/h_type = /obj/screen + var/h_type = /obj/screen //this is like...the most pointless thing ever. Use a god damn define! /obj/item name = "item" diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index d3c2d7d7514..558ec89f0f0 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -128,6 +128,97 @@ var/global/datum/controller/gameticker/ticker return 1 /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 = 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) + if( cinematic ) return //already a cinematic in progress! + + //initialise our cinematic screen object + cinematic = new(src) + cinematic.icon = 'station_explosion.dmi' + cinematic.icon_state = "start" + cinematic.layer = 20 + cinematic.mouse_opacity = 0 + cinematic.screen_loc = "1,3" //TODO resize them + + var/obj/structure/stool/bed/temp_buckle = new(src) //Incredibly hackish + //...creates a bed within the gameticker (lol) + //to stop mobs running around + for(var/mob/M) + if(M.client) + M.client.screen += cinematic //show every client the cinematic + M.buckled = temp_buckle //buckle everybody to our pseudo-bed + if(!station_missed) + M.stat = DEAD + //TODO: impliment dust() instead of this (gotta fix it first, dust() is buggy as hell) + + + //Now animate the cinematic + switch(station_missed) + if(2) //nuke was nowhere nearby //TODO: a really distant explosion animation + sleep(50) + world << sound('explosionfar.ogg') + + if(1) //nuke was nearby but (mostly) missed + if( mode && !override ) + override = mode.name + switch( override ) + if("nuclear emergency") + flick("start_nuke",cinematic) + sleep(50) + world << sound('explosionfar.ogg') + flick("explode2",cinematic) + cinematic.icon_state = "loss_nuke2" + else + sleep(50) + world << sound('explosionfar.ogg') + flick("explode2",cinematic) + + else //station was destroyed + if( mode && !override ) + override = mode.name + switch( override ) + if("nuclear emergency") + flick("start_nuke",cinematic) + sleep(50) + world << sound('explosionfar.ogg') + cinematic.icon_state = "end" + flick("explode",cinematic) + cinematic.icon_state = "loss_nuke" + + if("AI malfunction") + flick("start_malf",cinematic) + sleep(50) + world << sound('explosionfar.ogg') + cinematic.icon_state = "end" + flick("explode",cinematic) + cinematic.icon_state = "loss_malf" + + if("blob") + flick("start_blob",cinematic) //TODO: make a blob one + sleep(50) + world << sound('explosionfar.ogg') + cinematic.icon_state = "end" + flick("explode",cinematic) + cinematic.icon_state = "loss_blob" //TODO: make a blob one + + else + //default station-destroyed ending + sleep(50) + world << sound('explosionfar.ogg') + cinematic.icon_state = "end" + flick("explode",cinematic) + cinematic.icon_state = "loss_general" + sleep(100) + + //Tidy-up time! + if(cinematic) del(cinematic) + if(temp_buckle) del(temp_buckle) //release everybody + return + proc/create_characters() for(var/mob/new_player/player in world) diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm index 4ae0e028a47..fff044d7959 100644 --- a/code/game/gamemodes/malfunction/malfunction.dm +++ b/code/game/gamemodes/malfunction/malfunction.dm @@ -181,14 +181,11 @@ world << i sleep(10) enter_allowed = 0 - for(var/mob/M in world) - if(M.client) - spawn(0) - M.client.station_explosion_cinematic() - sleep(110) - ticker.mode:station_was_nuked = 1 - ticker.mode:explosion_in_progress = 0 - //world << "Everyone was killed by the self-destruct!" + if(ticker) + ticker.station_explosion_cinematic(0,null) + if(ticker.mode) + ticker.mode:station_was_nuked = 1 + ticker.mode:explosion_in_progress = 0 return diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 5204eecb35f..297f3efe7a7 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -141,7 +141,6 @@ /obj/machinery/nuclearbomb/ex_act(severity) return - /obj/machinery/nuclearbomb/blob_act() if (src.timing == -1.0) return @@ -150,6 +149,7 @@ return +#define NUKERANGE 80 /obj/machinery/nuclearbomb/proc/explode() if (src.safety) src.timing = 0 @@ -163,66 +163,45 @@ ticker.mode.explosion_in_progress = 1 sleep(100) -/* - var/turf/ground_zero = get_turf(loc) - explosion(ground_zero, 50, 250, 500, 750) - -*/ enter_allowed = 0 - - var/off_station = 0 - var/area/A = get_area(src.loc) - if(A && (istype(A,/area/syndicate_station) || A.type == "/area")) - off_station = 1 - if (ticker && ticker.mode && ticker.mode.name == "nuclear emergency") - ticker.mode:herp = syndicate_station_at_station - ticker.mode:nuke_off_station = off_station + var/turf/bomb_location = get_turf(src) + if( bomb_location && (bomb_location.z == 1) ) + if( (bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)) ) + off_station = 1 + else + off_station = 2 - for(var/mob/M in world) - if(M.client) - spawn(0) - M.client.station_explosion_cinematic(off_station) - sleep(110) + if (ticker) + if(ticker.mode && ticker.mode.name == "nuclear emergency") + ticker.mode:herp = syndicate_station_at_station + ticker.mode:nuke_off_station = off_station + ticker.station_explosion_cinematic(off_station,null) + if(ticker.mode) + ticker.mode.explosion_in_progress = 0 + if(ticker.mode.name == "nuclear emergency") + ticker.mode:nukes_left -- + else + world << "The station was destoyed by the nuclear blast!" - for(var/mob/M in world) - if(M.z==1) - spawn(0) - M.gib() + ticker.mode.station_was_nuked = (off_station<2) //offstation==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. - if (ticker && ticker.mode) - ticker.mode.explosion_in_progress = 0 - if(ticker.mode.name == "nuclear emergency") - ticker.mode:nukes_left -- - ticker.mode.station_was_nuked = (off_station==0) + if(!ticker.mode.check_finished())//If the mode does not deal with the nuke going off so just reboot because everyone is stuck as is + world << "Resetting in 30 seconds!" - else - world << "The station was destoyed by the nuclear blast!" - ticker.mode.station_was_nuked = 1 - /* - TODO: derped blast should partially damage nearest objects - and do not reboot the game. Also make it work properly on other z-levels --rastaf0 - Further TODO: make nuke detonation work with objectives. Right now, you can't track player - location because they are viewing the cinematic (can't get_turf on them to determine z_level - as it will return null). Leaving this for you since you apparently plan to work this further. /N - */ - - if(!ticker.mode.check_finished())//If the mode does not deal with the nuke going off so just reboot because everyone is stuck as is - world << "Resetting in 30 seconds!" - - feedback_set_details("end_error","nuke - unhandled ending") - - if(blackbox) - blackbox.save_all_data_to_sql() - sleep(300) - log_game("Rebooting due to nuclear detonation") - world.Reboot() - return + feedback_set_details("end_error","nuke - unhandled ending") + if(blackbox) + blackbox.save_all_data_to_sql() + sleep(300) + log_game("Rebooting due to nuclear detonation") + world.Reboot() + return + return /obj/item/weapon/disk/nuclear/Del() -// if (ticker.mode && ticker.mode.name == "nuclear emergency") if(blobstart.len > 0) var/obj/D = new /obj/item/weapon/disk/nuclear(pick(blobstart)) message_admins("[src] has been destroyed. Spawning [D] at ([D.x], [D.y], [D.z]).") diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 4c6dd736025..de84bb7dbea 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -272,6 +272,7 @@ verbs += /client/proc/only_one verbs += /client/proc/deadmin_self verbs += /client/proc/getruntimelog //used by coders to retrieve runtime logs + verbs += /client/proc/cinematic //show a cinematic sequence else return return @@ -397,6 +398,7 @@ verbs -= /client/proc/everyone_random verbs -= /client/proc/Set_Holiday verbs -= /client/proc/getruntimelog //used by coders to retrieve runtime logs + verbs += /client/proc/cinematic //show a cinematic sequence verbs -= /proc/possess verbs -= /proc/release //verbs -= /client/proc/give_spell --Merged with view variables diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 777d315fb83..517f4b68827 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -868,7 +868,7 @@ Traitors and the like can also be revived with the previous role mostly intact. command_alert("For budget reasons, Centcomm is no longer beaming gravitons to your station. We appoligize for any inconvience.") feedback_add_details("admin_verb","TSGOFF") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! -//CARN + /client/proc/toggle_random_events() set category = "Server" set name = "Toggle random events on/off" diff --git a/code/modules/mob/dead/observer/hud.dm b/code/modules/mob/dead/observer/hud.dm index 0a1ca725a36..3969992c4ed 100644 --- a/code/modules/mob/dead/observer/hud.dm +++ b/code/modules/mob/dead/observer/hud.dm @@ -1,8 +1,3 @@ + /obj/hud/proc/ghost_hud() - station_explosion = new h_type( src ) - station_explosion.icon = 'station_explosion.dmi' - station_explosion.icon_state = "start" - station_explosion.layer = 20 - station_explosion.mouse_opacity = 0 - station_explosion.screen_loc = "1,3" return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/humanoid/hud.dm b/code/modules/mob/living/carbon/alien/humanoid/hud.dm index 35d7f133134..6eedd909769 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/hud.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/hud.dm @@ -37,14 +37,6 @@ src.druggy.layer = 17 src.druggy.mouse_opacity = 0 - // station explosion cinematic - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" - var/obj/screen/using using = new src.h_type( src ) diff --git a/code/modules/mob/living/carbon/alien/larva/hud.dm b/code/modules/mob/living/carbon/alien/larva/hud.dm index d8e976a8e8f..42b96ff3bc4 100644 --- a/code/modules/mob/living/carbon/alien/larva/hud.dm +++ b/code/modules/mob/living/carbon/alien/larva/hud.dm @@ -39,14 +39,6 @@ src.druggy.layer = 17 src.druggy.mouse_opacity = 0 - // station explosion cinematic - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" - var/obj/screen/using using = new src.h_type( src ) diff --git a/code/modules/mob/living/carbon/brain/hud.dm b/code/modules/mob/living/carbon/brain/hud.dm index a15ff458e87..e57e72a24fc 100644 --- a/code/modules/mob/living/carbon/brain/hud.dm +++ b/code/modules/mob/living/carbon/brain/hud.dm @@ -1,10 +1,4 @@ /obj/hud/proc/brain_hud(var/ui_style='screen1_old.dmi') - station_explosion = new h_type( src ) - station_explosion.icon = 'station_explosion.dmi' - station_explosion.icon_state = "start" - station_explosion.layer = 20 - station_explosion.mouse_opacity = 0 - station_explosion.screen_loc = "1,3" blurry = new h_type( src ) blurry.screen_loc = "WEST,SOUTH to EAST,NORTH" diff --git a/code/modules/mob/living/carbon/human/hud.dm b/code/modules/mob/living/carbon/human/hud.dm index 436ef5ebe46..4219ebb7934 100644 --- a/code/modules/mob/living/carbon/human/hud.dm +++ b/code/modules/mob/living/carbon/human/hud.dm @@ -41,14 +41,6 @@ src.druggy.layer = 17 src.druggy.mouse_opacity = 0 - // station explosion cinematic - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" - var/obj/screen/using using = new src.h_type( src ) diff --git a/code/modules/mob/living/carbon/metroid/hud.dm b/code/modules/mob/living/carbon/metroid/hud.dm index 40e4bf9f868..f1d73166958 100644 --- a/code/modules/mob/living/carbon/metroid/hud.dm +++ b/code/modules/mob/living/carbon/metroid/hud.dm @@ -44,12 +44,4 @@ src.druggy.layer = 17 src.druggy.mouse_opacity = 0 - // station explosion cinematic - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" - */ \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/hud.dm b/code/modules/mob/living/carbon/monkey/hud.dm index fbbad3183fc..c6318d92d0c 100644 --- a/code/modules/mob/living/carbon/monkey/hud.dm +++ b/code/modules/mob/living/carbon/monkey/hud.dm @@ -43,14 +43,6 @@ src.druggy.layer = 17 src.druggy.mouse_opacity = 0 - // station explosion cinematic - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" - var/obj/screen/using using = new src.h_type( src ) diff --git a/code/modules/mob/living/silicon/ai/hud.dm b/code/modules/mob/living/silicon/ai/hud.dm index 0e563e2cf44..2db6674a9a3 100644 --- a/code/modules/mob/living/silicon/ai/hud.dm +++ b/code/modules/mob/living/silicon/ai/hud.dm @@ -1,10 +1,2 @@ /obj/hud/proc/ai_hud() - - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" - return \ No newline at end of file diff --git a/code/modules/mob/living/silicon/robot/hud.dm b/code/modules/mob/living/silicon/robot/hud.dm index 0dbc0eda88a..9c90273d37f 100644 --- a/code/modules/mob/living/silicon/robot/hud.dm +++ b/code/modules/mob/living/silicon/robot/hud.dm @@ -38,14 +38,6 @@ src.druggy.layer = 17 src.druggy.mouse_opacity = 0 - // station explosion cinematic - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" - var/obj/screen/using diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index f5839032309..ac918668f50 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -942,44 +942,6 @@ note dizziness decrements automatically in the mob's Life() proc. statpanel("Spells","[S.holder_var_type] [S.holder_var_amount]",S) -/client/proc/station_explosion_cinematic(var/station_missed) - if(!mob || !ticker) return - if(!mob.client || !mob.hud_used || !ticker.mode) return -// M.loc = null this might make it act weird but fuck putting them in nullspace, it causes issues. - var/obj/screen/boom = mob.hud_used.station_explosion - if(!istype(boom)) return - - mob.client.screen += boom - - switch(ticker.mode.name) - if("nuclear emergency") - flick("start_nuke", boom) - if("AI malfunction") - flick("start_malf", boom) - else - boom.icon_state = "start" - - sleep(40) - if(boom && mob) - mob << sound('explosionfar.ogg') - boom.icon_state = "end" - if(!station_missed) flick("explode", boom) - else flick("explode2", boom) - sleep(40) - - if(boom) - switch(ticker.mode.name) - if("nuclear emergency") - if(!station_missed) boom.icon_state = "loss_nuke" - else boom.icon_state = "loss_nuke2" - if("malfunction") - boom.icon_state = "loss_malf" - if("blob") - return//Nothin here yet and the general one does not fit. - else - boom.icon_state = "loss_general" - return - // facing verbs /mob/proc/canface() diff --git a/code/modules/mob/new_player/hud.dm b/code/modules/mob/new_player/hud.dm index 6df982d16dd..3f2d074e31a 100644 --- a/code/modules/mob/new_player/hud.dm +++ b/code/modules/mob/new_player/hud.dm @@ -1,8 +1,3 @@ + /obj/hud/proc/unplayer_hud() - src.station_explosion = new src.h_type( src ) - src.station_explosion.icon = 'station_explosion.dmi' - src.station_explosion.icon_state = "start" - src.station_explosion.layer = 20 - src.station_explosion.mouse_opacity = 0 - src.station_explosion.screen_loc = "1,3" return \ No newline at end of file diff --git a/html/changelog.html b/html/changelog.html index 7aa6bef865e..198d82b04eb 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -93,6 +93,14 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit tho. Thanks. --> +
+

19 April 2012

+

Carn updated:

+ +
+

Tuesday, April 17th

Kor updated:

@@ -137,10 +145,10 @@ should be listed in the changelog upon commit tho. Thanks. -->
  • CONTRABAND-CON UPDATE: Added posters. I'm sorry to add it seperately with the rest of contraband, but there was a lack of sprites for everything else. Hopefully, people will gain interest and get me some damn sprites this way :3 As I said, this is an ongoing project of mine. So starting of, we've got...
  • POSTERS! Posters come in rolled packages that can adhere to any wall or r_wall, if it's uncluttered enough. -

    •How they get on-board: The quartermaster can now set the receiver frequency of his supplycomp circuit board. A bit simplistic as of now, will work on it later. Building a supplycomp with a properly set up circuitboard will give access to the Contraband crate. -

    •How they're used: Unfold the rolled poster on any wall or r_wall to create the poster. There are currently 17 designs, with the possibility of me adding more. -

    •How to get rid of them: You can rip them using your hand... To cleanly extract them and not ruin them for future use, however, you can use a pair of wirecutters. -

    •How they're classified: They're contraband, so it's perfectly okay for security officers to confiscate them. Punishment for contraband-providers (or end-users, if you want to go full nazi) is up to the situational commanding officers. +

    �How they get on-board: The quartermaster can now set the receiver frequency of his supplycomp circuit board. A bit simplistic as of now, will work on it later. Building a supplycomp with a properly set up circuitboard will give access to the Contraband crate. +

    �How they're used: Unfold the rolled poster on any wall or r_wall to create the poster. There are currently 17 designs, with the possibility of me adding more. +

    �How to get rid of them: You can rip them using your hand... To cleanly extract them and not ruin them for future use, however, you can use a pair of wirecutters. +

    �How they're classified: They're contraband, so it's perfectly okay for security officers to confiscate them. Punishment for contraband-providers (or end-users, if you want to go full nazi) is up to the situational commanding officers.

    Nodrak updated:

    @@ -179,10 +187,10 @@ should be listed in the changelog upon commit tho. Thanks. -->
  • CONTRABAND-CON UPDATE: Added posters. I'm sorry to add it seperately with the rest of contraband, but there was a lack of sprites for everything else. Hopefully, people will gain interest and get me some damn sprites this way :3 As I said, this is an ongoing project of mine. So starting of, we've got...
  • POSTERS! Posters come in rolled packages that can adhere to any wall or r_wall, if it's uncluttered enough. -

    •How they get on-board: The quartermaster can now set the receiver frequency of his supplycomp circuit board. A bit simplistic as of now, will work on it later. Building a supplycomp with a properly set up circuitboard will give access to the Contraband crate. -

    •How they're used: Unfold the rolled poster on any wall or r_wall to create the poster. There are currently 17 designs, with the possibility of me adding more. -

    •How to get rid of them: You can rip them using your hand... To cleanly extract them and not ruin them for future use, however, you can use a pair of wirecutters. -

    •How they're classified: They're contraband, so it's perfectly okay for security officers to confiscate them. Punishment for contraband-providers (or end-users, if you want to go full nazi) is up to the situational commanding officers. +

    �How they get on-board: The quartermaster can now set the receiver frequency of his supplycomp circuit board. A bit simplistic as of now, will work on it later. Building a supplycomp with a properly set up circuitboard will give access to the Contraband crate. +

    �How they're used: Unfold the rolled poster on any wall or r_wall to create the poster. There are currently 17 designs, with the possibility of me adding more. +

    �How to get rid of them: You can rip them using your hand... To cleanly extract them and not ruin them for future use, however, you can use a pair of wirecutters. +

    �How they're classified: They're contraband, so it's perfectly okay for security officers to confiscate them. Punishment for contraband-providers (or end-users, if you want to go full nazi) is up to the situational commanding officers.
  • diff --git a/tgstation.dme b/tgstation.dme index 53e04703a63..8adbe7962de 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -748,6 +748,7 @@ #include "code\modules\admin\verbs\adminsay.dm" #include "code\modules\admin\verbs\atmosdebug.dm" #include "code\modules\admin\verbs\BrokenInhands.dm" +#include "code\modules\admin\verbs\cinematic.dm" #include "code\modules\admin\verbs\deadsay.dm" #include "code\modules\admin\verbs\debug.dm" #include "code\modules\admin\verbs\diagnostics.dm"