Adds event regions to GameMaster events (#8334)

* Configures gm events to be selectable by "region"

* Configures event regions for existing events

* Configures event selection to filter by region
This commit is contained in:
Atermonera
2022-01-15 23:52:00 -08:00
committed by GitHub
parent ae7f147ea5
commit cff34e64a1
47 changed files with 232 additions and 126 deletions
@@ -5,6 +5,7 @@
chaos = 30
chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT
event_type = /datum/event2/event/mob_spawning/carp_migration
regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE)
/datum/event2/meta/carp_migration/get_weight()
return 10 + (metric.count_people_in_department(DEPARTMENT_SECURITY) * 20) + (metric.count_all_space_mobs() * 40)
@@ -3,6 +3,7 @@
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
chaotic_threshold = EVENT_CHAOS_THRESHOLD_HIGH_IMPACT // Don't run if we just got hit by meteors.
event_type = /datum/event2/event/security_drill
regions = list(EVENT_REGION_PLAYER_MAIN_AREA)
/datum/event2/meta/security_drill/get_weight()
var/sec = metric.count_people_in_department(DEPARTMENT_SECURITY)
@@ -10,6 +10,7 @@
// the prison area.
var/list/relevant_areas = list()
var/list/irrelevant_areas = list()
regions = list(EVENT_REGION_PLAYER_MAIN_AREA)
/datum/event2/meta/prison_break/get_weight()
// First, don't do this if nobody can fix the doors.
@@ -4,6 +4,7 @@
chaos = 40
chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT
event_type = /datum/event2/event/mob_spawning/rogue_drones
regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE)
/datum/event2/meta/rogue_drones/get_weight()
. = 10 // Start with a base weight, since this event does provide some value even if no sec is around.
@@ -3,6 +3,7 @@
departments = list(DEPARTMENT_SECURITY, DEPARTMENT_EVERYONE)
chaotic_threshold = EVENT_CHAOS_THRESHOLD_HIGH_IMPACT // So this won't get called in the middle of a crisis.
event_type = /datum/event2/event/security_screening
regions = list(EVENT_REGION_UNIVERSAL)
/datum/event2/meta/security_screening/get_weight()
. = 0
@@ -5,6 +5,7 @@
chaos = 30
chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT
event_type = /datum/event2/event/spider_infestation
regions = list(EVENT_REGION_PLAYER_MAIN_AREA)
/datum/event2/meta/spider_infestation/weak
name = "weak spider infestation"
@@ -6,6 +6,7 @@
chaotic_threshold = EVENT_CHAOS_THRESHOLD_LOW_IMPACT
event_type = /datum/event2/event/ghost_pod_spawner/stowaway
var/safe_for_extended = FALSE
regions = list(EVENT_REGION_PLAYER_MAIN_AREA)
/datum/event2/meta/stowaway/normal
name = "stowaway - normal"
@@ -6,6 +6,7 @@
chaos = 20
chaotic_threshold = EVENT_CHAOS_THRESHOLD_MEDIUM_IMPACT
event_type = /datum/event2/event/surprise_carp
regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE)
/datum/event2/meta/surprise_carp/get_weight()
return metric.count_all_space_mobs() * 50
@@ -7,6 +7,7 @@
chaotic_threshold = EVENT_CHAOS_THRESHOLD_HIGH_IMPACT
enabled = FALSE // Turns out they are in fact grossly OP.
var/safe_for_extended = FALSE
regions = list(EVENT_REGION_SPACESTATION, EVENT_REGION_DEEPSPACE)
/datum/event2/meta/swarm_boarder/get_weight()
if(istype(ticker.mode, /datum/game_mode/extended) && !safe_for_extended)