//Thresholds for Score Ratings
#define SINGULARITY_DESERVES_BETTER -3500
#define SINGULARITY_FODDER -3000
#define ALL_FIRED -2500
#define WASTE_OF_OXYGEN -2000
#define HEAP_OF_SCUM -1500
#define LAB_MONKEYS -1000
#define UNDESIREABLES -500
#define SERVANTS_OF_SCIENCE 500
#define GOOD_BUNCH 1000
#define MACHINE_THIRTEEN 1500
#define PROMOTIONS_FOR_EVERYONE 2000
#define AMBASSADORS_OF_DISCOVERY 3000
#define PRIDE_OF_SCIENCE 4000
#define NANOTRANSEN_FINEST 5000
/datum/controller/subsystem/ticker/proc/scoreboard()
//Print a list of antagonists to the server log
var/list/total_antagonists = list()
//Look into all mobs in world, dead or alive
for(var/datum/mind/Mind in SSticker.minds)
var/temprole = Mind.special_role
if(temprole) //if they are an antagonist of some sort.
if(temprole in total_antagonists) //If the role exists already, add the name to it
total_antagonists[temprole] += ", [Mind.name]([Mind.key])"
else
total_antagonists.Add(temprole) //If the role doesnt exist in the list, create it and add the mob
total_antagonists[temprole] += ": [Mind.name]([Mind.key])"
//Now print them all into the log!
log_game("Antagonists at round end were...")
for(var/i in total_antagonists)
log_game("[i]s[total_antagonists[i]].")
// Score Calculation and Display
// Who is alive/dead, who escaped
for(var/mob/living/silicon/ai/I in GLOB.mob_list)
if(I.stat == DEAD && is_station_level(I.z))
GLOB.score_deadaipenalty++
GLOB.score_deadcrew++
for(var/thing in GLOB.human_list)
var/mob/living/carbon/human/I = thing
if(I.stat == DEAD && is_station_level(I.z))
GLOB.score_deadcrew++
if(SSshuttle.emergency.mode >= SHUTTLE_ENDGAME)
for(var/mob/living/player in GLOB.mob_list)
if(player.client)
if(player.stat != DEAD)
var/turf/location = get_turf(player.loc)
var/area/escape_zone = locate(/area/shuttle/escape)
if(location in escape_zone)
GLOB.score_escapees++
var/cash_score = 0
var/dmg_score = 0
if(SSshuttle.emergency.mode >= SHUTTLE_ENDGAME)
for(var/thing in GLOB.human_list)
var/mob/living/carbon/human/E = thing
cash_score = 0
dmg_score = 0
var/turf/location = get_turf(E.loc)
var/area/escape_zone = SSshuttle.emergency.areaInstance
if(E.stat != DEAD && (location in escape_zone)) // Escapee Scores
cash_score = get_score_container_worth(E)
if(cash_score > GLOB.score_richestcash)
GLOB.score_richestcash = cash_score
GLOB.score_richestname = E.real_name
GLOB.score_richestjob = E.job
GLOB.score_richestkey = E.key
dmg_score = E.getBruteLoss() + E.getFireLoss() + E.getToxLoss() + E.getOxyLoss()
if(dmg_score > GLOB.score_dmgestdamage)
GLOB.score_dmgestdamage = dmg_score
GLOB.score_dmgestname = E.real_name
GLOB.score_dmgestjob = E.job
GLOB.score_dmgestkey = E.key
if(SSticker && SSticker.mode)
SSticker.mode.set_scoreboard_gvars()
// Check station's power levels
for(var/thing in GLOB.apcs)
var/obj/machinery/power/apc/A = thing
if(!is_station_level(A.z)) continue
for(var/obj/item/stock_parts/cell/C in A.contents)
if(C.charge < 2300)
GLOB.score_powerloss++ //200 charge leeway
// Check how much uncleaned mess is on the station
for(var/obj/effect/decal/cleanable/M in world)
if(!is_station_level(M.z)) continue
if(istype(M, /obj/effect/decal/cleanable/blood/gibs))
GLOB.score_mess += 3
if(istype(M, /obj/effect/decal/cleanable/blood))
GLOB.score_mess += 1
if(istype(M, /obj/effect/decal/cleanable/vomit))
GLOB.score_mess += 1
// Bonus Modifiers
var/deathpoints = GLOB.score_deadcrew * 25 //done
var/researchpoints = GLOB.score_researchdone * 30
var/eventpoints = GLOB.score_eventsendured * 50
var/escapoints = GLOB.score_escapees * 25 //done
var/harvests = GLOB.score_stuffharvested * 5
var/shipping = GLOB.score_stuffshipped * 5
var/mining = GLOB.score_oremined * 2 //done, might want polishing
var/meals = GLOB.score_meals * 5
var/power = GLOB.score_powerloss * 20
var/messpoints
if(GLOB.score_mess != 0)
messpoints = GLOB.score_mess //done
var/plaguepoints = GLOB.score_disease * 30
// Good Things
GLOB.score_crewscore += shipping
GLOB.score_crewscore += harvests
GLOB.score_crewscore += mining
GLOB.score_crewscore += researchpoints
GLOB.score_crewscore += eventpoints
GLOB.score_crewscore += escapoints
if(power == 0)
GLOB.score_crewscore += 2500
GLOB.score_powerbonus = 1
GLOB.score_crewscore += meals
if(GLOB.score_allarrested) // This only seems to be implemented for Rev and Nukies. -DaveKorhal
GLOB.score_crewscore *= 3 // This needs to be here for the bonus to be applied properly
GLOB.score_crewscore -= deathpoints
if(GLOB.score_deadaipenalty)
GLOB.score_crewscore -= 250
GLOB.score_crewscore -= power
GLOB.score_crewscore -= messpoints
GLOB.score_crewscore -= plaguepoints
// Show the score - might add "ranks" later
to_chat(world, "The crew's final score is:")
to_chat(world, "[GLOB.score_crewscore]")
// Generate the score panel
var/dat = "Round Statistics and Score