mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Adding a reporting function, available in the debug menu, which tracks some crude statistics for the current round and attempts to estimate the round's current level of stuff happening (or lack thereof) for more consistent and focused badminnery. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2329 316c924e-a436-60f5-8080-3fe189b3f50e
57 lines
872 B
Plaintext
57 lines
872 B
Plaintext
#define PLAYER_WEIGHT 1
|
|
#define HUMAN_DEATH -500
|
|
#define OTHER_DEATH -500
|
|
#define EXPLO_SCORE -1000 //boum
|
|
|
|
//estimated stats
|
|
//80 minute round
|
|
//60 player server
|
|
//48k player-ticks
|
|
|
|
//60 deaths (ideally)
|
|
//20 explosions
|
|
|
|
|
|
var/global/datum/tension/tension_master
|
|
|
|
/datum/tension
|
|
var/score
|
|
|
|
var/deaths
|
|
var/human_deaths
|
|
var/explosions
|
|
|
|
|
|
|
|
proc/process()
|
|
score += get_num_players()*PLAYER_WEIGHT
|
|
|
|
proc/get_num_players()
|
|
var/peeps = 0
|
|
for (var/mob/M in world)
|
|
if (!M.client)
|
|
continue
|
|
peeps += 1
|
|
|
|
return peeps
|
|
|
|
proc/death(var/mob/M)
|
|
if (!M) return
|
|
deaths++
|
|
|
|
if (istype(M,/mob/living/carbon/human))
|
|
score += HUMAN_DEATH
|
|
human_deaths++
|
|
else
|
|
score += OTHER_DEATH
|
|
|
|
|
|
proc/explosion()
|
|
score += EXPLO_SCORE
|
|
explosions++
|
|
|
|
New()
|
|
score = 0
|
|
deaths=0
|
|
human_deaths=0
|
|
explosions=0 |