From fd87f4d0859db3a41560ebb9b3214971f08e3e0d Mon Sep 17 00:00:00 2001 From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Date: Thu, 16 Dec 2021 17:03:31 +0000 Subject: [PATCH] Nukes meteor gamemode (#17186) --- code/controllers/subsystem/shuttles.dm | 2 - code/game/gamemodes/meteor/meteor.dm | 60 ------------------- .../game/machinery/computer/communications.dm | 3 - .../meteor => objects/effects}/meteors.dm | 0 config/example/config.toml | 1 - paradise.dme | 3 +- 6 files changed, 1 insertion(+), 68 deletions(-) delete mode 100644 code/game/gamemodes/meteor/meteor.dm rename code/game/{gamemodes/meteor => objects/effects}/meteors.dm (100%) diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index 71c504b3032..65bbd26a808 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -175,8 +175,6 @@ SUBSYSTEM_DEF(shuttle) return if(!emergency.canRecall) return - if(SSticker.mode.name == "meteor") - return if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED) if(emergency.timeLeft(1) < emergencyCallTime * 0.25) return diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm deleted file mode 100644 index 8aced721dca..00000000000 --- a/code/game/gamemodes/meteor/meteor.dm +++ /dev/null @@ -1,60 +0,0 @@ -/datum/game_mode/meteor - name = "meteor" - config_tag = "meteor" - var/const/initialmeteordelay = 6000 - var/wave = 1 - required_players = 35 - - -/datum/game_mode/meteor/announce() - to_chat(world, "The current game mode is - Meteor!") - to_chat(world, "The space station has been stuck in a major meteor shower. You must escape from the station or at least live.") - - -/datum/game_mode/meteor/post_setup() - spawn(rand(waittime_l, waittime_h)) - GLOB.command_announcement.Announce("The station is on the path of an incoming wave of meteors. Reinforce the hull and prepare damage control parties.", "Incoming Meteors", 'sound/effects/siren.ogg') - spawn(initialmeteordelay) - sendmeteors() - ..() - - - -/datum/game_mode/meteor/proc/sendmeteors() - var/waveduration = world.time + rand(0,1000) + text2num("[wave]000") / 2 - var/waitduration = rand(3000,6000) - while(waveduration - world.time > 0) - sleep(max(65 - text2num("[wave]0") / 2, 40)) - spawn() spawn_meteors(6, GLOB.meteors_normal) - wave++ - sleep(waitduration) - sendmeteors() - -/datum/game_mode/meteor/declare_completion() - var/text - var/survivors = 0 - for(var/mob/living/player in GLOB.player_list) - if(player.stat != DEAD) - var/turf/location = get_turf(player.loc) - if(!location) continue - - if(location.loc.type == SSshuttle.emergency.areaInstance.type) //didn't work in the switch for some reason - text += "
[player.real_name] escaped on the emergency shuttle" - - else - switch(location.loc.type) - if( /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod2/centcom, /area/shuttle/escape_pod3/centcom, /area/shuttle/escape_pod5/centcom ) - text += "
[player.real_name] escaped in a life pod." - else - text += "
[player.real_name] survived but is stranded without any hope of rescue." - survivors++ - - if(survivors) - to_chat(world, "The following survived the meteor storm:[text]") - else - to_chat(world, "Nobody survived the meteor storm!") - - SSticker.mode_result = "meteor end - evacuation" - - ..() - return 1 diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 71e6155056f..a6ac82ab78c 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -468,9 +468,6 @@ /proc/cancel_call_proc(mob/user) - if(SSticker.mode.name == "meteor") - return - if(SSshuttle.cancelEvac(user)) log_game("[key_name(user)] has recalled the shuttle.") message_admins("[key_name_admin(user)] has recalled the shuttle - ([ADMIN_FLW(user,"FLW")]).", 1) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/objects/effects/meteors.dm similarity index 100% rename from code/game/gamemodes/meteor/meteors.dm rename to code/game/objects/effects/meteors.dm diff --git a/config/example/config.toml b/config/example/config.toml index 49a07e4f893..6c4cf8b52ce 100644 --- a/config/example/config.toml +++ b/config/example/config.toml @@ -232,7 +232,6 @@ gamemode_probabilities = [ {gamemode = "extend-a-traitormongous", probability = 2}, # Autotraitor {gamemode = "extended", probability = 3}, {gamemode = "heist", probability = 0}, - {gamemode = "meteor", probability = 0}, {gamemode = "nuclear", probability = 2}, {gamemode = "raginmages", probability = 0}, {gamemode = "revolution", probability = 0}, diff --git a/paradise.dme b/paradise.dme index eba537a0a4e..e1149a50c41 100644 --- a/paradise.dme +++ b/paradise.dme @@ -578,8 +578,6 @@ #include "code\game\gamemodes\extended\extended.dm" #include "code\game\gamemodes\heist\heist.dm" #include "code\game\gamemodes\malfunction\Malf_Modules.dm" -#include "code\game\gamemodes\meteor\meteor.dm" -#include "code\game\gamemodes\meteor\meteors.dm" #include "code\game\gamemodes\miniantags\abduction\abductee_objectives.dm" #include "code\game\gamemodes\miniantags\abduction\abduction.dm" #include "code\game\gamemodes\miniantags\abduction\abduction_gear.dm" @@ -822,6 +820,7 @@ #include "code\game\objects\effects\glowshroom.dm" #include "code\game\objects\effects\landmarks.dm" #include "code\game\objects\effects\mapping_helpers.dm" +#include "code\game\objects\effects\meteors.dm" #include "code\game\objects\effects\mines.dm" #include "code\game\objects\effects\misc.dm" #include "code\game\objects\effects\overlays.dm"