Merge pull request #2941 from Citadel-Station-13/upstream-merge-30888
[MIRROR] Refactors cinematics.
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
var/probability = 0
|
||||
var/false_report_weight = 0 //How often will this show up incorrectly in a centcom report?
|
||||
var/station_was_nuked = 0 //see nuclearbomb.dm and malfunction.dm
|
||||
var/explosion_in_progress = 0 //sit back and relax
|
||||
var/round_ends_with_antag_death = 0 //flags the "one verse the station" antags as such
|
||||
var/list/datum/mind/modePlayer = new
|
||||
var/list/datum/mind/antag_candidates = list() // List of possible starting antags goes here
|
||||
@@ -562,3 +561,8 @@
|
||||
|
||||
/datum/game_mode/proc/generate_report() //Generates a small text blurb for the gamemode in centcom report
|
||||
return "Gamemode report for [name] not set. Contact a coder."
|
||||
|
||||
//By default nuke just ends the round
|
||||
/datum/game_mode/proc/OnNukeExplosion(off_station)
|
||||
if(off_station < 2)
|
||||
station_was_nuked = TRUE //Will end the round on next check.
|
||||
@@ -161,6 +161,12 @@
|
||||
synd_mob.equipOutfit(/datum/outfit/syndicate/no_crystals)
|
||||
return 1
|
||||
|
||||
/datum/game_mode/nuclear/OnNukeExplosion(off_station)
|
||||
..()
|
||||
nukes_left--
|
||||
var/obj/docking_port/mobile/Shuttle = SSshuttle.getShuttle("syndicate")
|
||||
syndies_didnt_escape = (Shuttle && (Shuttle.z == ZLEVEL_CENTCOM || Shuttle.z == ZLEVEL_TRANSIT)) ? 0 : 1
|
||||
nuke_off_station = off_station
|
||||
|
||||
/datum/game_mode/nuclear/check_win()
|
||||
if (nukes_left == 0)
|
||||
|
||||
@@ -81,6 +81,20 @@
|
||||
/obj/machinery/nuclearbomb/syndicate
|
||||
//ui_style = "syndicate" // actually the nuke op bomb is a stole nt bomb
|
||||
|
||||
/obj/machinery/nuclearbomb/syndicate/get_cinematic_type(off_station)
|
||||
var/datum/game_mode/nuclear/NM = SSticker.mode
|
||||
switch(off_station)
|
||||
if(0)
|
||||
if(istype(NM) && NM.syndies_didnt_escape)
|
||||
return CINEMATIC_ANNIHILATION
|
||||
else
|
||||
return CINEMATIC_NUKE_WIN
|
||||
if(1)
|
||||
return CINEMATIC_NUKE_MISS
|
||||
if(2)
|
||||
return CINEMATIC_NUKE_FAR
|
||||
return CINEMATIC_NUKE_FAR
|
||||
|
||||
/obj/machinery/nuclearbomb/syndicate/Initialize()
|
||||
. = ..()
|
||||
var/obj/machinery/nuclearbomb/existing = locate("syndienuke") in GLOB.nuke_list
|
||||
@@ -422,12 +436,12 @@
|
||||
update_icon()
|
||||
sound_to_playing_players('sound/machines/alarm.ogg')
|
||||
if(SSticker && SSticker.mode)
|
||||
SSticker.mode.explosion_in_progress = 1
|
||||
SSticker.roundend_check_paused = TRUE
|
||||
sleep(100)
|
||||
|
||||
if(!core)
|
||||
SSticker.station_explosion_cinematic(3,"no_core",src)
|
||||
SSticker.mode.explosion_in_progress = 0
|
||||
Cinematic(CINEMATIC_NUKE_NO_CORE,world)
|
||||
SSticker.roundend_check_paused = FALSE
|
||||
return
|
||||
|
||||
GLOB.enter_allowed = 0
|
||||
@@ -437,28 +451,37 @@
|
||||
var/area/A = get_area(bomb_location)
|
||||
if(bomb_location && (bomb_location.z in GLOB.station_z_levels))
|
||||
if(istype(A, /area/space))
|
||||
off_station = NUKE_MISS_STATION
|
||||
off_station = NUKE_NEAR_MISS
|
||||
if((bomb_location.x < (128-NUKERANGE)) || (bomb_location.x > (128+NUKERANGE)) || (bomb_location.y < (128-NUKERANGE)) || (bomb_location.y > (128+NUKERANGE)))
|
||||
off_station = NUKE_MISS_STATION
|
||||
off_station = NUKE_NEAR_MISS
|
||||
else if((istype(A, /area/syndicate_mothership) || (istype(A, /area/shuttle/syndicate)) && bomb_location.z == ZLEVEL_CENTCOM))
|
||||
off_station = NUKE_SYNDICATE_BASE
|
||||
else
|
||||
off_station = NUKE_NEAR_MISS
|
||||
off_station = NUKE_MISS_STATION
|
||||
|
||||
if(istype(SSticker.mode, /datum/game_mode/nuclear))
|
||||
var/obj/docking_port/mobile/Shuttle = SSshuttle.getShuttle("syndicate")
|
||||
var/datum/game_mode/nuclear/NM = SSticker.mode
|
||||
NM.syndies_didnt_escape = (Shuttle && (Shuttle.z == ZLEVEL_CENTCOM || Shuttle.z == ZLEVEL_TRANSIT)) ? 0 : 1
|
||||
NM.nuke_off_station = off_station
|
||||
if(off_station < 2)
|
||||
SSshuttle.registerHostileEnvironment(src)
|
||||
SSshuttle.lockdown = TRUE
|
||||
|
||||
SSticker.station_explosion_cinematic(off_station,null,src)
|
||||
if(SSticker.mode)
|
||||
if(istype(SSticker.mode, /datum/game_mode/nuclear))
|
||||
var/datum/game_mode/nuclear/NM = SSticker.mode
|
||||
NM.nukes_left --
|
||||
if(!SSticker.mode.check_finished())//If the mode does not deal with the nuke going off so just reboot because everyone is stuck as is
|
||||
SSticker.Reboot("Station destroyed by Nuclear Device.", "nuke - unhandled ending")
|
||||
//Cinematic
|
||||
SSticker.mode.OnNukeExplosion(off_station)
|
||||
var/bombz = z
|
||||
Cinematic(get_cinematic_type(off_station),world,CALLBACK(SSticker,/datum/controller/subsystem/ticker/proc/station_explosion_detonation,src))
|
||||
INVOKE_ASYNC(GLOBAL_PROC,.proc/KillEveryoneOnZLevel,bombz)
|
||||
SSticker.roundend_check_paused = FALSE
|
||||
|
||||
/obj/machinery/nuclearbomb/proc/get_cinematic_type(off_station)
|
||||
if(off_station < 2)
|
||||
return CINEMATIC_SELFDESTRUCT
|
||||
else
|
||||
return CINEMATIC_SELFDESTRUCT_MISS
|
||||
|
||||
/proc/KillEveryoneOnZLevel(z)
|
||||
if(!z)
|
||||
return
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(M.stat != DEAD && M.z == z)
|
||||
M.gib()
|
||||
|
||||
/*
|
||||
This is here to make the tiles around the station mininuke change when it's armed.
|
||||
|
||||
Reference in New Issue
Block a user