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

View File

@@ -91,3 +91,15 @@
num++
if(num)
. = round(. / num, 0.1)
// Computes activity of players on a per-region basis
/datum/metric/proc/assess_player_regions()
. = list()
for(var/mob/living/L in player_list)
var/activity = assess_player_activity(L)
for(var/region in L.get_player_regions())
.[region] += activity
// To prevent the universal region from being chosen too often, scale it down
// If lots of players are active over a wide set of regions, this should prefer events that cover a wider area
.[EVENT_REGION_UNIVERSAL] = round(.[EVENT_REGION_UNIVERSAL] / 2, 1)