diff --git a/code/controllers/subsystem/events.dm b/code/controllers/subsystem/events.dm index 2ecec8989d0..1aea336e375 100644 --- a/code/controllers/subsystem/events.dm +++ b/code/controllers/subsystem/events.dm @@ -8,6 +8,8 @@ SUBSYSTEM_DEF(events) var/list/control = list() ///assoc list of all datum/round_event_control, ordered by name. name => event var/list/events_by_name = list() + ///assoc list of all nonrunning event types, ordered by name. name => event typepath + var/list/nonrunning_events_by_name = list() ///list of all existing /datum/round_event currently being run. var/list/running = list() ///cache of currently running events, for lag checking. @@ -24,7 +26,10 @@ SUBSYSTEM_DEF(events) /datum/controller/subsystem/events/Initialize() for(var/type in typesof(/datum/round_event_control)) var/datum/round_event_control/event = new type() - if(!event.typepath || !event.valid_for_map()) + if(!event.typepath) + continue + if(!event.valid_for_map()) + nonrunning_events_by_name[event.name] = event.type continue //don't want this one! leave it for the garbage collector control += event //add it to the list of all events (controls) events_by_name[event.name] = event @@ -49,8 +54,9 @@ SUBSYSTEM_DEF(events) var/list/configuration = json_decode(file2text(json_file)) for(var/variable in configuration) var/datum/round_event_control/event = events_by_name[variable] - if(!event) - stack_trace("Invalid event [event] attempting to be configured.") + if(isnull(event)) + if(isnull(nonrunning_events_by_name[variable])) // don't stack_trace events that aren't running due to map flags + stack_trace("Invalid event [variable] attempting to be configured.") continue for(var/event_variable in configuration[variable]) if(!(event.vars.Find(event_variable))) diff --git a/config/events.json b/config/events.json index 8f3b61dc174..e7ad93b0ce3 100644 --- a/config/events.json +++ b/config/events.json @@ -1,8 +1,4 @@ { - "Space Pirates": { - "min_players": 20, - "weight": 10 - }, "Spawn Bitrunning Glitch": { "min_players": 1, "weight": 100 @@ -17,7 +13,7 @@ "weight": 25 }, "Brand Intelligence": { - "min_players": 20, + "min_players": 15, "weight": 5 }, "Bureaucratic Error": { @@ -149,10 +145,6 @@ "min_players": 0, "weight": 10 }, - "Spider Infestation": { - "min_players": 20, - "weight": 10 - }, "Stray Cargo Pod": { "min_players": 0, "weight": 20, @@ -183,7 +175,7 @@ }, "Ventilation Clog: Major": { "min_players": 0, - "weight": 10, + "weight": 12, "earliest_start": 6000 }, "Ventilation Clog: Critical": { @@ -202,7 +194,7 @@ }, "Wormholes": { "min_players": 2, - "weight": 1 + "weight": 2 }, "Anomaly: Energetic Flux": { "min_players": 1, @@ -248,43 +240,10 @@ "min_players": 20, "weight": 10 }, - "Abductors": { - "min_players": 20, - "weight": 10 - }, - "Alien Infestation": { - "min_players": 10, - "weight": 5 - }, - "Blob": { - "min_players": 20, - "weight": 10 - }, - "Changeling Meteor": { - "min_players": 20, - "weight": 8 - }, - "Spawn Fugitives": { - "min_players": 20, - "weight": 10, - "earliest_start": 18000 - }, - "Spawn Morph": { - "min_players": 0, - "weight": 0 - }, - "Spawn Nightmare": { - "min_players": 20, - "weight": 10 - }, "Lone Operative": { "min_players": 0, "weight": 0 }, - "Spawn Revenant": { - "min_players": 5, - "weight": 7 - }, "Random Human-level Intelligence": { "min_players": 0, "weight": 10 @@ -293,19 +252,6 @@ "min_players": 0, "weight": 0 }, - "Spawn Slaughter Demon": { - "min_players": 20, - "weight": 1, - "earliest_start": 36000 - }, - "Spawn Space Dragon": { - "min_players": 20, - "weight": 7 - }, - "Spawn Space Ninja": { - "min_players": 20, - "weight": 10 - }, "Immovable Rod": { "min_players": 15, "weight": 10