Merge pull request #6219 from Mechoid/Event_Retweakening

Tweaks the NewTM event system further
This commit is contained in:
Anewbe
2019-06-19 22:33:26 -05:00
committed by VirgoBot
parent efbefb956b
commit d017075732
9 changed files with 81 additions and 7 deletions

View File

@@ -80,3 +80,14 @@
num++
if(num)
. = round(. / num, 0.1)
/datum/metric/proc/assess_all_outdoor_mobs()
. = 0
var/num = 0
for(var/mob/living/L in player_list)
var/turf/T = get_turf(L)
if(istype(T) && !istype(T, /turf/space) && T.outdoors)
. += assess_player_activity(L)
num++
if(num)
. = round(. / num, 0.1)

View File

@@ -0,0 +1,21 @@
/*
* Procs for counting active players in different situations. Returns the number of active players within the given cutoff.
*/
/datum/metric/proc/count_all_outdoor_mobs(var/cutoff = 75)
var/num = 0
for(var/mob/living/L in player_list)
var/turf/T = get_turf(L)
if(istype(T) && !istype(T, /turf/space) && T.outdoors)
if(assess_player_activity(L) >= cutoff)
num++
return num
/datum/metric/proc/count_all_space_mobs(var/cutoff = 75)
var/num = 0
for(var/mob/living/L in player_list)
var/turf/T = get_turf(L)
if(istype(T, /turf/space))
if(assess_player_activity(L) >= cutoff)
num++
return num

View File

@@ -69,4 +69,4 @@
for(var/mob/M in player_list)
if(guess_department(M) != department) // Ignore people outside the department we're counting.
continue
. += 1
. += 1