mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Fixes nukes not actually ending the round (#19869)
This commit is contained in:
@@ -25,11 +25,6 @@
|
||||
var/list/orphaned_roles = list()
|
||||
var/dat = ""
|
||||
|
||||
//'Oh dear we accidentally destroyed the station/universe' variables
|
||||
var/station_was_nuked
|
||||
var/explosion_in_progress
|
||||
|
||||
|
||||
/datum/gamemode/proc/can_start()
|
||||
if(minimum_player_count && minimum_player_count < get_player_count())
|
||||
return 0
|
||||
@@ -246,7 +241,7 @@
|
||||
for(var/datum/faction/F in factions)
|
||||
if(F.check_win())
|
||||
return 1
|
||||
if(emergency_shuttle.location==2 || station_was_nuked)
|
||||
if(emergency_shuttle.location==2 || ticker.station_was_nuked)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
mapname = map.nameLong
|
||||
mastermode = master_mode // this is stored as a string in game
|
||||
tickermode = ticker.mode.name
|
||||
nuked = ticker.mode.station_was_nuked
|
||||
nuked = ticker.station_was_nuked
|
||||
tech_total = get_research_score()
|
||||
stationname = station_name()
|
||||
// if(istype(ticker.mode, /datum/game_mode/mixed))
|
||||
|
||||
@@ -497,7 +497,7 @@ rcd light flash thingy on matter drain
|
||||
to_chat(usr, "<span class='warning'>You are unable to access the self-destruct system as you don't control the station yet.</span>")
|
||||
return 1
|
||||
|
||||
if(ticker.mode.explosion_in_progress || ticker.mode.station_was_nuked)
|
||||
if(ticker.explosion_in_progress || ticker.station_was_nuked)
|
||||
to_chat(usr, "<span class='notice'>The self-destruct countdown was already triggered!</span>")
|
||||
return 1
|
||||
|
||||
@@ -517,7 +517,7 @@ rcd light flash thingy on matter drain
|
||||
for(var/spell/S in AI.antag.current.spell_list)
|
||||
if(istype(S,/spell/aoe_turf/ai_win))
|
||||
AI.antag.current.remove_spell(S)
|
||||
ticker.mode.explosion_in_progress = 1
|
||||
ticker.explosion_in_progress = 1
|
||||
for(var/mob/MM in player_list)
|
||||
if(MM.client)
|
||||
MM << 'sound/machines/Alarm.ogg'
|
||||
@@ -529,8 +529,7 @@ rcd light flash thingy on matter drain
|
||||
enter_allowed = 0
|
||||
if(ticker)
|
||||
ticker.station_explosion_cinematic(0,null)
|
||||
if(ticker.mode)
|
||||
ticker.mode.station_was_nuked = 1
|
||||
ticker.mode.explosion_in_progress = 0
|
||||
ticker.station_was_nuked = 1
|
||||
ticker.explosion_in_progress = 0
|
||||
return
|
||||
|
||||
|
||||
@@ -288,35 +288,13 @@ var/obj/item/weapon/disk/nuclear/nukedisk
|
||||
else
|
||||
off_station = 2
|
||||
forceMove(null)
|
||||
if(ticker)
|
||||
ticker.station_explosion_cinematic(off_station,null)
|
||||
if(ticker.mode)
|
||||
ticker.explosion_in_progress = 0
|
||||
to_chat(world, "<B>The station was destroyed by the nuclear blast!</B>")
|
||||
ticker.station_explosion_cinematic(off_station,null)
|
||||
ticker.explosion_in_progress = FALSE
|
||||
to_chat(world, "<B>The station was destroyed by the nuclear blast!</B>")
|
||||
|
||||
ticker.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.
|
||||
stat_collection.nuked++
|
||||
|
||||
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
|
||||
to_chat(world, "<B>Resetting in 30 seconds!</B>")
|
||||
|
||||
feedback_set_details("end_error","nuke - unhandled ending")
|
||||
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
|
||||
CallHook("Reboot",list())
|
||||
|
||||
if (watchdog.waiting)
|
||||
to_chat(world, "<span class='notice'><B>Server will shut down for an automatic update in a few seconds.</B></span>")
|
||||
watchdog.signal_ready()
|
||||
return
|
||||
sleep(300)
|
||||
log_game("Rebooting due to nuclear detonation")
|
||||
world.Reboot()
|
||||
return
|
||||
return
|
||||
ticker.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.
|
||||
stat_collection.nuked++
|
||||
|
||||
/obj/machinery/nuclearbomb/send_to_past(var/duration)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user