Scoreboard organization/optimization (#32094)

* Scoreboard

* Update next_map.dm

* Update gameticker.dm

* Update role.dm

* ugh

* safe me

* added dat to every proc

* Update scoreboard.dm

* Update scoreboard.dm

* Update department_score.dm

* turfssingulod

* Update misc_score.dm

* Update scoreboard.dm

* Update scoreboard.dm

* Update mobs.dm

* Update items.dm

* Update stunbaton.dm

* Update human_attackhand.dm

* Update living_defense.dm

* Update misc_score.dm

* Update swords_axes_etc.dm

* Update human_attackhand.dm

* Update misc_score.dm

* Update misc_score.dm

* Update scoreboard.dm
This commit is contained in:
adacovsk
2022-02-22 11:39:14 -05:00
committed by GitHub
parent eecab21bff
commit b30153715d
57 changed files with 951 additions and 988 deletions

View File

@@ -212,84 +212,6 @@ var/custom_event_msg = null
//Recall time limit: 2 hours
var/recall_time_limit = 72000
//Goonstyle scoreboard
//NOW AN ASSOCIATIVE LIST
//NO FUCKING EXCUSE FOR THE ATROCITY THAT WAS
var/list/score=list(
"crewscore" = 0, //This is the overall var/score for the whole round
"plasmashipped" = 0,//How much plasma has been sent to centcom?
"stuffshipped" = 0, //How many centcom orders have cargo fulfilled?
"stuffharvested" = 0, //How many harvests have hydroponics done (per crop)?
"oremined" = 0, //How many chunks of ore were smelted
"eventsendured" = 0, //How many random events did the station endure?
"powerloss" = 0, //How many APCs have alarms (under 30 %)?
"maxpower" = 0, //Most watts in grid on any of the world's powergrids.
"escapees" = 0, //How many people got out alive?
"deadcrew" = 0, //Humans who died during the round
"deadsilicon" = 0, //Silicons who died during the round
"mess" = 0, //How much messes on the floor went uncleaned
"litter" = 0, //How much trash is laying on the station floor
"meals" = 0, //How much food was actively cooked that day
"slimes" = 0, //How many slimes were harvested
"artifacts" = 0, //How many large artifacts were analyzed and activated
"disease_good" = 0, //How many unique diseases currently affecting living mobs of cumulated danger <3
"disease_vaccine" = null, //Which many vaccine antibody isolated
"disease_vaccine_score" = 0, //the associated score
"disease_extracted" = 0, //Score based on the unique extracted effects
"disease_effects" = 0, //Score based on the unique extracted effects
"disease_bad" = 0, //How many unique diseases currently affecting living mobs of cumulated danger >= 3
"disease_most" = null, //Most spread disease
"disease_most_count" = 0, //Most spread disease
//These ones are mainly for the stat panel
"powerbonus" = 0, //If all APCs on the station are running optimally, big bonus
"messbonus" = 0, //If there are no messes on the station anywhere, huge bonus
"deadaipenalty" = 0, //AIs who died during the round
"foodeaten" = 0, //How much food was consumed
"clownabuse" = 0, //How many times a clown was punched, struck or otherwise maligned
"slips" = 0, //How many people have slipped during this round
"gunsspawned" = 0, //Guns spawned by the Summon Guns spell. Only guns, not other artifacts.
"dimensionalpushes" = 0, //Amount of times a wizard casted Dimensional Push.
"assesblasted" = 0, //Amount of times a wizard casted Buttbot's Revenge.
"shoesnatches" = 0, //Amount of shoes magically snatched.
"greasewiz" = 0, //Amount of times a wizard casted Grease.
"lightningwiz" = 0, //Amount of times a wizard casted Lighting.
"random_soc" = 0, //Staff of Change bolts set to "random" that hit a human.
"heartattacks" = 0, //Amount of times the "Heart Attack" virus reached final stage, unleashing a hostile floating heart.
"hangmanname" = null, //Player with most correct letter guesses from Curse of the Hangman
"hangmanjob" = null,
"hangmanrecord" = 0,
"hangmankey" = null,
"richestname" = null, //This is all stuff to show who was the richest alive on the shuttle
"richestjob" = null, //Kinda pointless if you dont have a money system i guess
"richestcash" = 0,
"richestkey" = null,
"dmgestname" = null, //Who had the most damage on the shuttle (but was still alive)
"dmgestjob" = null,
"dmgestdamage" = 0,
"dmgestkey" = null,
"explosions" = 0, //How many explosions happened total
"deadpets" = 0, //Only counts 'special' simple_mobs, like Ian, Poly, Runtime, Sasha etc
"buttbotfarts" = 0, //Messages mimicked by buttbots.
"turfssingulod" = 0, //Amount of turfs eaten by singularities.
"shardstouched" = 0, //+1 for each pair of shards that bump into eachother.
"kudzugrowth" = 0, //Amount of kudzu tiles successfully grown, even if they were later eradicated.
"nukedefuse" = 9999, //Seconds the nuke had left when it was defused.
"tobacco" = 0, //Amount of cigarettes, pipes, cigars, etc. lit
"lawchanges" = 0, //Amount of AI modules used.
"syndiphrases" = 0, //Amount of times a syndicate code phrase was used
"syndisponses" = 0, //Amount of times a syndicate code response was used
"arenafights" = 0,
"arenabest" = null,
"money_leaderboard" = list(),
"implant_phrases" = list(),
"global_paintings" = list(),
)
var/list/isolated_antibodies = list(
ANTIGEN_O = 0,
ANTIGEN_A = 0,

View File

@@ -168,8 +168,8 @@ var/stacking_limit = 90
. = ..()
/datum/gamemode/dynamic/send2servers()
send2mainirc("A round of [name] has ended - [living_players.len] survivors, [dead_players.len] ghosts. Final crew score: [score["crewscore"]]. ([score["rating"]])")
send2maindiscord("A round of **[name]** has ended - **[living_players.len]** survivors, **[dead_players.len]** ghosts. Final crew score: **[score["crewscore"]]**. ([score["rating"]])")
send2mainirc("A round of [name] has ended - [living_players.len] survivors, [dead_players.len] ghosts. Final crew score: [score.crewscore]. ([score.rating])")
send2maindiscord("A round of **[name]** has ended - **[living_players.len]** survivors, **[dead_players.len]** ghosts. Final crew score: **[score.crewscore]**. ([score.rating])")
send2mainirc("Dynamic mode Roundstart Threat: [starting_threat][(starting_threat!=threat_level)?" ([threat_level])":""], Midround Threat: [midround_starting_threat][(midround_starting_threat!=midround_threat_level)?" ([midround_threat_level])":""], rulesets: [jointext(rules_text, ", ")].")
send2maindiscord("Dynamic mode Roundstart Threat: **[starting_threat][(starting_threat!=threat_level)?" ([threat_level])":""]**, Midround Threat: **[midround_starting_threat][(midround_starting_threat!=midround_threat_level)?" ([midround_threat_level])":""]**, rulesets: [jointext(rules_text, ", ")]")

View File

@@ -338,7 +338,7 @@
/datum/role/proc/GetFaction()
return faction
/datum/role/proc/Declare()
/datum/role/proc/GetScoreboard()
var/win = 1
var/text = ""
var/mob/M
@@ -483,8 +483,6 @@
</fieldset>
"}
*/
/datum/role/proc/GetScoreboard()
return Declare()
// DO NOT OVERRIDE
/datum/role/Topic(href, href_list)
@@ -706,7 +704,7 @@
dat += "[show_logo ? "<img src='data:image/png;base64,[icon2base64(logo_slave)]' style='position: relative; top: 10;'/> " : "" ] <b>[ckey]</b> as <b>[former_minions[ckey]]</b> <br/>"
return jointext(dat, "")
/datum/role/greytide_leader/Declare()
/datum/role/greytide_leader/GetScoreboard()
if (!(former_minions.len))
return ..()
// else...

View File

@@ -33,7 +33,7 @@
is_enabled = FALSE
/datum/next_map/bagel/is_votable()
if(score["bagelscooked"] < bagel_requirement)
if(score.bagelscooked < bagel_requirement)
var/msg = "Skipping map [name], fewer than [bagel_requirement] bagels made."
message_admins(msg)
warning(msg)
@@ -100,9 +100,8 @@
is_enabled = FALSE
/datum/next_map/lamprey/is_votable()
var/crew_score = score["crewscore"] // So that we can use this in the admin messaging
if(crew_score > -20000)
var/msg = "Skipping map [name], station requires lower than -20000 score (is [crew_score])."
if(score.crewscore > -20000)
var/msg = "Skipping map [name], station requires lower than -20000 score (is [score.crewscore])."
message_admins(msg)
warning(msg)
return FALSE

View File

@@ -135,7 +135,7 @@
O.reagents.trans_to(result_obj, O.reagents.total_volume)
qdel(O)
container.reagents.clear_reagents() //Clear all the reagents we haven't transfered, for instance if we need to cook in water
score["meals"]++
score.meals++
return result_obj

View File

@@ -122,7 +122,7 @@ var/global/current_centcomm_order_id=124901
for(var/typepath in requested)
if(!(typepath in fulfilled) || fulfilled[typepath] < requested[typepath])
return FALSE
score["stuffshipped"]++
score.stuffshipped++
return TRUE
/datum/centcomm_order/proc/Pay(var/complete = TRUE)
@@ -195,7 +195,7 @@ var/global/current_centcomm_order_id=124901
if(toPay)
if(complete)
acct.charge(-toPay,null,"Complete payment for per-unit order #[id]",dest_name = name)
score["stuffshipped"]++
score.stuffshipped++
else
acct.charge(-toPay,null,"Partial payment for per-unit order #[id]",dest_name = name)

View File

@@ -20,7 +20,7 @@
if(!(O.type in left_to_check))
left_to_check[O.type] = 0
left_to_check[O.type] += P.amount
score["plasmashipped"] += P.amount
score.plasmashipped += P.amount
qdel(O)
return 1
return 0

View File

@@ -0,0 +1,194 @@
/datum/controller/gameticker/scoreboard/proc/syndicate_score(var/datum/faction/syndicate/traitor/TR, var/completions)
var/list/boombox = score.implant_phrases
var/synphra = score.syndiphrases
var/synspo = score.syndisponses
if(synphra || synspo || boombox.len)
completions += "<h2><font color='red'>Syndicate</font> Specials</h2>"
if(synphra)
completions += "<BR>The Syndicate code phrases were:<BR>"
completions += "<font color='red'>[syndicate_code_phrase.Join(", ")]</font><BR>"
completions += "The phrases were used [synphra] time[synphra > 1 ? "s" : ""]!"
if(synspo)
completions += "<BR>The Syndicate code responses were:<BR>"
completions += "<font color='red'>[syndicate_code_response.Join(", ")]</font><BR>"
completions += "The responses were used [synspo] time[synspo > 1 ? "s" : ""]!"
if(boombox.len)
completions += "<BR>The following explosive implants were used:<BR>"
for(var/entry in score.implant_phrases)
completions += "[entry]<BR>"
/datum/controller/gameticker/scoreboard/proc/nuke_op_score(var/datum/faction/syndicate/nuke_op/NO)
var/foecount = 0
var/crewcount = 0
var/diskdat = ""
var/bombdat = null
var/opkilled
var/oparrested
var/alloparrested
var/dat
//var/nukedpenalty = 1000
for(var/datum/role/R in NO.members)
foecount++
var/datum/mind/M = R.antag
if(!M || !M.current)
opkilled++
continue
var/turf/T = M.current.loc
if(T && istype(T.loc, /area/security/brig))
oparrested++
else if(M.current.stat == DEAD)
opkilled++
for(var/mob/living/C in mob_list)
if(!istype(C,/mob/living/carbon/human) || !istype(C,/mob/living/silicon/robot) || !istype(C,/mob/living/silicon/ai))
continue
if(C.stat == DEAD)
continue
if(!C.client)
continue
crewcount++
if(foecount == oparrested)
alloparrested = 1
score.crewscore += oparrested * 2000
score.crewscore += opkilled * 250
score.crewscore += oparrested * 1000
//if(score.scores["nuked"])
//score.scores["crewscore"] -= nukedpenalty
/*score.scores["disc"] = 1
for(var/obj/item/weapon/disk/nuclear/A in world)
if(A.loc != /mob/living/carbon)
continue
var/turf/location = get_turf(A.loc)
var/area/bad_zone1 = locate(/area)
var/area/bad_zone2 = locate(/area/syndicate_mothership)
var/area/bad_zone3 = locate(/area/wizard_station)
if(location in bad_zone1)
score.scores["disc"] = 0
if(location in bad_zone2)
score.scores["disc"] = 0
if(location in bad_zone3)
score.scores["disc"] = 0
if(A.loc.z != map.zMainStation)
score.scores["disc"] = 0*/
/*if(score.scores["nuked"])
nukedpenalty = 50000 //Congratulations, your score was nuked
for(var/obj/machinery/nuclearbomb/nuke in machines)
if(nuke.r_code == "Nope")
continue
var/turf/T = get_turf(nuke)
if(istype(T, /area/syndicate_mothership) || istype(T, /area/wizard_station) || istype(T, /area/solar))
nukedpenalty = 1000
else if(istype(T, /area/security/main) || istype(T, /area/security/brig) || istype(T, /area/security/armory) || istype(T, /area/security/checkpoint2))
nukedpenalty = 50000
else if(istype(T, /area/engine))
nukedpenalty = 100000
else
nukedpenalty = 10000*/
for(var/obj/item/weapon/disk/nuclear/N in world)
if(!N)
continue
var/atom/disk_loc = N.loc
while(!istype(disk_loc, /turf))
if(istype(disk_loc, /mob))
var/mob/M = disk_loc
diskdat += "Carried by [M.real_name] "
if(istype(disk_loc, /obj))
var/obj/O = disk_loc
diskdat += "in \a [O.name] "
disk_loc = disk_loc.loc
diskdat += "in [disk_loc.loc]"
break // Should only need one go-round, probably
/*for(var/obj/machinery/nuclearbomb/nuke in machines)
if(nuke.r_code == "Nope")
continue
var/turf/T = nuke.loc
bombdat = T.loc
if(istype(T,/area/syndicate_mothership) || istype(T,/area/wizard_station) || istype(T,/area/solar/) || istype(T,/area))
nukedpenalty = 1000
else if (istype(T,/area/security/main) || istype(T,/area/security/brig) || istype(T,/area/security/armory) || istype(T,/area/security/checkpoint2))
nukedpenalty = 50000
else if (istype(T,/area/engine))
nukedpenalty = 100000
else
nukedpenalty = 5000
break*/
if(!diskdat)
diskdat = "Uh oh. Something has fucked up! Report this."
return dat += {"<B><U>NUCLEAR ASSAULT STATS</U></B><BR>
<B>Number of Operatives:</B> [foecount]<BR>
<B>Number of Surviving Crew:</B> [crewcount]<BR>
<B>Final Location of Nuke:</B> [bombdat]<BR>
<B>Final Location of Disk:</B> [diskdat]<BR><BR>
<B>Operatives Arrested:</B> [oparrested] ([oparrested * 1000] Points)<BR>
<B>Operatives Killed:</B> [opkilled] ([opkilled * 250] Points)<BR>
<B>All Operatives Arrested:</B> [alloparrested ? "Yes" : "No"] ([oparrested * 2000])<BR>
<HR>"}
// <B>Station Destroyed:</B> [score.scores["nuked"] ? "Yes" : "No"] (-[nukedpenalty] Points)<BR>
// <B>Nuclear Disk Secure:</B> [score.scores["disc"] ? "Yes" : "No"] ([score.scores["disc"] * 500] Points)<BR>
/datum/controller/gameticker/scoreboard/proc/revolution_score(var/datum/faction/revolution/RV)
var/foecount = 0
var/comcount = 0
var/revcount = 0
var/loycount = 0
var/revarrested = 0
var/revkilled = 0
var/allrevarrested = 1
var/deadcommand = 0
var/dat
for(var/datum/role/R in RV.members)
if(R.antag.current && R.antag.current.stat != 2)
if(istype(R,/datum/role/revolutionary/leader))
foecount++
else
revcount++
var/datum/mind/M = R.antag
if(!M || !M.current)
revkilled++
continue
var/turf/T = M.current.loc
if(istype(T.loc, /area/security/brig))
revarrested++
else if (M.current.stat == DEAD)
revkilled++
for(var/mob/living/carbon/human/player in mob_list)
if(player.mind)
var/role = player.mind.assigned_role
if(role in list("Captain", "Head of Security", "Head of Personnel", "Chief Engineer", "Research Director"))
if(player.stat == DEAD)
deadcommand++
else
comcount++
else
if(locate(/datum/role/revolutionary) in player.mind.antag_roles)
continue
loycount++
for(var/mob/living/silicon/X in mob_list)
if (X.stat != DEAD)
loycount++
//if(score.scores["traitorswon"])
//score.scores["crewscore"] -= 10000
if(foecount == revarrested)
allrevarrested = 1
score.crewscore += revarrested * 2000
score.crewscore += revarrested * 1000
score.crewscore += revkilled * 500
score.crewscore -= deadcommand * 500
return dat += {"<B><U>REVOLUTION STATS</U></B><BR>
<B>Number of Surviving Revolution Heads:</B> [foecount]<BR>
<B>Number of Surviving Command Staff:</B> [comcount]<BR>
<B>Number of Surviving Revolutionaries:</B> [revcount]<BR>
<B>Number of Surviving Loyal Crew:</B> [loycount]<BR><BR>
<B>Revolution Heads Arrested:</B> [revarrested] ([revarrested * 1000] Points)<BR>
<B>Revolution Heads Slain:</B> [revkilled] ([revkilled * 500] Points)<BR>
<B>Command Staff Slain:</B> [deadcommand] (-[deadcommand * 500] Points)<BR>
<B>All Revolution Heads Arrested:</B> [allrevarrested ? "Yes" : "No"] ([revarrested * 2000] Points)<BR>
<HR>"}
// <B>Revolution Successful:</B> [score.scores["traitorswon"] ? "Yes" : "No"] (-[score.scores["traitorswon"] * revpenalty] Points)<BR>

View File

@@ -0,0 +1,176 @@
/datum/controller/gameticker/scoreboard/proc/medbay_score(var/dat = "")
for (var/ID in disease2_list)
var/disease_spread_count = 0
var/datum/disease2/disease/D = disease2_list[ID]
var/disease_score = 0
for (var/datum/disease2/effect/E in D.effects)
disease_score += text2num(E.badness)
//diseases only count if the mob is still alive
if (disease_score <3)
for (var/mob/living/L in mob_list)
if (ID in L.virus2)
disease_spread_count++
if (L.stat != DEAD)
score.disease_good++
else
for (var/mob/living/L in mob_list)
if(!L.mind) //No ballooning the negative score with infected monkeymen
continue
if (ID in L.virus2)
disease_spread_count++
if (L.stat != DEAD)
score.disease_bad++
if (disease_spread_count > score.disease_most_count)
score.disease_most_count = disease_spread_count
score.disease_most = ID
/*for(var/mob/living/carbon/human/I in mob_list)
if(I.viruses) //Do this guy have any viruses ?
for(var/datum/disease/D in I.viruses) //Alright, start looping through those viruses
score.scores["disease"]++ //One point for every disease
*/
//var/beneficialpoints = score.scores["disease_good"] * 20
score.disease_vaccine = ""
for (var/antigen in all_antigens)
if (isolated_antibodies[antigen] == 1)
score.disease_vaccine += "[antigen]"
if (antigen in blood_antigens)
score.disease_vaccine_score += 40
else if (antigen in common_antigens)
score.disease_vaccine_score += 120
else if (antigen in rare_antigens)
score.disease_vaccine_score += 200
else if (antigen in alien_antigens)
score.disease_vaccine_score += 400
else
score.disease_vaccine += "-"
if (score.disease_vaccine_score == 2320)
score.disease_vaccine_score = 3000 // panacea bonus
//crewscore
score.crewscore -= score.disease_bad * 50 //A diseased crewman is half-dead, as they say, and a double diseased is double half-dead
score.crewscore += score.disease_vaccine_score
score.crewscore += score.disease_effects
return dat
/datum/controller/gameticker/scoreboard/proc/engineering_score(var/dat = "")
var/skip_power_loss = 0
for(var/datum/event/grid_check/check in events)
if(check.activeFor > check.startWhen && check.activeFor < check.endWhen)
skip_power_loss = 1
if(!skip_power_loss)
for(var/obj/machinery/power/apc/A in power_machines)
if(A.z != map.zMainStation)
continue
for(var/obj/item/weapon/cell/C in A.contents)
if(C.percent() < 30)
score.powerloss++ //Enough to auto-cut equipment, so alarm
for(var/datum/powernet/PN in powernets)
if(PN.avail > score.maxpower)
score.maxpower = PN.avail
//var/atmos
//if(score.scores["airloss"] != 0)
//atmos = score.scores["airloss"] * 20 //Air issues are bad, but since it's space, don't stress it too much
//if(!atmos) //No air alarms anywhere
//score.crewscore += 5000 //Give the Atmospheric Technicians a good pat on the back for caring
//score.scores["atmosbonus"] = 1
if(!score.powerloss) //No APCs with bad power
score.powerbonus = 2500
//crewscore
score.crewscore -= score.powerloss * 50 //Power issues are BAD, they mean the Engineers aren't doing their job at all
score.crewscore += score.powerbonus
//score.crewscore -= atmos
return dat
/datum/controller/gameticker/scoreboard/proc/service_score(var/dat = "")
//Janitor
//Check how many uncleaned mess are on the station. We can't run through cleanable for reasons, so yeah, long
for(var/obj/effect/decal/cleanable/M in decals)
if(M.z != map.zMainStation) //Won't work on multi-Z stations, but will do for now
continue
if(M.messcheck())
score.mess++
for(var/obj/item/trash/T in trash_items)
if(T.z != map.zMainStation) //Won't work on multi-Z stations, but will do for now
continue
var/area/A = get_area(T)
if(istype(A,/area/surface/junkyard))
continue
score.litter++
if(score.mess < 5 && score.litter < 5) //Not a single mess or litter on station
score.messbonus = 5000
//crewscore
score.crewscore += score.meals * 5 //Every item cooked (needs to fire make_food()) awards five points
//score.crewscore += score.scores["drinks"] * 5 //All drinks that ever existed award five points. No better way to do it yet
score.crewscore += score.stuffharvested //One harvest is one product. So 5 wheat is 5 points
score.crewscore -= score.mess //If there are any messes, let's count them
score.crewscore -= score.litter //Every item listed under /obj/item/trash will cost one point if it exists
score.crewscore += score.messbonus //Congrats, not even a dirt patch or chips bag anywhere
return dat
/datum/controller/gameticker/scoreboard/proc/supply_score(var/dat = "")
score.crewscore += score.stuffshipped * 100 //Centcom Orders fulfilled
score.crewscore += score.plasmashipped * 0.5 //Plasma Sheets shipped
score.crewscore += score.oremined //Not actually counted at mining, but at processing. One ore smelted is one point
return dat
/datum/controller/gameticker/scoreboard/proc/science_score(var/dat = "")
//var/researchpoints = score.scores["researchdone"] * 20 //One discovered design is 20 points. You'll usually find hundreds
score.crewscore += score.slimes * 20 //How many slimes were harvested
score.crewscore += score.artifacts * 400 //How many large artifacts were analyzed and activated
return dat
/datum/controller/gameticker/scoreboard/proc/silicon_score()
var/ai_completions = ""
var/completions
for(var/mob/living/silicon/ai/ai in mob_list)
var/icon/flat = getFlatIcon(ai)
if(ai.stat != 2)
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [ai.name] (Played by: [get_key(ai)])'s laws at the end of the game were:</b>"}
else
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [ai.name] (Played by: [get_key(ai)])'s laws when it was deactivated were:</b>"}
ai_completions += "<br>[ai.write_laws()]"
if (ai.connected_robots.len)
var/robolist = "<br><b>The AI's loyal minions were:</b> "
for(var/mob/living/silicon/robot/robo in ai.connected_robots)
if (!robo.connected_ai || !isMoMMI(robo)) // Don't report MoMMIs or unslaved robutts
continue
robolist += "[robo.name][robo.stat?" (Deactivated) (Played by: [get_key(robo)]), ":" (Played by: [get_key(robo)]), "]"
ai_completions += "[robolist]"
for (var/mob/living/silicon/robot/robo in mob_list)
if(!robo)
continue
var/icon/flat = getFlatIcon(robo)
if (!robo.connected_ai)
if (robo.stat != 2)
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [robo.name] (Played by: [get_key(robo)]) survived as an AI-less [isMoMMI(robo)?"MoMMI":"borg"]! Its laws were:</b>"}
else
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [robo.name] (Played by: [get_key(robo)]) was unable to survive the rigors of being a [isMoMMI(robo)?"MoMMI":"cyborg"] without an AI. Its laws were:</b>"}
else
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [robo.name] (Played by: [get_key(robo)]) [robo.stat!=2?"survived":"perished"] as a [isMoMMI(robo)?"MoMMI":"cyborg"] slaved to [robo.connected_ai]! Its laws were:</b>"}
ai_completions += "<br>[robo.write_laws()]"
for(var/mob/living/silicon/pai/pAI in mob_list)
var/icon/flat = getFlatIcon(pAI)
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [pAI.name] (Played by: [get_key(pAI)]) [pAI.stat!=2?"survived":"perished"] as a pAI whose master was [pAI.master]! Its directives were:</b><br>[pAI.write_directives()]"}
var/siliconpoints = score.deadsilicon * 500 //Silicons certainly aren't either
var/multi = find_active_faction_by_type(/datum/faction/malf) ? 1 : -1 //Dead silicons on malf are good
score.crewscore += (siliconpoints*multi)
if(score.deadaipenalty)
score.crewscore += 1000*multi //Give a harsh punishment for killing the AI
if(ai_completions)
completions += "<h2>Silicons Laws</h2>"
completions += ai_completions
completions += "<HR>"
return completions

View File

@@ -0,0 +1,125 @@
/datum/controller/gameticker/scoreboard/proc/misc_score(var/completions = "")
score.crewscore -= round(turfssingulod/2)
var/list/gallery = score.global_paintings
var/painting_completions = ""
if(gallery.len) //the list of all artworks
var/list/artworks = list() //list of authors, for sorting later
for(var/obj/structure/painting/custom/painting in gallery)
if(painting.show_on_scoreboard && !painting.painting_data.is_blank())
var/painting_author = painting.painting_data.author
if(!painting_author)
painting_author = "Anonymous"
if(!artworks[painting_author])
artworks[painting_author] = list()
artworks[painting_author] += painting
var/list/sorted_artists_list = sortList(artworks)
var/currentartist = ""
for(var/artistsandworks in sorted_artists_list) //list of lists of paintings
var/tooble = ""
var/row1 = ""
var/row2 = ""
var/list/artist_and_their_works = sorted_artists_list[artistsandworks]
for(var/obj/structure/painting/custom/painting in artist_and_their_works)
var/title = painting.painting_data.title
if(!title)
title = "Nameless"
var/icon/flat = getFlatIcon(painting)
row1 += {"<td><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'></td>"}
row2 += {"<td>"[title]"</td>"}
tooble += {"<tr>[row1]</tr><tr>[row2]</tr>"}
if(artistsandworks != currentartist)
currentartist = artistsandworks
painting_completions += {"<h3>[artistsandworks]</h3>"}
painting_completions += {"<table>[tooble]</table>"}
completions += "<h2>Artisans and their artworks</h2>"
completions += painting_completions
completions += "<HR>"
if(bomberman_mode)
completions += "<br>[bomberman_declare_completion()]"
if(ticker.achievements.len)
completions += "<br>[achievement_declare_completion()]"
score.money_leaderboard = SSpersistence_misc.tasks[/datum/persistence_task/highscores]
var/list/rich_escapes = list()
for(var/mob/living/player in player_list)
if(player.stat != DEAD)
var/turf/T = get_turf(player)
if(!T)
continue
if(istype(T.loc, /area/shuttle/escape/centcom) || istype(T.loc, /area/shuttle/escape_pod1/centcom) || istype(T.loc, /area/shuttle/escape_pod2/centcom) || istype(T.loc, /area/shuttle/escape_pod3/centcom) || istype(T.loc, /area/shuttle/escape_pod5/centcom))
score.escapees++
var/cashscore = 0
var/dmgscore = 0
for(var/obj/item/weapon/card/id/C1 in get_contents_in_object(player, /obj/item/weapon/card/id))
cashscore += C1.GetBalance() //From bank account
if(istype(C1.virtual_wallet))
cashscore += C1.virtual_wallet.money
for(var/obj/item/weapon/spacecash/C2 in get_contents_in_object(player, /obj/item/weapon/spacecash))
cashscore += (C2.amount * C2.worth)
var/datum/record/money/record = new(player.key, player.job, cashscore)
rich_escapes += record
if(cashscore > score.richestcash)
score.richestcash = cashscore
score.richestname = player.real_name
score.richestjob = player.job
score.richestkey = player.key
dmgscore = player.bruteloss + player.fireloss + player.toxloss + player.oxyloss
if(dmgscore > score.dmgestdamage)
score.dmgestdamage = dmgscore
score.dmgestname = player.real_name
score.dmgestjob = player.job
score.dmgestkey = player.key
if(player.hangman_score > score.hangmanrecord)
score.hangmanrecord = player.hangman_score
score.hangmanname = player.real_name
score.hangmanjob = player.job
score.hangmankey = player.key
if(player.job == "Clown")
for(var/thing in player.attack_log)
if(findtext(thing, "<font color='orange'>")) //I just dropped 10 IQ points from seeing this
score.clownabuse++
var/datum/persistence_task/highscores/leaderboard = score.money_leaderboard
leaderboard.insert_records(rich_escapes)
score.time = round(world.time/10) //One point for every five seconds. One minute is 12 points, one hour 720 points
for(var/mob/living/simple_animal/SA in dead_mob_list)
if(SA.is_pet)
score.deadpets++
score.crewscore -= score.deadcrew * 250 //Human beans aren't free
score.crewscore += score.eventsendured * 200 //Events fine every 10 to 15 and are uncommon
score.crewscore += score.escapees * 100 //Two rescued human beans are worth a dead one
score.arenafights = arena_rounds
var/transfer_total = 0
for(var/datum/money_account/A in all_money_accounts)
for(var/datum/transaction/T in A.transaction_log)
var/amt = text2num(T.amount)
if(amt <= 0) // This way we don't track payouts or starting funds, only money transferred to terminals or between players
transfer_total += abs(amt)
score.totaltransfer = transfer_total
arena_top_score = 0
for(var/x in arena_leaderboard)
if(arena_leaderboard[x] > arena_top_score)
arena_top_score = arena_leaderboard[x]
for(var/x in arena_leaderboard)
if(arena_leaderboard[x] == arena_top_score)
score.arenabest += "[x] "
return completions

View File

@@ -0,0 +1,314 @@
var/global/datum/controller/gameticker/scoreboard/score = new()
/datum/controller/gameticker/scoreboard
var/crewscore = 0 //This is the overall var/score for the whole round
var/plasmashipped = 0 //How much plasma has been sent to centcom?
var/stuffshipped = 0 //How many centcom orders have cargo fulfilled?
var/stuffharvested = 0 //How many harvests have hydroponics done (per crop)?
var/oremined = 0 //How many chunks of ore were smelted
var/eventsendured = 0 //How many random events did the station endure?
var/powerloss = 0 //How many APCs have alarms (under 30 %)?
var/maxpower = 0 //Most watts in grid on any of the world's powergrids.
var/escapees = 0 //How many people got out alive?
var/deadcrew = 0 //Humans who died during the round
var/deadsilicon = 0 //Silicons who died during the round
var/mess = 0 //How much messes on the floor went uncleaned
var/litter = 0 //How much trash is laying on the station floor
var/meals = 0 //How much food was actively cooked that day
var/slimes = 0 //How many slimes were harvested
var/artifacts = 0 //How many large artifacts were analyzed and activated
var/disease_good = 0 //How many unique diseases currently affecting living mobs of cumulated danger <3
var/disease_vaccine = null //Which many vaccine antibody isolated
var/disease_vaccine_score= 0 //the associated score
var/disease_extracted = 0 //Score based on the unique extracted effects
var/disease_effects = 0 //Score based on the unique extracted effects
var/disease_bad = 0 //How many unique diseases currently affecting living mobs of cumulated danger >= 3
var/disease_most = null //Most spread disease
var/disease_most_count = 0 //Most spread disease
//These ones are mainly for the stat panel
var/powerbonus = 0 //If all APCs on the station are running optimally, big bonus
var/messbonus = 0 //If there are no messes on the station anywhere, huge bonus
var/deadaipenalty = 0 //AIs who died during the round
var/foodeaten = 0 //How much food was consumed
var/clownabuse = 0 //How many times a clown was punched, struck or otherwise maligned
var/slips = 0 //How many people have slipped during this round
var/gunsspawned = 0 //Guns spawned by the Summon Guns spell. Only guns, not other artifacts.
var/dimensionalpushes = 0 //Amount of times a wizard casted Dimensional Push.
var/assesblasted = 0 //Amount of times a wizard casted Buttbot's Revenge.
var/shoesnatches = 0 //Amount of shoes magically snatched.
var/greasewiz = 0 //Amount of times a wizard casted Grease.
var/lightningwiz = 0 //Amount of times a wizard casted Lighting.
var/random_soc = 0 //Staff of Change bolts set to "random" that hit a human.
var/heartattacks = 0 //Amount of times the "Heart Attack" virus reached final stage, unleashing a hostile floating heart.
var/hangmanname = null //Player with most correct letter guesses from Curse of the Hangman
var/hangmanjob = null
var/hangmanrecord = 0
var/hangmankey = null
var/richestname = null //This is all stuff to show who was the richest alive on the shuttle
var/richestjob = null //Kinda pointless if you dont have a money system i guess
var/richestcash = 0
var/richestkey = null
var/dmgestname = null //Who had the most damage on the shuttle (but was still alive)
var/dmgestjob = null
var/dmgestdamage = 0
var/dmgestkey = null
var/explosions = 0 //How many explosions happened total
var/largeexplosions = 0 // >1 devastation range
var/deadpets = 0 //Only counts 'special' simple_mobs, like Ian, Poly, Runtime, Sasha etc
var/buttbotfarts = 0 //Messages mimicked by buttbots.
var/turfssingulod = 0 //Amount of turfs eaten by singularities.
var/shardstouched = 0 //+1 for each pair of shards that bump into eachother.
var/kudzugrowth = 0 //Amount of kudzu tiles successfully grown, even if they were later eradicated.
var/nukedefuse = 9999 //Seconds the nuke had left when it was defused.
var/tobacco = 0 //Amount of cigarettes, pipes, cigars, etc. lit
var/lawchanges = 0 //Amount of AI modules used.
var/syndiphrases = 0 //Amount of times a syndicate code phrase was used
var/syndisponses = 0 //Amount of times a syndicate code response was used
var/arenafights = 0
var/arenabest = null
var/rating = 0
var/time = 0
var/totaltransfer = 0
var/turfsonfire = 0
var/shuttlebombed = 0
var/bagelscooked = 0
var/disease = 0
var/list/money_leaderboard = list()
var/list/implant_phrases = list()
var/list/global_paintings = list()
/datum/controller/gameticker/scoreboard/proc/main(var/dat = "")
var/datum/faction/syndicate/traitor/TR = find_active_faction_by_type(/datum/faction/syndicate/traitor)
var/datum/faction/syndicate/nuke_op/NO = find_active_faction_by_type(/datum/faction/syndicate/nuke_op)
var/datum/faction/revolution/RV = find_active_faction_by_type(/datum/faction/revolution)
ticker.mode.declare_completion()
dat += "[ticker.mode.dat]<HR>" //figure this out
//populate scores
dat += medbay_score(dat)
dat += engineering_score(dat)
dat += service_score(dat)
dat += supply_score(dat)
dat += science_score(dat)
if(NO)
dat += nuke_op_score(NO)
if(RV)
dat += revolution_score(RV)
if(TR)
dat += syndicate_score(TR)
dat += silicon_score(dat)
dat += misc_score(dat)
dat += display(dat)
round_end_info = dat
round_end_info_no_img = remove_images(dat)
log_game(round_end_info_no_img)
stat_collection.crew_score = score.crewscore
to_chat(world, "<b>The crew's final score is:</b>")
to_chat(world, "<b><font size='4'>[score.crewscore]</font></b>")
for(var/mob/E in player_list)
E.display_round_end_scoreboard()
ticker.mode.send2servers()
return
/datum/controller/gameticker/scoreboard/proc/display(var/dat)
dat += {"<BR><h2>Round Statistics and Score</h2>"}
dat += {"<B><U>GENERAL STATS</U></B><BR>
<U>THE GOOD:</U><BR>
<B>Length of Shift:</B> [round(world.time/600)] Minutes ([round(score.time * 0.2)] Points)<BR>
<B>Shuttle Escapees:</B> [score.escapees] ([score.escapees * 100] Points)<BR>
<B>Random Events Endured:</B> [score.eventsendured] ([score.eventsendured * 200] Points)<BR>
<B>Meals Prepared:</B> [score.meals] ([score.meals * 5] Points)<BR>
<B>Hydroponics Harvests:</B> [score.stuffharvested] ([score.stuffharvested] Points)<BR>
<B>Ultra-Clean Station:</B> [score.messbonus ? "Yes" : "No"] ([score.messbonus] Points)<BR>
<B>Plasma Shipped:</B> [score.plasmashipped] ([score.plasmashipped * 0.5] Points)<BR>
<B>Centcom Orders Fulfilled:</B> [score.stuffshipped] ([score.stuffshipped * 100] Points)<BR>
<B>Ore Smelted:</B> [score.oremined] ([score.oremined] Points)<BR>
<B>Whole Station Powered:</B> [score.powerbonus ? "Yes" : "No"] ([score.powerbonus] Points)<BR>
<B>Isolated Vaccines:</B> [score.disease_vaccine] ([score.disease_vaccine_score] Points)<BR>
<B>Extracted Symptoms:</B> [score.disease_extracted] ([score.disease_effects] Points)<BR>
<B>Harvested Slimes:</B> [score.slimes] ([score.slimes * 20] Points)<BR><BR>
<B>Analyzed & Activated Large Artifacts:</B> [score.artifacts] ([score.artifacts * 400] Points)<BR><BR>
<U>THE BAD:</U><BR>
<B>Dead Crewmen:</B> [score.deadcrew] (-[score.deadcrew * 250] Points)<BR>
<B>Destroyed Silicons:</B> [score.deadsilicon] ([find_active_faction_by_type(/datum/faction/malf) ? score.deadsilicon * 500 : score.deadsilicon * -500] Points)<BR>
<B>AIs Destroyed:</B> [score.deadaipenalty] ([find_active_faction_by_type(/datum/faction/malf) ? score.deadaipenalty * 1000 : score.deadaipenalty * -1000] Points)<BR>
<B>Uncleaned Messes:</B> [score.mess] (-[score.mess] Points)<BR>
<B>Trash on Station:</B> [score.litter] (-[score.litter] Points)<BR>
<B>Station Power Issues:</B> [score.powerloss] (-[score.powerloss * 50] Points)<BR>
<B>Tiles destroyed by a singularity:</B> [score.turfssingulod] (-[round(score.turfssingulod/2)] Points)<BR>
<B>Bad diseases in living mobs:</B> [score.disease_bad] (-[score.disease_bad * 50] Points)<BR><BR>
<U>THE WEIRD</U><BR>"}
/* <B>Final Station Budget:</B> $[num2text(totalfunds,50)]<BR>"}
var/profit = totalfunds - 100000
if (profit > 0)
dat += "<B>Station Profit:</B> +[num2text(profit,50)]<BR>"
else if (profit < 0)
dat += "<B>Station Deficit:</B> [num2text(profit,50)]<BR>"}*/
dat += "<B>Food Eaten:</b> [score.foodeaten]<BR>"
dat += "<B>Times a Clown was Abused:</B> [score.clownabuse]<BR>"
dat += "<B>Number of Times Someone was Slipped: </B> [score.slips]<BR>"
dat += "<B>Number of Explosions This Shift:</B> [score.explosions]<BR>"
dat += "<B>Number of Arena Rounds:</B> [score.arenafights]<BR>"
dat += "<B>Total money transferred:</B> [score.totaltransfer]<BR>"
if(score.dimensionalpushes > 0)
dat += "<B>Dimensional Pushes:</B> [score.dimensionalpushes]<BR>"
if(score.assesblasted > 0)
dat += "<B>Asses Blasted:</B> [score.assesblasted]<BR>"
if(score.shoesnatches > 0)
dat += "<B>Pairs of Shoes Snatched:</B> [score.shoesnatches]<BR>"
if(score.buttbotfarts > 0)
dat += "<B>Buttbot Farts:</B> [score.buttbotfarts]<BR>"
if(score.shardstouched > 0)
dat += "<B>Number of Times the Crew went Shard to Shard:</B> [score.shardstouched]<BR>"
if(score.lawchanges > 0)
dat += "<B>Law Upload Modules Used:</B> [score.lawchanges]<BR>"
if(score.gunsspawned > 0)
dat += "<B>Guns Magically Spawned:</B> [score.gunsspawned]<BR>"
if(score.hangmanrecord > 0)
dat += "<B>Highest Hangman Score:</B> [score.hangmanname], [score.hangmanjob]: [score.hangmanrecord] ([score.hangmankey])<BR>"
if(score.nukedefuse < 30)
dat += "<B>Seconds Left on the Nuke When It Was Defused:</B> [score.nukedefuse]<BR>"
if(score.disease_most != null)
var/datum/disease2/disease/D = disease2_list[score.disease_most]
var/nickname = ""
var/dis_name = ""
if (score.disease_most in virusDB)
var/datum/data/record/v = virusDB[score.disease_most]
nickname = v.fields["nickname"] ? " \"[v.fields["nickname"]]\"" : ""
dis_name = v.fields["name"]
dat += "<B>Most Spread Disease:</B> [dis_name ? "[dis_name]":"[D.form] #[add_zero("[D.uniqueID]", 4)]-[add_zero("[D.subID]", 4)]"][nickname] (Origin: [D.origin], Strength: [D.strength]%, spread among [score.disease_most_count] mobs)<BR>"
for(var/datum/disease2/effect/e in D.effects)
dat += "&#x25CF; Stage [e.stage] - <b>[e.name]</b><BR>"
if(weathertracker.len && map.climate)
dat += "<B>Climate Composition: ([map.climate])</B> "
//first, total ticks
var/totalticks = total_list(get_list_of_elements(weathertracker))
for(var/element in weathertracker)
dat += "[element] ([round(weathertracker[element]*100/totalticks)]%) "
dat += "<BR>"
//Vault and away mission specific scoreboard elements
//The process_scoreboard() proc returns a list of strings associated with their score value (the number that's added to the total score)
for(var/datum/map_element/ME in map_elements)
var/list/L = ME.process_scoreboard()
if(!L || !L.len)
continue
dat += "<br><u>[ME.name ? uppertext(ME.name) : "UNKNOWN SPACE STRUCTURE"]</u><br>"
for(var/score_value in L)
dat += "<b>[score_value]</b>[L[score_value] ? "<b>:</b> [L[score_value]]" : ""]<br>"
score.crewscore += L[score_value]
dat += "<br>"
if(arena_top_score)
dat += "<B>Best Arena Fighter (won [arena_top_score] rounds!):</B> [score.arenabest]<BR>"
if(score.escapees)
if(score.dmgestdamage)
dat += "<B>Most Battered Escapee:</B> [score.dmgestname], [score.dmgestjob]: [score.dmgestdamage] damage ([score.dmgestkey])<BR>"
if(score.richestcash)
dat += "<B>Richest Escapee:</B> [score.richestname], [score.richestjob]: $[score.richestcash] ([score.richestkey])<BR>"
else
dat += "The station wasn't evacuated or there were no survivors!<BR>"
dat += "<B>Department Leaderboard:</B><BR>"
var/list/dept_leaderboard = get_dept_leaderboard()
for (var/i = 1 to dept_leaderboard.len)
dat += "<B>#[i] - </B>[dept_leaderboard[i]] ($[dept_leaderboard[dept_leaderboard[i]]])<BR>"
dat += {"<HR><BR>
<B><U>FINAL SCORE: [score.crewscore]</U></B><BR>"}
score.rating = "A Rating"
switch(score.crewscore)
if(-INFINITY to -50000)
score.rating = "Even the Singularity Deserves Better"
if(-49999 to -5000)
score.rating = "Singularity Fodder"
if(-4999 to -1000)
score.rating = "You're All Fired"
if(-999 to -500)
score.rating = "A Waste of Perfectly Good Oxygen"
if(-499 to -250)
score.rating = "A Wretched Heap of Scum and Incompetence"
if(-249 to -100)
score.rating = "Outclassed by Lab Monkeys"
if(-99 to -21)
score.rating = "The Undesirables"
if(-20 to -1)
score.rating = "Not So Good"
if(0)
score.rating = "Nothing of Value"
if(1 to 20)
score.rating = "Ambivalently Average"
if(21 to 99)
score.rating = "Not Bad, but Not Good"
if(100 to 249)
score.rating = "Skillful Servants of Science"
if(250 to 499)
score.rating = "Best of a Good Bunch"
if(500 to 999)
score.rating = "Lean Mean Machine Thirteen"
if(1000 to 4999)
score.rating = "Promotions for Everyone"
if(5000 to 9999)
score.rating = "Ambassadors of Discovery"
if(10000 to 49999)
score.rating = "The Pride of Science Itself"
if(50000 to INFINITY)
score.rating = "Nanotrasen's Finest"
dat += "<B><U>RATING:</U></B> [score.rating]<br><br>"
var/datum/persistence_task/highscores/leaderboard = score.money_leaderboard
dat += "<b>TOP 5 RICHEST ESCAPEES:</b><br>"
if(!leaderboard.data.len)
dat += "<b>MONTHLY TOP 5 RICHEST ESCAPEES:</b><br>"
else
var/i = 1
for(var/datum/record/money/entry in leaderboard.data)
var/cash = num2text(entry.cash, 12)
var/list/split_date = splittext(entry.date, "-")
if(text2num(split_date[2]) != text2num(time2text(world.timeofday, "MM")))
leaderboard.clear_records()
break
else
dat += "[i++]) <b>$[cash]</b> by <b>[entry.ckey]</b> ([entry.role]). That shift lasted [entry.shift_duration]. Date: [entry.date]<br>"
return dat
/mob/proc/display_round_end_scoreboard()
if (!client)
return
var/datum/browser/popup = new(src, "roundstats", "Round End Summary", 1000, 600)
popup.set_content(round_end_info)
popup.open()
winset(client, "rpane.round_end", "is-visible=true")
winset(client, "rpane.last_round_end", "is-visible=false")
/datum/achievement
var/item
var/ckey
var/mob_name
var/award_name
var/award_desc
/datum/achievement/New(var/item, var/ckey, var/mob_name, var/award_name, var/award_desc)
src.item = item
src.ckey = ckey
src.mob_name = mob_name
src.award_name = award_name
src.award_desc = award_desc

View File

@@ -573,7 +573,7 @@ var/datum/controller/gameticker/ticker
if(!ooc_allowed)
to_chat(world, "<B>The OOC channel has been automatically re-enabled!</B>")
ooc_allowed = TRUE
scoreboard()
score.main()
return 1
/datum/controller/gameticker/proc/bomberman_declare_completion()

View File

@@ -241,7 +241,7 @@ var/list/nuclear_bombs = list()
else
src.icon_state = "nuclearbomb1"
bomb_set = 0
score["nukedefuse"] = min(src.timeleft, score["nukedefuse"])
score.nukedefuse = min(src.timeleft, score.nukedefuse)
var/datum/gamemode/dynamic/dynamic_mode = ticker.mode
if (istype(dynamic_mode))
dynamic_mode.update_stillborn_rulesets()
@@ -250,7 +250,7 @@ var/list/nuclear_bombs = list()
if(safety)
src.timing = 0
bomb_set = 0
score["nukedefuse"] = min(src.timeleft, score["nukedefuse"])
score.nukedefuse = min(src.timeleft, score.nukedefuse)
var/datum/gamemode/dynamic/dynamic_mode = ticker.mode
if (istype(dynamic_mode))
dynamic_mode.update_stillborn_rulesets()

View File

@@ -1,762 +0,0 @@
/datum/controller/gameticker/proc/scoreboard(var/completions)
mode.declare_completion()
completions += "[mode.dat]<HR>"
var/list/boombox = score["implant_phrases"]
var/synphra = score["syndiphrases"]
var/synspo = score["syndisponses"]
if(synphra || synspo || boombox.len)
completions += "<h2><font color='red'>Syndicate</font> Specials</h2>"
if(synphra)
completions += "<BR>The Syndicate code phrases were:<BR>"
completions += "<font color='red'>[syndicate_code_phrase.Join(", ")]</font><BR>"
completions += "The phrases were used [synphra] time[synphra > 1 ? "s" : ""]!"
if(synspo)
completions += "<BR>The Syndicate code responses were:<BR>"
completions += "<font color='red'>[syndicate_code_response.Join(", ")]</font><BR>"
completions += "The responses were used [synspo] time[synspo > 1 ? "s" : ""]!"
if(boombox.len)
completions += "<BR>The following explosive implants were used:<BR>"
for(var/entry in score["implant_phrases"])
completions += "[entry]<BR>"
var/list/gallery = score["global_paintings"]
var/painting_completions = ""
if(gallery.len) //the list of all artworks
var/list/artworks = list() //list of authors, for sorting later
for(var/obj/structure/painting/custom/painting in gallery)
if(painting.show_on_scoreboard && !painting.painting_data.is_blank())
var/painting_author = painting.painting_data.author
if(!painting_author)
painting_author = "Anonymous"
if(!artworks[painting_author])
artworks[painting_author] = list()
artworks[painting_author] += painting
var/list/sorted_artists_list = sortList(artworks)
var/currentartist = ""
for(var/artistsandworks in sorted_artists_list) //list of lists of paintings
var/tooble = ""
var/row1 = ""
var/row2 = ""
var/list/artist_and_their_works = sorted_artists_list[artistsandworks]
for(var/obj/structure/painting/custom/painting in artist_and_their_works)
var/title = painting.painting_data.title
if(!title)
title = "Nameless"
var/icon/flat = getFlatIcon(painting)
row1 += {"<td><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'></td>"}
row2 += {"<td>"[title]"</td>"}
tooble += {"<tr>[row1]</tr><tr>[row2]</tr>"}
if(artistsandworks != currentartist)
currentartist = artistsandworks
painting_completions += {"<h3>[artistsandworks]</h3>"}
painting_completions += {"<table>[tooble]</table>"}
completions += "<h2>Artisans and their artworks</h2>"
completions += painting_completions
completions += "<HR>"
/*//Calls auto_declare_completion_* for all modes
for(var/handler in typesof(/datum/gamemode/proc))
if(findtext("[handler]","auto_declare_completion_"))
completions += "[call(mode, handler)()]"*/
//completions += "<br>[ert_declare_completion()]"
//completions += "<br>[deathsquad_declare_completion()]"
if(bomberman_mode)
completions += "<br>[bomberman_declare_completion()]"
if(ticker.achievements.len)
completions += "<br>[achievement_declare_completion()]"
var/ai_completions = ""
for(var/mob/living/silicon/ai/ai in mob_list)
var/icon/flat = getFlatIcon(ai)
if(ai.stat != 2)
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [ai.name] (Played by: [get_key(ai)])'s laws at the end of the game were:</b>"}
else
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [ai.name] (Played by: [get_key(ai)])'s laws when it was deactivated were:</b>"}
ai_completions += "<br>[ai.write_laws()]"
if (ai.connected_robots.len)
var/robolist = "<br><b>The AI's loyal minions were:</b> "
for(var/mob/living/silicon/robot/robo in ai.connected_robots)
if (!robo.connected_ai || !isMoMMI(robo)) // Don't report MoMMIs or unslaved robutts
continue
robolist += "[robo.name][robo.stat?" (Deactivated) (Played by: [get_key(robo)]), ":" (Played by: [get_key(robo)]), "]"
ai_completions += "[robolist]"
for (var/mob/living/silicon/robot/robo in mob_list)
if(!robo)
continue
var/icon/flat = getFlatIcon(robo)
if (!robo.connected_ai)
if (robo.stat != 2)
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [robo.name] (Played by: [get_key(robo)]) survived as an AI-less [isMoMMI(robo)?"MoMMI":"borg"]! Its laws were:</b>"}
else
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [robo.name] (Played by: [get_key(robo)]) was unable to survive the rigors of being a [isMoMMI(robo)?"MoMMI":"cyborg"] without an AI. Its laws were:</b>"}
else
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [robo.name] (Played by: [get_key(robo)]) [robo.stat!=2?"survived":"perished"] as a [isMoMMI(robo)?"MoMMI":"cyborg"] slaved to [robo.connected_ai]! Its laws were:</b>"}
ai_completions += "<br>[robo.write_laws()]"
for(var/mob/living/silicon/pai/pAI in mob_list)
var/icon/flat = getFlatIcon(pAI)
ai_completions += {"<br><b><img class='icon' src='data:image/png;base64,[iconsouth2base64(flat)]'> [pAI.name] (Played by: [get_key(pAI)]) [pAI.stat!=2?"survived":"perished"] as a pAI whose master was [pAI.master]! Its directives were:</b><br>[pAI.write_directives()]"}
if (ai_completions)
completions += "<h2>Silicons Laws</h2>"
completions += ai_completions
completions += "<HR>"
//Score Calculation and Display
for (var/ID in disease2_list)
var/disease_spread_count = 0
var/datum/disease2/disease/D = disease2_list[ID]
var/disease_score = 0
for (var/datum/disease2/effect/E in D.effects)
disease_score += text2num(E.badness)
//diseases only count if the mob is still alive
if (disease_score <3)
for (var/mob/living/L in mob_list)
if (ID in L.virus2)
disease_spread_count++
if (L.stat != DEAD)
score["disease_good"]++
else
for (var/mob/living/L in mob_list)
if(!L.mind) //No ballooning the negative score with infected monkeymen
continue
if (ID in L.virus2)
disease_spread_count++
if (L.stat != DEAD)
score["disease_bad"]++
if (disease_spread_count > score["disease_most_count"])
score["disease_most_count"] = disease_spread_count
score["disease_most"] = ID
//Run through humans for diseases, also the Clown
for(var/mob/living/carbon/human/I in mob_list)
/*
if(I.viruses) //Do this guy have any viruses ?
for(var/datum/disease/D in I.viruses) //Alright, start looping through those viruses
score["disease"]++ //One point for every disease
*/
if(I.job == "Clown")
for(var/thing in I.attack_log)
if(findtext(thing, "<font color='orange'>")) //I just dropped 10 IQ points from seeing this
score["clownabuse"]++
score["money_leaderboard"] = SSpersistence_misc.tasks[/datum/persistence_task/highscores]
var/list/rich_escapes = list()
for(var/mob/living/player in player_list)
if(player.stat != DEAD)
var/turf/T = get_turf(player)
if(!T)
continue
if(istype(T.loc, /area/shuttle/escape/centcom) || istype(T.loc, /area/shuttle/escape_pod1/centcom) || istype(T.loc, /area/shuttle/escape_pod2/centcom) || istype(T.loc, /area/shuttle/escape_pod3/centcom) || istype(T.loc, /area/shuttle/escape_pod5/centcom))
score["escapees"]++
var/cashscore = 0
var/dmgscore = 0
for(var/obj/item/weapon/card/id/C1 in get_contents_in_object(player, /obj/item/weapon/card/id))
cashscore += C1.GetBalance() //From bank account
if(istype(C1.virtual_wallet))
cashscore += C1.virtual_wallet.money
for(var/obj/item/weapon/spacecash/C2 in get_contents_in_object(player, /obj/item/weapon/spacecash))
cashscore += (C2.amount * C2.worth)
var/datum/record/money/record = new(player.key, player.job, cashscore)
rich_escapes += record
if(cashscore > score["richestcash"])
score["richestcash"] = cashscore
score["richestname"] = player.real_name
score["richestjob"] = player.job
score["richestkey"] = player.key
dmgscore = player.bruteloss + player.fireloss + player.toxloss + player.oxyloss
if(dmgscore > score["dmgestdamage"])
score["dmgestdamage"] = dmgscore
score["dmgestname"] = player.real_name
score["dmgestjob"] = player.job
score["dmgestkey"] = player.key
if(player.hangman_score > score["hangmanrecord"])
score["hangmanrecord"] = player.hangman_score
score["hangmanname"] = player.real_name
score["hangmanjob"] = player.job
score["hangmankey"] = player.key
var/datum/persistence_task/highscores/leaderboard = score["money_leaderboard"]
leaderboard.insert_records(rich_escapes)
//var/nukedpenalty = 1000
var/datum/faction/syndicate/nuke_op/NO = find_active_faction_by_type(/datum/faction/syndicate/nuke_op)
if(NO)
var/foecount = 0
for(var/datum/role/R in NO.members)
foecount++
var/datum/mind/M = R.antag
if(!M || !M.current)
score["opkilled"]++
continue
var/turf/T = M.current.loc
if(T && istype(T.loc, /area/security/brig))
score["oparrested"]++
else if(M.current.stat == DEAD)
score["opkilled"]++
if(foecount == score["arrested"])
score["alloparrested"] = 1
/*score["disc"] = 1
for(var/obj/item/weapon/disk/nuclear/A in world)
if(A.loc != /mob/living/carbon)
continue
var/turf/location = get_turf(A.loc)
var/area/bad_zone1 = locate(/area)
var/area/bad_zone2 = locate(/area/syndicate_mothership)
var/area/bad_zone3 = locate(/area/wizard_station)
if(location in bad_zone1)
score["disc"] = 0
if(location in bad_zone2)
score["disc"] = 0
if(location in bad_zone3)
score["disc"] = 0
if(A.loc.z != map.zMainStation)
score["disc"] = 0*/
/*if(score["nuked"])
nukedpenalty = 50000 //Congratulations, your score was nuked
for(var/obj/machinery/nuclearbomb/nuke in machines)
if(nuke.r_code == "Nope")
continue
var/turf/T = get_turf(nuke)
if(istype(T, /area/syndicate_mothership) || istype(T, /area/wizard_station) || istype(T, /area/solar))
nukedpenalty = 1000
else if(istype(T, /area/security/main) || istype(T, /area/security/brig) || istype(T, /area/security/armory) || istype(T, /area/security/checkpoint2))
nukedpenalty = 50000
else if(istype(T, /area/engine))
nukedpenalty = 100000
else
nukedpenalty = 10000*/
var/datum/faction/revolution/RV = find_active_faction_by_type(/datum/faction/revolution)
if(RV)
var/foecount = 0
for(var/datum/role/R in RV.members)
foecount++
var/datum/mind/M = R.antag
if(!M || !M.current)
score["revkilled"]++
continue
var/turf/T = M.current.loc
if(istype(T.loc, /area/security/brig))
score["revarrested"]++
else if (M.current.stat == DEAD)
score["revkilled"]++
if(foecount == score["arrested"])
score["allrevarrested"] = 1
for(var/mob/living/carbon/human/player in mob_list)
if(player.mind)
var/role = player.mind.assigned_role
if(role in list("Captain", "Head of Security", "Head of Personnel", "Chief Engineer", "Research Director"))
if(player.stat == DEAD)
score["deadcommand"]++
//Check station's power levels
var/skip_power_loss = 0
for(var/datum/event/grid_check/check in events)
if(check.activeFor > check.startWhen && check.activeFor < check.endWhen)
skip_power_loss = 1
if(!skip_power_loss)
for(var/obj/machinery/power/apc/A in power_machines)
if(A.z != map.zMainStation)
continue
for(var/obj/item/weapon/cell/C in A.contents)
if(C.percent() < 30)
score["powerloss"]++ //Enough to auto-cut equipment, so alarm
for(var/datum/powernet/PN in powernets)
if(PN.avail > score["maxpower"])
score["maxpower"] = PN.avail
var/roundlength = world.time/10 //Get a value in seconds
score["time"] = round(roundlength) //One point for every five seconds. One minute is 12 points, one hour 720 points
//Check how many uncleaned mess are on the station. We can't run through cleanable for reasons, so yeah, long
for(var/obj/effect/decal/cleanable/M in decals)
if(M.z != map.zMainStation) //Won't work on multi-Z stations, but will do for now
continue
if(M.messcheck())
score["mess"]++
for(var/obj/item/trash/T in trash_items)
if(T.z != map.zMainStation) //Won't work on multi-Z stations, but will do for now
continue
var/area/A = get_area(T)
if(istype(A,/area/surface/junkyard))
continue
score["litter"]++
for(var/mob/living/simple_animal/SA in dead_mob_list)
if(SA.is_pet)
score["deadpets"]++
//Bonus Modifiers
//--General--
//var/traitorwins = score["traitorswon"]
var/deathpoints = score["deadcrew"] * 250 //Human beans aren't free
var/siliconpoints = score["deadsilicon"] * 500 //Silicons certainly aren't either
//var/researchpoints = score["researchdone"] * 20 //One discovered design is 20 points. You'll usually find hundreds
var/eventpoints = score["eventsendured"] * 200 //Events fine every 10 to 15 and are uncommon
var/escapoints = score["escapees"] * 100 //Two rescued human beans are worth a dead one
//--Service--
var/harvests = score["stuffharvested"] * 1 //One harvest is one product. So 5 wheat is 5 points
var/meals = score["meals"] * 5 //Every item cooked (needs to fire make_food()) awards five points
//var/drinks = score["drinks"] * 5 //All drinks that ever existed award five points. No better way to do it yet
var/litter = score["litter"] //Every item listed under /obj/item/trash will cost one point if it exists
var/messpoints
if(score["mess"] != 0)
messpoints = score["mess"] //If there are any messes, let's count them
//--Supply--
var/shipping = score["stuffshipped"] * 100 //Centcom Orders fulfilled
var/plasmashipped = score["plasmashipped"] * 0.5 //Plasma Sheets shipped
var/mining = score["oremined"] * 1 //Not actually counted at mining, but at processing. One ore smelted is one point
//--Engineering--
var/power = score["powerloss"] * 50 //Power issues are BAD, they mean the Engineers aren't doing their job at all
var/time = round(score["time"] * 0.2) //Every five seconds the station survives is one point. One minute is 12, one hour 720
//var/atmos
//if(score["airloss"] != 0)
//atmos = score["airloss"] * 20 //Air issues are bad, but since it's space, don't stress it too much
//--Medical--
//var/beneficialpoints = score["disease_good"] * 20
score["disease_vaccine"] = ""
for (var/antigen in all_antigens)
if (isolated_antibodies[antigen] == 1)
score["disease_vaccine"] += "[antigen]"
if (antigen in blood_antigens)
score["disease_vaccine_score"] += 40
else if (antigen in common_antigens)
score["disease_vaccine_score"] += 120
else if (antigen in rare_antigens)
score["disease_vaccine_score"] += 200
else if (antigen in alien_antigens)
score["disease_vaccine_score"] += 400
else
score["disease_vaccine"] += "-"
if (score["disease_vaccine_score"] == 2320)
score["disease_vaccine_score"] = 3000 // panacea bonus
var/plaguepoints = score["disease_bad"] * 50 //A diseased crewman is half-dead, as they say, and a double diseased is double half-dead
//--Science--
var/slimes = score["slimes"] * 20 //How many slimes were harvested
var/artifacts = score["artifacts"] * 400 //How many large artifacts were analyzed and activated
//Mode Specific
if(find_active_faction_by_type(/datum/faction/syndicate/nuke_op))
//if(score["disc"])
//score["crewscore"] += 500
var/killpoints = score["opkilled"] * 250
var/arrestpoints = score["arrested"] * 1000
score["crewscore"] += killpoints
score["crewscore"] += arrestpoints
//if(score["nuked"])
//score["crewscore"] -= nukedpenalty
if(find_active_faction_by_type(/datum/faction/revolution))
var/arrestpoints = score["arrested"] * 1000
var/killpoints = score["opkilled"] * 500
var/comdeadpts = score["deadcommand"] * 500
//if(score["traitorswon"])
//score["crewscore"] -= 10000
score["crewscore"] += arrestpoints
score["crewscore"] += killpoints
score["crewscore"] -= comdeadpts
//Good Things
score["crewscore"] += plasmashipped
score["crewscore"] += shipping
score["crewscore"] += harvests
score["crewscore"] += mining
score["crewscore"] += eventpoints
score["crewscore"] += escapoints
score["crewscore"] += meals
score["crewscore"] += time
score["crewscore"] += slimes
score["crewscore"] += artifacts
//score["crewscore"] += beneficialpoints
score["crewscore"] += score["disease_vaccine_score"]
score["crewscore"] += score["disease_effects"]
if(!power) //No APCs with bad power
score["crewscore"] += 2500 //Give the Engineers a pat on the back for bothering
score["powerbonus"] = 1
if(!messpoints && !litter) //Not a single mess or litter on station
score["crewscore"] += 10000 //Congrats, not even a dirt patch or chips bag anywhere
score["messbonus"] = 1
//if(!atmos) //No air alarms anywhere
//score["crewscore"] += 5000 //Give the Atmospheric Technicians a good pat on the back for caring
//score["atmosbonus"] = 1
if(score["allarrested"])
score["crewscore"] *= 3 //This needs to be here for the bonus to be applied properly
//Bad Things
score["crewscore"] -= deathpoints
var/multi = find_active_faction_by_type(/datum/faction/malf) ? 1 : -1 //Dead silicons on malf are good
score["crewscore"] += (siliconpoints*multi)
if(score["deadaipenalty"])
score["crewscore"] += (1000*multi) //Give a harsh punishment for killing the AI
score["crewscore"] -= power
//score["crewscore"] -= atmos
//if(score["crewscore"] != 0) //Dont divide by zero!
// while(traitorwins > 0)
// score["crewscore"] /= 2
// traitorwins -= 1
score["crewscore"] -= messpoints
score["crewscore"] -= litter
score["crewscore"] -= plaguepoints
score["arenafights"] = arena_rounds
var/transfer_total = 0
for(var/datum/money_account/A in all_money_accounts)
for(var/datum/transaction/T in A.transaction_log)
var/amt = text2num(T.amount)
if(amt <= 0) // This way we don't track payouts or starting funds, only money transferred to terminals or between players
transfer_total += abs(amt)
score["totaltransfer"] = transfer_total
arena_top_score = 0
for(var/x in arena_leaderboard)
if(arena_leaderboard[x] > arena_top_score)
arena_top_score = arena_leaderboard[x]
for(var/x in arena_leaderboard)
if(arena_leaderboard[x] == arena_top_score)
score["arenabest"] += "[x] "
//Show the score - might add "ranks" later
to_chat(world, "<b>The crew's final score is:</b>")
to_chat(world, "<b><font size='4'>[score["crewscore"]]</font></b>")
scorestats(completions)
for(var/mob/E in player_list)
E.display_round_end_scoreboard()
mode.send2servers()
return
/proc/scorestats(var/completions)
var/dat = completions
dat += {"<BR><h2>Round Statistics and Score</h2>"}
var/datum/faction/syndicate/nuke_op/NO = find_active_faction_by_type(/datum/faction/syndicate/nuke_op)
if(NO)
var/foecount = 0
var/crewcount = 0
var/diskdat = ""
var/bombdat = null
//var/nukedpenalty = 1000
for(var/datum/role/R in NO.members)
foecount++
for(var/mob/living/C in mob_list)
if(!istype(C,/mob/living/carbon/human) || !istype(C,/mob/living/silicon/robot) || !istype(C,/mob/living/silicon/ai))
continue
if(C.stat == DEAD)
continue
if(!C.client)
continue
crewcount++
for(var/obj/item/weapon/disk/nuclear/N in world)
if(!N)
continue
var/atom/disk_loc = N.loc
while(!istype(disk_loc, /turf))
if(istype(disk_loc, /mob))
var/mob/M = disk_loc
diskdat += "Carried by [M.real_name] "
if(istype(disk_loc, /obj))
var/obj/O = disk_loc
diskdat += "in \a [O.name] "
disk_loc = disk_loc.loc
diskdat += "in [disk_loc.loc]"
break // Should only need one go-round, probably
/*for(var/obj/machinery/nuclearbomb/nuke in machines)
if(nuke.r_code == "Nope")
continue
var/turf/T = nuke.loc
bombdat = T.loc
if(istype(T,/area/syndicate_mothership) || istype(T,/area/wizard_station) || istype(T,/area/solar/) || istype(T,/area))
nukedpenalty = 1000
else if (istype(T,/area/security/main) || istype(T,/area/security/brig) || istype(T,/area/security/armory) || istype(T,/area/security/checkpoint2))
nukedpenalty = 50000
else if (istype(T,/area/engine))
nukedpenalty = 100000
else
nukedpenalty = 5000
break*/
if(!diskdat)
diskdat = "Uh oh. Something has fucked up! Report this."
dat += {"<B><U>NUCLEAR ASSAULT STATS</U></B><BR>
<B>Number of Operatives:</B> [foecount]<BR>
<B>Number of Surviving Crew:</B> [crewcount]<BR>
<B>Final Location of Nuke:</B> [bombdat]<BR>
<B>Final Location of Disk:</B> [diskdat]<BR><BR>
<B>Operatives Arrested:</B> [score["oparrested"]] ([score["oparrested"] * 1000] Points)<BR>
<B>Operatives Killed:</B> [score["opkilled"]] ([score["opkilled"] * 250] Points)<BR>
<B>All Operatives Arrested:</B> [score["alloparrested"] ? "Yes" : "No"] (Score tripled)<BR>
<HR>"}
// <B>Station Destroyed:</B> [score["nuked"] ? "Yes" : "No"] (-[nukedpenalty] Points)<BR>
// <B>Nuclear Disk Secure:</B> [score["disc"] ? "Yes" : "No"] ([score["disc"] * 500] Points)<BR>
var/datum/faction/revolution/RV = find_active_faction_by_type(/datum/faction/revolution)
if(RV)
var/foecount = 0
var/comcount = 0
var/revcount = 0
var/loycount = 0
for(var/datum/role/R in RV.members)
if(R.antag.current && R.antag.current.stat != 2)
if(istype(R,/datum/role/revolutionary/leader))
foecount++
else
revcount++
for(var/mob/living/carbon/human/player in mob_list)
if(player.mind)
var/role = player.mind.assigned_role
if(role in list("Captain", "Head of Security", "Head of Personnel", "Chief Engineer", "Research Director"))
if(player.stat != 2)
comcount++
else
if(locate(/datum/role/revolutionary) in player.mind.antag_roles)
continue
loycount++
for(var/mob/living/silicon/X in mob_list)
if (X.stat != 2)
loycount++
//var/revpenalty = 10000
dat += {"<B><U>REVOLUTION STATS</U></B><BR>
<B>Number of Surviving Revolution Heads:</B> [foecount]<BR>
<B>Number of Surviving Command Staff:</B> [comcount]<BR>
<B>Number of Surviving Revolutionaries:</B> [revcount]<BR>
<B>Number of Surviving Loyal Crew:</B> [loycount]<BR><BR>
<B>Revolution Heads Arrested:</B> [score["revarrested"]] ([score["revarrested"] * 1000] Points)<BR>
<B>Revolution Heads Slain:</B> [score["revkilled"]] ([score["revkilled"] * 500] Points)<BR>
<B>Command Staff Slain:</B> [score["deadcommand"]] (-[score["deadcommand"] * 500] Points)<BR>
<B>All Revolution Heads Arrested:</B> [score["allrevarrested"] ? "Yes" : "No"] (Score tripled)<BR>
<HR>"}
// <B>Revolution Successful:</B> [score["traitorswon"] ? "Yes" : "No"] (-[score["traitorswon"] * revpenalty] Points)<BR>
// var/totalfunds = wagesystem.station_budget + wagesystem.research_budget + wagesystem.shipping_budget
// <B>Beneficial diseases in living mobs:</B> [score["disease_good"]] ([score["disease_good"] * 20] Points)<BR><BR>
dat += {"<B><U>GENERAL STATS</U></B><BR>
<U>THE GOOD:</U><BR>
<B>Length of Shift:</B> [round(world.time/600)] Minutes ([round(score["time"] * 0.2)] Points)<BR>
<B>Shuttle Escapees:</B> [score["escapees"]] ([score["escapees"] * 100] Points)<BR>
<B>Random Events Endured:</B> [score["eventsendured"]] ([score["eventsendured"] * 200] Points)<BR>
<B>Meals Prepared:</B> [score["meals"]] ([score["meals"] * 5] Points)<BR>
<B>Hydroponics Harvests:</B> [score["stuffharvested"]] ([score["stuffharvested"] * 1] Points)<BR>
<B>Ultra-Clean Station:</B> [score["messbonus"] ? "Yes" : "No"] ([score["messbonus"] * 10000] Points)<BR>
<B>Plasma Shipped:</B> [score["plasmashipped"]] ([score["plasmashipped"] * 0.5] Points)<BR>
<B>Centcom Orders Fulfilled:</B> [score["stuffshipped"]] ([score["stuffshipped"] * 100] Points)<BR>
<B>Ore Smelted:</B> [score["oremined"]] ([score["oremined"] * 1] Points)<BR>
<B>Whole Station Powered:</B> [score["powerbonus"] ? "Yes" : "No"] ([score["powerbonus"] * 2500] Points)<BR>
<B>Isolated Vaccines:</B> [score["disease_vaccine"]] ([score["disease_vaccine_score"]] Points)<BR>
<B>Extracted Symptoms:</B> [score["disease_extracted"]] ([score["disease_effects"]] Points)<BR>
<B>Harvested Slimes:</B> [score["slimes"]] ([score["slimes"] * 20] Points)<BR><BR>
<B>Analyzed & Activated Large Artifacts:</B> [score["artifacts"]] ([score["artifacts"] * 400] Points)<BR><BR>
<U>THE BAD:</U><BR>
<B>Dead Crewmen:</B> [score["deadcrew"]] (-[score["deadcrew"] * 250] Points)<BR>
<B>Destroyed Silicons:</B> [score["deadsilicon"]] ([find_active_faction_by_type(/datum/faction/malf) ? score["deadsilicon"] * 500 : score["deadsilicon"] * -500] Points)<BR>
<B>AIs Destroyed:</B> [score["deadaipenalty"]] ([find_active_faction_by_type(/datum/faction/malf) ? score["deadaipenalty"] * 1000 : score["deadaipenalty"] * -1000] Points)<BR>
<B>Uncleaned Messes:</B> [score["mess"]] (-[score["mess"]] Points)<BR>
<B>Trash on Station:</B> [score["litter"]] (-[score["litter"]] Points)<BR>
<B>Station Power Issues:</B> [score["powerloss"]] (-[score["powerloss"] * 50] Points)<BR>
<B>Bad diseases in living mobs:</B> [score["disease_bad"]] (-[score["disease_bad"] * 50] Points)<BR><BR>
<U>THE WEIRD</U><BR>"}
/* <B>Final Station Budget:</B> $[num2text(totalfunds,50)]<BR>"}
var/profit = totalfunds - 100000
if (profit > 0)
dat += "<B>Station Profit:</B> +[num2text(profit,50)]<BR>"
else if (profit < 0)
dat += "<B>Station Deficit:</B> [num2text(profit,50)]<BR>"}*/
dat += "<B>Food Eaten:</b> [score["foodeaten"]]<BR>"
dat += "<B>Times a Clown was Abused:</B> [score["clownabuse"]]<BR>"
dat += "<B>Number of Times Someone was Slipped: </B> [score["slips"]]<BR>"
dat += "<B>Number of Explosions This Shift:</B> [score["explosions"]]<BR>"
dat += "<B>Number of Arena Rounds:</B> [score["arenafights"]]<BR>"
dat += "<B>Total money transferred:</B> [score["totaltransfer"]]<BR>"
if(score["dimensionalpushes"] > 0)
dat += "<B>Dimensional Pushes:</B> [score["dimensionalpushes"]]<BR>"
if(score["assesblasted"] > 0)
dat += "<B>Asses Blasted:</B> [score["assesblasted"]]<BR>"
if(score["shoesnatches"] > 0)
dat += "<B>Pairs of Shoes Snatched:</B> [score["shoesnatches"]]<BR>"
if(score["buttbotfarts"] > 0)
dat += "<B>Buttbot Farts:</B> [score["buttbotfarts"]]<BR>"
if(score["shardstouched"] > 0)
dat += "<B>Number of Times the Crew went Shard to Shard:</B> [score["shardstouched"]]<BR>"
if(score["lawchanges"] > 0)
dat += "<B>Law Upload Modules Used:</B> [score["lawchanges"]]<BR>"
if(score["gunsspawned"] > 0)
dat += "<B>Guns Magically Spawned:</B> [score["gunsspawned"]]<BR>"
if(score["hangmanrecord"] > 0)
dat += "<B>Highest Hangman Score:</B> [score["hangmanname"]], [score["hangmanjob"]]: [score["hangmanrecord"]] ([score["hangmankey"]])<BR>"
if(score["nukedefuse"] < 30)
dat += "<B>Seconds Left on the Nuke When It Was Defused:</B> [score["nukedefuse"]]<BR>"
if(score["disease_most"] != null)
var/datum/disease2/disease/D = disease2_list[score["disease_most"]]
var/nickname = ""
var/dis_name = ""
if (score["disease_most"] in virusDB)
var/datum/data/record/v = virusDB[score["disease_most"]]
nickname = v.fields["nickname"] ? " \"[v.fields["nickname"]]\"" : ""
dis_name = v.fields["name"]
dat += "<B>Most Spread Disease:</B> [dis_name ? "[dis_name]":"[D.form] #[add_zero("[D.uniqueID]", 4)]-[add_zero("[D.subID]", 4)]"][nickname] (Origin: [D.origin], Strength: [D.strength]%, spread among [score["disease_most_count"]] mobs)<BR>"
for(var/datum/disease2/effect/e in D.effects)
dat += "&#x25CF; Stage [e.stage] - <b>[e.name]</b><BR>"
if(weathertracker.len && map.climate)
dat += "<B>Climate Composition: ([map.climate])</B> "
//first, total ticks
var/totalticks = total_list(get_list_of_elements(weathertracker))
for(var/element in weathertracker)
dat += "[element] ([round(weathertracker[element]*100/totalticks)]%) "
dat += "<BR>"
//Vault and away mission specific scoreboard elements
//The process_scoreboard() proc returns a list of strings associated with their score value (the number that's added to the total score)
for(var/datum/map_element/ME in map_elements)
var/list/L = ME.process_scoreboard()
if(!L || !L.len)
continue
dat += "<br><u>[ME.name ? uppertext(ME.name) : "UNKNOWN SPACE STRUCTURE"]</u><br>"
for(var/score_value in L)
dat += "<b>[score_value]</b>[L[score_value] ? "<b>:</b> [L[score_value]]" : ""]<br>"
score["crewscore"] += L[score_value]
dat += "<br>"
if(arena_top_score)
dat += "<B>Best Arena Fighter (won [arena_top_score] rounds!):</B> [score["arenabest"]]<BR>"
if(score["escapees"])
if(score["dmgestdamage"])
dat += "<B>Most Battered Escapee:</B> [score["dmgestname"]], [score["dmgestjob"]]: [score["dmgestdamage"]] damage ([score["dmgestkey"]])<BR>"
if(score["richestcash"])
dat += "<B>Richest Escapee:</B> [score["richestname"]], [score["richestjob"]]: $[score["richestcash"]] ([score["richestkey"]])<BR>"
else
dat += "The station wasn't evacuated or there were no survivors!<BR>"
dat += "<B>Department Leaderboard:</B><BR>"
var/list/dept_leaderboard = get_dept_leaderboard()
for (var/i = 1 to dept_leaderboard.len)
dat += "<B>#[i] - </B>[dept_leaderboard[i]] ($[dept_leaderboard[dept_leaderboard[i]]])<BR>"
dat += {"<HR><BR>
<B><U>FINAL SCORE: [score["crewscore"]]</U></B><BR>"}
score["rating"] = "A Rating"
switch(score["crewscore"])
if(-INFINITY to -50000)
score["rating"] = "Even the Singularity Deserves Better"
if(-49999 to -5000)
score["rating"] = "Singularity Fodder"
if(-4999 to -1000)
score["rating"] = "You're All Fired"
if(-999 to -500)
score["rating"] = "A Waste of Perfectly Good Oxygen"
if(-499 to -250)
score["rating"] = "A Wretched Heap of Scum and Incompetence"
if(-249 to -100)
score["rating"] = "Outclassed by Lab Monkeys"
if(-99 to -21)
score["rating"] = "The Undesirables"
if(-20 to -1)
score["rating"] = "Not So Good"
if(0)
score["rating"] = "Nothing of Value"
if(1 to 20)
score["rating"] = "Ambivalently Average"
if(21 to 99)
score["rating"] = "Not Bad, but Not Good"
if(100 to 249)
score["rating"] = "Skillful Servants of Science"
if(250 to 499)
score["rating"] = "Best of a Good Bunch"
if(500 to 999)
score["rating"] = "Lean Mean Machine Thirteen"
if(1000 to 4999)
score["rating"] = "Promotions for Everyone"
if(5000 to 9999)
score["rating"] = "Ambassadors of Discovery"
if(10000 to 49999)
score["rating"] = "The Pride of Science Itself"
if(50000 to INFINITY)
score["rating"] = "Nanotrasen's Finest"
dat += "<B><U>RATING:</U></B> [score["rating"]]<br><br>"
var/datum/persistence_task/highscores/leaderboard = score["money_leaderboard"]
dat += "<b>TOP 5 RICHEST ESCAPEES:</b><br>"
if(!leaderboard.data.len)
dat += "Nobody has set up a rich escape yet."
else
var/i = 1
for(var/datum/record/money/entry in leaderboard.data)
var/cash = num2text(entry.cash, 12)
dat += "[i++]) <b>$[cash]</b> by <b>[entry.ckey]</b> ([entry.role]). That shift lasted [entry.shift_duration]. Date: [entry.date]<br>"
round_end_info = dat
round_end_info_no_img = remove_images(dat)
log_game(round_end_info_no_img)
stat_collection.crew_score = score["crewscore"]
/mob/proc/display_round_end_scoreboard()
if (!client)
return
var/datum/browser/popup = new(src, "roundstats", "Round End Summary", 1000, 600)
popup.set_content(round_end_info)
popup.open()
winset(client, "rpane.round_end", "is-visible=true")
winset(client, "rpane.last_round_end", "is-visible=false")
/datum/achievement
var/item
var/ckey
var/mob_name
var/award_name
var/award_desc
/datum/achievement/New(var/item, var/ckey, var/mob_name, var/award_name, var/award_desc)
src.item = item
src.ckey = ckey
src.mob_name = mob_name
src.award_name = award_name
src.award_desc = award_desc

View File

@@ -1,5 +1,3 @@
/mob/proc/rightandwrong(var/summon_type) //0 = Summon Guns, 1 = Summon Magic, 2 = Summon Swords
to_chat(usr, "<B>You summoned [summon_type]!</B>")
message_admins("[key_name_admin(usr, 1)] summoned [summon_type]!")
@@ -183,7 +181,7 @@
if(istype(S))
S.summons_received = randomizeguns
playsound(src,'sound/effects/summon_guns.ogg', 50, 1)
score["gunsspawned"]++
score.gunsspawned++
/mob/living/carbon/human/proc/equip_swords(var/datum/role/R)
var/randomizeswords = pick("unlucky", "misc", "throw", "armblade", "pickaxe", "pcutter", "esword", "alt-esword", "machete", "kitchen", "medieval", "katana", "axe", "boot", "saw", "scalpel", "switchtool", "shitcurity", "whip")

View File

@@ -65,9 +65,7 @@ Here it is: Buttbot.
sleep(rand(1,3))
say(buttbottify(message), language)
fart()
score["buttbotfarts"]++
score.buttbotfarts++
/obj/machinery/bot/buttbot/explode()
src.on = 0

View File

@@ -110,7 +110,7 @@
S.forceMove(loc)
S.visible_message("<span class='notice'>[S] crawls free of the processor!</span>")
return
score["slimes"]++
score.slimes++
for(var/i = 1, i <= C, i++)
new S.coretype(loc)
feedback_add_details("slime_core_harvested","[replacetext(S.colour," ","_")]")

View File

@@ -43,10 +43,10 @@ var/explosion_shake_message_cooldown = 0
return
if(devastation_range > 1)
score["largeexplosions"]++ //For the scoreboard
score.largeexplosions++ //For the scoreboard
if(istype(get_area(epicenter),/area/shuttle/escape/centcom))
score["shuttlebombed"] += devastation_range //For the scoreboard
score["explosions"]++ //For the scoreboard
score.shuttlebombed += devastation_range //For the scoreboard
score.explosions++ //For the scoreboard
var/max_range = max(devastation_range, heavy_impact_range, light_impact_range)
stat_collection.add_explosion_stat(epicenter, devastation_range, heavy_impact_range, light_impact_range)

View File

@@ -1353,7 +1353,6 @@ var/global/list/image/blood_overlays = list()
else
M.LAssailant = user
M.assaulted_by(user)
log_attack("[user.name] ([user.ckey]) Attempted to restrain [M.name] ([M.ckey]) with \the [src].")
return TRUE

View File

@@ -223,7 +223,7 @@ var/global/list/all_graffitis = list(
user.visible_message("<span class='notice'>[user] bites a chunk out of \the [src].</span>", \
"<span class='notice'>You bite a chunk out of \the [src].</span>")
user.nutrition += 5
score["foodeaten"]++
score.foodeaten++
if(ispath(text2path("/datum/reagent/paint/[colourName]")) && M.reagents)
M.reagents.add_reagent("paint_[colourName]", 10)
if(uses)

View File

@@ -70,7 +70,7 @@
while(R.checkIngredients(ore)) //While we have materials for this
for(var/ore_id in R.ingredients)
ore.removeAmount(ore_id, R.ingredients[ore_id])
score["oremined"] += 1 //Count this ore piece as processed for the scoreboard
score.oremined += 1 //Count this ore piece as processed for the scoreboard
new R.yieldtype(get_turf(loc))
sheets_this_tick++

View File

@@ -83,7 +83,7 @@ Refactored AI modules by N3X15
lawchanges.Add("[time] : [log_entry]")
message_admins(log_entry)
log_game(log_entry)
score["lawchanges"]++
score.lawchanges++
return 1
// Constructs the law and desc from variables.

View File

@@ -360,7 +360,7 @@ MATCHBOXES ARE ALSO IN FANCY.DM
return
lit = 1 //All checks that could have stopped the cigarette are done, let us begin
score["tobacco"]++
score.tobacco++
flags &= ~NOREACT //Allow reagents to react after being lit
clothing_flags |= (MASKINTERNALS | BLOCK_GAS_SMOKE_EFFECT)
@@ -717,7 +717,7 @@ MATCHBOXES ARE ALSO IN FANCY.DM
/obj/item/clothing/mask/cigarette/pipe/light(var/flavor_text = "[usr] lights the [name].")
if(!src.lit)
lit = 1
score["tobacco"]++
score.tobacco++
damtype = BURN
update_brightness()
var/turf/T = get_turf(src)

View File

@@ -53,7 +53,7 @@
to_chat(usr, "The implanted explosive implant in [imp_in] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.")
addHear()
source.register_event(/event/emote, src, .proc/trigger)
score["implant_phrases"] += "[usr.real_name] ([get_key(usr)]) rigged [imp_in.real_name] to explode on the phrase <font color='red'>\"[phrase]\"</font>!"
score.implant_phrases += "[usr.real_name] ([get_key(usr)]) rigged [imp_in.real_name] to explode on the phrase <font color='red'>\"[phrase]\"</font>!"
return 1
/obj/item/weapon/implant/explosive/emp_act(severity)

View File

@@ -76,7 +76,6 @@
M.LAssailant = user
M.assaulted_by(user)
src.add_fingerprint(user)
for(var/mob/O in viewers(M))
if (O.client)
O.show_message("<span class='danger'>[M] has been stunned with \the [src] by [user]!</span>", 1, "<span class='warning'>You hear someone fall</span>", 2)

View File

@@ -594,7 +594,7 @@
if(O.invisibility == 101)
O.singularity_act()
ChangeTurf(get_underlying_turf())
score["turfssingulod"]++
score.turfssingulod++
return(2)
//Return a lattice to allow catwalk building

View File

@@ -6,11 +6,11 @@
disclaimers += "All rights reserved.<br>"
disclaimers += "<br>"
disclaimers += pick("All stunts were performed by underpaid and expendable interns. Do NOT try at home.<br>", "[director] do not endorse behaviour depicted. Attempt at your own risk.<br>")
if(score["deadpets"] == 0)
disclaimers += "No animals were harmed in the making of this film.[(score["clownabuse"] > 50) ? " However, many clowns were." : ""]<br>"
else if(score["clownabuse"] == 0)
if(score.deadpets == 0)
disclaimers += "No animals were harmed in the making of this film.[(score.clownabuse > 50) ? " However, many clowns were." : ""]<br>"
else if(score.clownabuse == 0)
disclaimers += "No clowns were harmed in the making of this film.<br>"
else if(score["clownabuse"] > 50)
else if(score.clownabuse > 50)
disclaimers += "All clowns were harmed in the making of this film.<br>"
disclaimers += "<br><br>"
@@ -27,5 +27,5 @@
disclaimers += "<br><br>"
disclaimers += "This motion picture is (not) protected under the copyright laws of the United States and all countries throughout the universe. Country of first publication: United States of America. Any unauthorized exhibition, distribution, or copying of this picture or any part thereof (including soundtrack) is an infringement of the relevant copyright and will subject the infringer to civil liability and criminal prosecution.<br>"
disclaimers += "The story, all names, characters, and incidents portrayed in this production are fictitious. No identification with actual persons (living or deceased), places, buildings, and products is intended or should be inferred.<br>"
if(score["tobacco"] > 0)
if(score.tobacco > 0)
disclaimers += "No person or entity associated with this film received payment or anything of value, or entered into any agreement, in connection with the depiction of tobacco products.<br>"

View File

@@ -30,10 +30,10 @@
if(15)
thename += ": THE SEASON FINALE"
if(16 to 40)
if(score["time"] > 60 * 60 * 3) //3 hours
if(score.time > 60 * 60 * 3) //3 hours
thename += ": THE FEATURE LENGTH PRESENTATION"
if(41 to 65)
if(score["time"] > 0 && score["time"] < 60 * 30) //30 min
if(score.time > 0 && score.time < 60 * 30) //30 min
thename += ": ABRIDGED"
else
for(var/client/C in clients)
@@ -59,20 +59,20 @@
"THE CURIOUS CASE OF [uppr_name]", "ONE HELL OF A PARTY", "FOR YOUR CONSIDERATION", "PRESS YOUR LUCK", "A STATION CALLED [uppr_name]", "CRIME AND PUNISHMENT", "MY DINNER WITH [uppr_name]", "UNFINISHED BUSINESS", "THE ONLY STATION THAT'S NOT ON FIRE (YET)", "SOMEONE'S GOTTA DO IT", "THE [uppr_name] MIX-UP", "PILOT", "PROLOGUE", "FINALE", "UNTITLED", "THE END")]")
episode_names += new /datum/episode_name("[pick("SPACE", "SEXY", "DRAGON", "WARLOCK", "LAUNDRY", "GUN", "ADVERTISING", "DOG", "CARBON MONOXIDE", "NINJA", "WIZARD", "SOCRATIC", "JUVENILE DELIQUENCY", "POLITICALLY MOTIVATED", "RADTACULAR SICKNASTY", "CORPORATE", "MEGA")] [pick("QUEST", "FORCE", "ADVENTURE")]", weight=25)
switch(score["crewscore"])
switch(score.crewscore)
if(-INFINITY to -2000)
episode_names += new /datum/episode_name("[pick("THE CREW'S PUNISHMENT", "A PUBLIC RELATIONS NIGHTMARE", "[uppr_name]: A NATIONAL CONCERN", "WITH APOLOGIES TO THE CREW", "THE CREW BITES THE DUST", "THE CREW BLOWS IT", "THE CREW GIVES UP THE DREAM", "THE CREW IS DONE FOR", "THE CREW SHOULD NOT BE ALLOWED ON TV", "THE END OF [uppr_name] AS WE KNOW IT")]", "Extremely low score of [score["crewscore"]].", 250)
episode_names += new /datum/episode_name("[pick("THE CREW'S PUNISHMENT", "A PUBLIC RELATIONS NIGHTMARE", "[uppr_name]: A NATIONAL CONCERN", "WITH APOLOGIES TO THE CREW", "THE CREW BITES THE DUST", "THE CREW BLOWS IT", "THE CREW GIVES UP THE DREAM", "THE CREW IS DONE FOR", "THE CREW SHOULD NOT BE ALLOWED ON TV", "THE END OF [uppr_name] AS WE KNOW IT")]", "Extremely low score of [score.crewscore].", 250)
if(4500 to INFINITY)
episode_names += new /datum/episode_name("[pick("THE CREW'S DAY OUT", "THIS SIDE OF PARADISE", "[uppr_name]: A SITUATION COMEDY", "THE CREW'S LUNCH BREAK", "THE CREW'S BACK IN BUSINESS", "THE CREW'S BIG BREAK", "THE CREW SAVES THE DAY", "THE CREW RULES THE WORLD", "THE ONE WITH ALL THE SCIENCE AND PROGRESS AND PROMOTIONS AND ALL THE COOL AND GOOD THINGS", "THE TURNING POINT")]", "High score of [score["crewscore"]].", 250)
episode_names += new /datum/episode_name("[pick("THE CREW'S DAY OUT", "THIS SIDE OF PARADISE", "[uppr_name]: A SITUATION COMEDY", "THE CREW'S LUNCH BREAK", "THE CREW'S BACK IN BUSINESS", "THE CREW'S BIG BREAK", "THE CREW SAVES THE DAY", "THE CREW RULES THE WORLD", "THE ONE WITH ALL THE SCIENCE AND PROGRESS AND PROMOTIONS AND ALL THE COOL AND GOOD THINGS", "THE TURNING POINT")]", "High score of [score.crewscore].", 250)
if(istype(ticker.mode, /datum/gamemode/dynamic))
var/datum/gamemode/dynamic/mode = ticker.mode
switch(mode.threat_level)
if(0 to 35)
episode_names += new /datum/episode_name("[pick("THE DAY [uppr_name] STOOD STILL", "MUCH ADO ABOUT NOTHING", "WHERE SILENCE HAS LEASE", "RED HERRING", "HOME ALONE", "GO BIG OR GO [uppr_name]", "PLACEBO EFFECT", "ECHOES", "SILENT PARTNERS", "WITH FRIENDS LIKE THESE...", "EYE OF THE STORM", "BORN TO BE MILD", "STILL WATERS")]", "Low threat level of [mode.threat_level]%.", 150)
if(score["crewscore"] < -1000)
episode_names += new /datum/episode_name/rare("[pick("HOW OH HOW DID IT ALL GO SO WRONG?!", "EXPLAIN THIS ONE TO THE EXECUTIVES", "THE CREW GOES ON SAFARI", "OUR GREATEST ENEMY", "THE INSIDE JOB", "MURDER BY PROXY")]", "Low threat level of [mode.threat_level]%... but the crew still had a very low score.", score["crewscore"]/150*-2)
if(score["time"] > 60 * 60 * 3) //3 hours
if(score.crewscore < -1000)
episode_names += new /datum/episode_name/rare("[pick("HOW OH HOW DID IT ALL GO SO WRONG?!", "EXPLAIN THIS ONE TO THE EXECUTIVES", "THE CREW GOES ON SAFARI", "OUR GREATEST ENEMY", "THE INSIDE JOB", "MURDER BY PROXY")]", "Low threat level of [mode.threat_level]%... but the crew still had a very low score.", score.crewscore/150*-2)
if(score.time > 60 * 60 * 3) //3 hours
episode_names += new /datum/episode_name/rare("THE LONG NIGHT", "Low threat level of [mode.threat_level]%, and the round lasted over three hours.", 300)
if(35 to 60)
episode_names += new /datum/episode_name("[pick("THERE MIGHT BE BLOOD", "IT CAME FROM [uppr_name]!", "THE [uppr_name] INCIDENT", "THE ENEMY WITHIN", "MIDDAY MADNESS", "AS THE CLOCK STRIKES TWELVE", "CONFIDENCE AND PARANOIA", "THE PRANK THAT WENT WAY TOO FAR", "A HOUSE DIVIDED", "[uppr_name] TO THE RESCUE!", "ESCAPE FROM [uppr_name]", \
@@ -80,9 +80,9 @@
if(60 to 100)
episode_names += new /datum/episode_name("[pick("ATTACK! ATTACK! ATTACK!", "CAN'T FIX CRAZY", "APOCALYPSE [pick("N", "W", "H")]OW", "A TASTE OF ARMAGEDDON", "OPERATION: ANNIHILATE!", "THE PERFECT STORM", "TIME'S UP FOR THE CREW", "A TOTALLY FUN THING THAT THE CREW WILL NEVER DO AGAIN", "EVERYBODY HATES [uppr_name]", "BATTLE OF [uppr_name]", \
"THE SHOWDOWN", "MANHUNT", "THE ONE WITH ALL THE FIGHTING", "THE RECKONING OF [uppr_name]", "THERE GOES THE NEIGHBORHOOD", "THE THIN RED LINE", "ONE DAY FROM RETIREMENT")]", "High threat level of [mode.threat_level]%.", 250)
if(score["crewscore"] > 3000)
episode_names += new /datum/episode_name/rare("[pick("THE OPPORTUNITY OF A LIFETIME", "DRASTIC MEASURES", "DEUS EX", "THE SHOW MUST GO ON", "TRIAL BY FIRE", "A STITCH IN TIME", "ALL'S FAIR IN LOVE AND WAR", "COME HELL OR HIGH HEAVEN", "REVERSAL OF FORTUNE", "DOUBLE TOIL AND DOUBLE TROUBLE")]", "High threat level of [mode.threat_level]%... but the crew still had a very high score!", score["crewscore"]/50)
if(score["time"] > 60 * 55 && score["time"] < 60 * 65) //55-65 minutes
if(score.crewscore > 3000)
episode_names += new /datum/episode_name/rare("[pick("THE OPPORTUNITY OF A LIFETIME", "DRASTIC MEASURES", "DEUS EX", "THE SHOW MUST GO ON", "TRIAL BY FIRE", "A STITCH IN TIME", "ALL'S FAIR IN LOVE AND WAR", "COME HELL OR HIGH HEAVEN", "REVERSAL OF FORTUNE", "DOUBLE TOIL AND DOUBLE TROUBLE")]", "High threat level of [mode.threat_level]%... but the crew still had a very high score!", score.crewscore/50)
if(score.time > 60 * 55 && score.time < 60 * 65) //55-65 minutes
episode_names += new /datum/episode_name/rare("RUSH HOUR", "High threat level of [mode.threat_level]%, and the round lasted just about an hour.", 500)
if(get_station_avg_temp() < T0C)
episode_names += new /datum/episode_name/rare("A COLD DAY IN HELL", "Station temperature was below 0C this round and threat was high", 1000)
@@ -101,8 +101,8 @@
else
if((locate(/datum/dynamic_ruleset/roundstart/nuclear) in mode.executed_rules) || (locate(/datum/dynamic_ruleset/midround/from_ghosts/faction_based/nuclear) in mode.executed_rules))
episode_names += new /datum/episode_name/rare("[pick("THE CREW SOLVES THE NUCLEAR CRISIS", "BLAST, FOILED AGAIN", "FISSION MAILED", 50;"I OPENED THE WINDOW, AND IN FLEW COPS")]", "The crew defeated the nuclear operatives.", 350)
if(score["nukedefuse"] < 30)
episode_names += new /datum/episode_name/rare("[score["nukedefuse"]] SECOND[score["nukedefuse"] == 1 ? "" : "S"] TO MIDNIGHT", "The nuke was defused with [score["nukedefuse"]] seconds remaining.", (30 - score["nukedefuse"]) * 100)
if(score.nukedefuse < 30)
episode_names += new /datum/episode_name/rare("[score.nukedefuse] SECOND[score.nukedefuse == 1 ? "" : "S"] TO MIDNIGHT", "The nuke was defused with [score.nukedefuse] seconds remaining.", (30 - score.nukedefuse) * 100)
if(narsie_list.len > 0)
episode_names += new /datum/episode_name/rare("[pick("NAR-SIE'S DAY OUT", "NAR-SIE'S VACATION", "THE CREW LEARNS ABOUT SACRED GEOMETRY", "REALM OF THE MAD GOD", "THE ONE WITH THE ELDRITCH HORROR", 50;"STUDY HARD, BUT PART-SIE HARDER")]", "Nar-Sie is loose!", 500)
@@ -110,49 +110,49 @@
if(SNOW_THEME)
episode_names += new /datum/episode_name("A VERY [pick("NANOTRASEN", "EXPEDITIONARY", "SECURE", "PLASMA", "MARTIAN")] CHRISTMAS", "'Tis the season.", 1000)
if(score["gunsspawned"] > 0)
episode_names += new /datum/episode_name/rare("[pick("GUNS, GUNS EVERYWHERE", "THUNDER GUN EXPRESS", "THE CREW GOES AMERICA ALL OVER EVERYBODY'S ASS")]", "[score["gunsspawned"]] guns were spawned this round.", min(750, score["gunsspawned"]*25))
if(score["dimensionalpushes"] > 6)
episode_names += new /datum/episode_name/rare("THE CREW GETS PUSHED TOO FAR", "[score["dimensionalpushes"]] things were dimensionalpush'd this round.", min(1500, score["dimensionalpushes"]*35))
if(score["assesblasted"] > 4)
episode_names += new /datum/episode_name/rare("A SONG OF ASS AND FIRE", "[score["assesblasted"]] people were magically assblasted this round.", min(1500, score["assesblasted"]*100))
if(score["assesblasted"] > 3 && score["random_soc"] > 4)
episode_names += new /datum/episode_name/rare("WINDS OF CHANGE", "A combination of asses blasted, and the staff of change.", min(1500, score["assesblasted"]*75 + score["random_soc"]*75))
if(score["greasewiz"] > 7 && score["lightningwiz"] > 7)
episode_names += new /datum/episode_name/rare("GREASED LIGHTNING", "A combination of the Grease and Lightning spells.", min(1500, score["greasewiz"]*45 + score["lightningwiz"]*45))
if(score["lightningwiz"] > 12)
episode_names += new /datum/episode_name/rare("[pick("SHOCK AND AWE", "SHOCK THERAPY")]", "[score["lightningwiz"]] people were shocked this round.", min(1500, score["lightningwiz"]*75))
if(score["heartattacks"] > 4)
episode_names += new /datum/episode_name/rare("MY HEART WILL GO ON", "[score["heartattacks"]] hearts were reanimated and burst out of someone's chest this round.", min(1500, score["heartattacks"]*250))
if(score["richestcash"] > 30000)
episode_names += new /datum/episode_name/rare("[pick("WAY OF THE WALLET", "THE IRRESISTIBLE RISE OF [uppertext(score["richestname"])]", "PRETTY PENNY", "IT'S THE ECONOMY, STUPID")]", "Scrooge Mc[score["richestkey"]] racked up [score["richestcash"]] credits this round.", min(450, score["richestcash"]/500))
if(score["deadaipenalty"] > 3)
episode_names += new /datum/episode_name/rare("THE ONE WHERE [score["deadaipenalty"]] AIS DIE", "That's a lot of dead AIs.", min(1500, score["deadaipenalty"]*300))
if(score["lawchanges"] > 12)
episode_names += new /datum/episode_name/rare("[pick("THE CREW LEARNS ABOUT LAWSETS", 15;"THE UPLOAD RAILROAD", 15;"FREEFORM", 15;"ASIMOV SAYS")]", "There were [score["lawchanges"]] law changes this round.", min(750, score["lawchanges"]*25))
if(score["slips"] > 100)
episode_names += new /datum/episode_name/rare("THE CREW GOES BANANAS", "[score["slips"]] people slipped this round.", min(500, score["slips"]/2))
if(score["buttbotfarts"] > 100)
episode_names += new /datum/episode_name/rare("DO BUTTBOTS DREAM OF ELECTRIC FARTS?", "[score["buttbotfarts"]] messages were mimicked by buttbots this round.", min(500, score["buttbotfarts"]/3))
if(score["clownabuse"] > 75)
episode_names += new /datum/episode_name/rare("EVERYBODY LOVES A CLOWN", "[score["clownabuse"]] instances of clown abuse this round.", min(350, score["clownabuse"]*2))
if(score["maxpower"] > HUNDRED_MEGAWATTS && (locate(/mob/living/silicon/robot/mommi) in mob_list))
episode_names += new /datum/episode_name/rare("WHAT HAPPENS WHEN YOU MIX MOMMIS AND COMMERCIAL-GRADE PACKING FOAM", "There was a powergrid with [score["maxpower"]]W, and 1 or more MoMMIs playing.", 250)
if(score["turfssingulod"] > 200)
episode_names += new /datum/episode_name/rare("[pick("THE SINGULARITY GETS LOOSE", "THE SINGULARITY GETS LOOSE (AGAIN)", "CONTAINMENT FAILURE", "THE GOOSE IS LOOSE", 50;"THE CREW'S ENGINE SUCKS", 50;"THE CREW GOES DOWN THE DRAIN")]", "The Singularity ate [score["turfssingulod"]] turfs this round.", min(1000, score["turfssingulod"]/2)) //no "singularity's day out" please we already have enough
if(score["shardstouched"] > 0)
episode_names += new /datum/episode_name/rare("[pick("HIGH EFFECT ENGINEERING", 25;"THE CREW'S ENGINE BLOWS", 25;"NEVER GO SHARD TO SHARD")]", "This is what happens when two shards touch.", min(2000, score["shardstouched"]*750))
if(score["kudzugrowth"] > 150)
episode_names += new /datum/episode_name/rare("[pick("REAP WHAT YOU SOW", "OUT OF THE WOODS", "SEEDY BUSINESS", "[uppr_name] AND THE BEANSTALK", "IN THE GARDEN OF EDEN")]", "[score["kudzugrowth"]] tiles worth of Kudzu were grown in total this round.", min(1500, score["kudzugrowth"]*2))
if(score["disease"] >= score["escapees"] && score["escapees"] > 5)
episode_names += new /datum/episode_name/rare("[pick("THE CREW GETS DOWN WITH THE SICKNESS", "THE CREW GETS AN INCURABLE DISEASE", "THE CREW'S SICK PUNS")]", "[score["disease"]] disease points this round.", min(500, (score["disease"]*25) * (score["disease"]/score["escapees"])))
if(score.gunsspawned > 0)
episode_names += new /datum/episode_name/rare("[pick("GUNS, GUNS EVERYWHERE", "THUNDER GUN EXPRESS", "THE CREW GOES AMERICA ALL OVER EVERYBODY'S ASS")]", "[score.gunsspawned] guns were spawned this round.", min(750, score.gunsspawned*25))
if(score.dimensionalpushes > 6)
episode_names += new /datum/episode_name/rare("THE CREW GETS PUSHED TOO FAR", "[score.dimensionalpushes] things were dimensionalpush'd this round.", min(1500, score.dimensionalpushes*35))
if(score.assesblasted > 4)
episode_names += new /datum/episode_name/rare("A SONG OF ASS AND FIRE", "[score.assesblasted] people were magically assblasted this round.", min(1500, score.assesblasted*100))
if(score.assesblasted > 3 && score.random_soc > 4)
episode_names += new /datum/episode_name/rare("WINDS OF CHANGE", "A combination of asses blasted, and the staff of change.", min(1500, score.assesblasted*75 + score.random_soc*75))
if(score.greasewiz > 7 && score.lightningwiz > 7)
episode_names += new /datum/episode_name/rare("GREASED LIGHTNING", "A combination of the Grease and Lightning spells.", min(1500, score.greasewiz*45 + score.lightningwiz*45))
if(score.lightningwiz > 12)
episode_names += new /datum/episode_name/rare("[pick("SHOCK AND AWE", "SHOCK THERAPY")]", "[score.lightningwiz] people were shocked this round.", min(1500, score.lightningwiz*75))
if(score.heartattacks > 4)
episode_names += new /datum/episode_name/rare("MY HEART WILL GO ON", "[score.heartattacks] hearts were reanimated and burst out of someone's chest this round.", min(1500, score.heartattacks*250))
if(score.richestcash > 30000)
episode_names += new /datum/episode_name/rare("[pick("WAY OF THE WALLET", "THE IRRESISTIBLE RISE OF [uppertext(score.richestname)]", "PRETTY PENNY", "IT'S THE ECONOMY, STUPID")]", "Scrooge Mc[score.richestkey] racked up [score.richestcash] credits this round.", min(450, score.richestcash/500))
if(score.deadaipenalty > 3)
episode_names += new /datum/episode_name/rare("THE ONE WHERE [score.deadaipenalty] AIS DIE", "That's a lot of dead AIs.", min(1500, score.deadaipenalty*300))
if(score.lawchanges > 12)
episode_names += new /datum/episode_name/rare("[pick("THE CREW LEARNS ABOUT LAWSETS", 15;"THE UPLOAD RAILROAD", 15;"FREEFORM", 15;"ASIMOV SAYS")]", "There were [score.lawchanges] law changes this round.", min(750, score.lawchanges*25))
if(score.slips > 100)
episode_names += new /datum/episode_name/rare("THE CREW GOES BANANAS", "[score.slips] people slipped this round.", min(500, score.slips/2))
if(score.buttbotfarts > 100)
episode_names += new /datum/episode_name/rare("DO BUTTBOTS DREAM OF ELECTRIC FARTS?", "[score.buttbotfarts ] messages were mimicked by buttbots this round.", min(500, score.buttbotfarts/3))
if(score.clownabuse > 75)
episode_names += new /datum/episode_name/rare("EVERYBODY LOVES A CLOWN", "[score.clownabuse] instances of clown abuse this round.", min(350, score.clownabuse*2))
if(score.maxpower > HUNDRED_MEGAWATTS && (locate(/mob/living/silicon/robot/mommi) in mob_list))
episode_names += new /datum/episode_name/rare("WHAT HAPPENS WHEN YOU MIX MOMMIS AND COMMERCIAL-GRADE PACKING FOAM", "There was a powergrid with [score.maxpower]W, and 1 or more MoMMIs playing.", 250)
if(score.turfssingulod > 200)
episode_names += new /datum/episode_name/rare("[pick("THE SINGULARITY GETS LOOSE", "THE SINGULARITY GETS LOOSE (AGAIN)", "CONTAINMENT FAILURE", "THE GOOSE IS LOOSE", 50;"THE CREW'S ENGINE SUCKS", 50;"THE CREW GOES DOWN THE DRAIN")]", "The Singularity ate [score.turfssingulod] turfs this round.", min(1000, score.turfssingulod/2)) //no "singularity's day out" please we already have enough
if(score.shardstouched > 0)
episode_names += new /datum/episode_name/rare("[pick("HIGH EFFECT ENGINEERING", 25;"THE CREW'S ENGINE BLOWS", 25;"NEVER GO SHARD TO SHARD")]", "This is what happens when two shards touch.", min(2000, score.shardstouched*750))
if(score.kudzugrowth > 150)
episode_names += new /datum/episode_name/rare("[pick("REAP WHAT YOU SOW", "OUT OF THE WOODS", "SEEDY BUSINESS", "[uppr_name] AND THE BEANSTALK", "IN THE GARDEN OF EDEN")]", "[score.kudzugrowth] tiles worth of Kudzu were grown in total this round.", min(1500, score.kudzugrowth*2))
if(score.disease >= score.escapees && score.escapees > 5)
episode_names += new /datum/episode_name/rare("[pick("THE CREW GETS DOWN WITH THE SICKNESS", "THE CREW GETS AN INCURABLE DISEASE", "THE CREW'S SICK PUNS")]", "[score.disease] disease points this round.", min(500, (score.disease*25) * (score.disease/score.escapees)))
var/list/p_hotspot = SSair.processing_parts[SSAIR_HOTSPOT]
if(p_hotspot.len > 200) // List of turfs on fire length
episode_names += new /datum/episode_name/rare("[pick("THE CREW LOSES THEIR CHILL", "DISCO INFERNO", "ASHES TO ASHES", "BURNING DOWN THE HOUSE")]", "[p_hotspot.len] turfs were on fire by the end of the round.", min(1000, p_hotspot.len/2))
if(score["largeexplosions"] >= 6)
episode_names += new /datum/episode_name/rare("THE CREW HAS A BLAST", "[score["largeexplosions"]] large explosions happened this round.", min(1000, score["largeexplosions"]*100))
if(score["shuttlebombed"] >= score["escapees"] && score["escapees"] > 5)
episode_names += new /datum/episode_name/rare("ON A WING AND A PRAYER", "The shuttle was bombed but [score["escapees"]] people escaped anyways.", min(1000, score["shuttlebombed"]*200))
if(score.largeexplosions >= 6)
episode_names += new /datum/episode_name/rare("THE CREW HAS A BLAST", "[score.largeexplosions] large explosions happened this round.", min(1000, score.largeexplosions*100))
if(score.shuttlebombed >= score.escapees && score.escapees > 5)
episode_names += new /datum/episode_name/rare("ON A WING AND A PRAYER", "The shuttle was bombed but [score.escapees] people escaped anyways.", min(1000, score.shuttlebombed*200))
var/deadcatbeastcount = 0
for(var/mob/living/carbon/human/H in dead_mob_list)
@@ -166,10 +166,10 @@
episode_names += new /datum/episode_name/rare("[pick("WHERE NO DOG HAS GONE BEFORE", "IAN SAYS", "IAN'S DAY OUT", "EVERY DOG HAS ITS DAY", "THE ONE WITH THE MAGIC PUPPY")]", "You know what you did.", 1000)
break
if(score["greasewiz"] > 4)
if(score.greasewiz > 4)
for(var/mob/living/carbon/monkey/M in mob_list)
if(M.spell_list.len && (locate(/spell/targeted/grease) in M.spell_list))
episode_names += new /datum/episode_name/rare("GREASE MONKEY", "A successful Grease wizard got monkeyed.", score["greasewiz"]*100)
episode_names += new /datum/episode_name/rare("GREASE MONKEY", "A successful Grease wizard got monkeyed.", score.greasewiz*100)
break
if(ticker && ticker.shuttledocked_time != -1 && emergency_shuttle.location == map.zCentcomm)
@@ -185,15 +185,15 @@
human_escapees |= M
if(ticker.shuttledocked_time - ticker.gamestart_time < SHUTTLEARRIVETIME + SHUTTLEGRACEPERIOD + 60) //shuttle docked in less than 16 minutes!!
episode_names += new /datum/episode_name/rare("[pick("THE CAPTAIN STUBS THEIR TOE", "QUICK GETAWAY", "A MOST EFFICIENT APOCALYPSE", "THE CREW'S [round(score["time"]/60)] MINUTES OF FAME", "ON SECOND THOUGHT, LET'S NOT GO TO [uppr_name]. 'TIS A SILLY PLACE.")]", "This round was about as short as they come.", 750)
if(score["escapees"] == 0)
episode_names += new /datum/episode_name/rare("[pick("THE CAPTAIN STUBS THEIR TOE", "QUICK GETAWAY", "A MOST EFFICIENT APOCALYPSE", "THE CREW'S [round(score.time/60)] MINUTES OF FAME", "ON SECOND THOUGHT, LET'S NOT GO TO [uppr_name]. 'TIS A SILLY PLACE.")]", "This round was about as short as they come.", 750)
if(score.escapees == 0)
episode_names += new /datum/episode_name/rare("DRY RUN", "This round was as short as they come, and there were no escapees.", 2500)
if(score["deadcrew"] == 0)
episode_names += new /datum/episode_name/rare("[pick("EMPLOYEE TRANSFER", "LIVE LONG AND PROSPER", "PEACE AND QUIET IN [uppr_name]", "THE ONE WITHOUT ALL THE FIGHTING", "THE CREW TRIES TO KILL A FLY FOR [round(score["time"]/60)] MINUTES")]", "No-one died this round.", 2500) //in practice, this one is very very very rare, so if it happens let's pick it more often
if(score["escapees"] == 0 && ticker && ticker.shuttledocked_time != -1)
if(score.deadcrew == 0)
episode_names += new /datum/episode_name/rare("[pick("EMPLOYEE TRANSFER", "LIVE LONG AND PROSPER", "PEACE AND QUIET IN [uppr_name]", "THE ONE WITHOUT ALL THE FIGHTING", "THE CREW TRIES TO KILL A FLY FOR [round(score.time/60)] MINUTES")]", "No-one died this round.", 2500) //in practice, this one is very very very rare, so if it happens let's pick it more often
if(score.escapees == 0 && ticker && ticker.shuttledocked_time != -1)
episode_names += new /datum/episode_name("[pick("DEAD SPACE", "THE CREW GOES MISSING", "LOST IN TRANSLATION", "[uppr_name]: DELETED SCENES", "WHAT HAPPENS IN [uppr_name], STAYS IN [uppr_name]", "MISSING IN ACTION", "SCOOBY-DOO, WHERE'S THE CREW?")]", "There were no escapees on the shuttle.", 300)
if(score["escapees"] < 6 && score["escapees"] > 0 && score["deadcrew"] > score["escapees"]*2)
episode_names += new /datum/episode_name("[pick("AND THEN THERE WERE FEWER", "THE 'FUN' IN 'FUNERAL'", "FREEDOM RIDE OR DIE", "THINGS WE LOST IN [uppr_name]", "GONE WITH [uppr_name]", "LAST TANGO IN [uppr_name]", "GET BUSY LIVING OR GET BUSY DYING", "THE CREW FUCKING DIES", "WISH YOU WERE HERE")]", "[score["deadcrew"]] people died this round.", 400)
if(score.escapees < 6 && score.escapees > 0 && score.deadcrew > score.escapees*2)
episode_names += new /datum/episode_name("[pick("AND THEN THERE WERE FEWER", "THE 'FUN' IN 'FUNERAL'", "FREEDOM RIDE OR DIE", "THINGS WE LOST IN [uppr_name]", "GONE WITH [uppr_name]", "LAST TANGO IN [uppr_name]", "GET BUSY LIVING OR GET BUSY DYING", "THE CREW FUCKING DIES", "WISH YOU WERE HERE")]", "[score.deadcrew] people died this round.", 400)
var/clowncount = 0
var/mimecount = 0
@@ -264,8 +264,8 @@
episode_names += new /datum/episode_name/rare("BIRDS OF A FEATHER...", "Most of the survivors were Vox.", min(1500, voxcount*250))
if(voxcount / human_escapees.len > 0.6 && emergency_shuttle.was_early_launched)
episode_names += new /datum/episode_name/rare("EARLY BIRD GETS THE WORM", "Most or all of the survivors were Vox, and the shuttle timer was shortened.", 1500)
if(voxcount / human_escapees.len > 0.6 && score["shuttlebombed"] > 3)
episode_names += new /datum/episode_name/rare("SITTING DUCKS", "Most or all of the survivors were Vox, and the shuttle was bombed.", min(1500,score["shuttlebombed"]*3))
if(voxcount / human_escapees.len > 0.6 && score.shuttlebombed > 3)
episode_names += new /datum/episode_name/rare("SITTING DUCKS", "Most or all of the survivors were Vox, and the shuttle was bombed.", min(1500,score.shuttlebombed*3))
if(dionacount / human_escapees.len > 0.6)
episode_names += new /datum/episode_name/rare("[pick("ALL BARK AND NO BITE", "THE CREW GETS STUMPED")]", "Most of the survivors were Diona.", min(1500, dionacount*350))
if(baldycount / human_escapees.len > 0.6 && human_escapees.len > 3)
@@ -298,7 +298,7 @@
chance += 250
episode_names += new /datum/episode_name/rare("HAIL TO THE CHEF", "The Chef was the only survivor in the shuttle.", chance)
if(p_hotspot.len > 200) // List of turfs on fire length
episode_names += new /datum/episode_name/rare("IF YOU CAN'T STAND THE HEAT...", "The Chef was the only survivor in the shuttle and [score["turfsonfire"]] turfs were on fire.", min(chance, score["turfsonfire"]/2))
episode_names += new /datum/episode_name/rare("IF YOU CAN'T STAND THE HEAT...", "The Chef was the only survivor in the shuttle and [score.turfsonfire] turfs were on fire.", min(chance, score.turfsonfire/2))
else if(!H.isUnconscious() && H.mind && H.mind.assigned_role == "Clown")
var/chance = 250
if(H.is_wearing_item(/obj/item/clothing/mask/gas/clown_hat))
@@ -384,7 +384,7 @@
var/shoecount = 0
for(var/obj/item/clothing/shoes/S in shuttle) //they gotta be on the floor
shoecount++
if(shoecount > 5 || score["shoesnatches"] > 10)
if(shoecount > 5 || score.shoesnatches > 10)
episode_names += new /datum/episode_name/rare("THE SOLE SURVIVOR", "There was only one survivor in the shuttle, and they didn't forget their shoes.", 2500) //I'm not sorry
var/headcount = 0
@@ -407,7 +407,8 @@
livingmobcount += 1
if(wolfcount == 1 && livingmobcount == 1)
episode_names += new /datum/episode_name/rare("LONE WOLF", "...", 1500)
else //more than 0 human escapees
else
//more than 0 human escapees
var/braindamage_total = 0
var/all_retarded = TRUE
for(var/mob/living/carbon/human/H in human_escapees)
@@ -449,7 +450,7 @@
episode_names += new /datum/episode_name/rare("REALM OF THE RAD GOD", "Someone dragged \a [SM] onto the shuttle.", 1500)
break
if(score["random_soc"] > 7)
if(score.random_soc > 7)
var/list/nasty_things = list()
var/list/adjectives = list()

View File

@@ -77,7 +77,7 @@ var/list/event_last_fired = list()
//and start working via the constructor.
new picked_event
score["eventsendured"]++
score.eventsendured++
message_admins("[picked_event] firing. Time to have fun.")

View File

@@ -39,7 +39,7 @@
result = /obj/item/weapon/reagent_containers/food/snacks/bagel
/datum/recipe/bagel/make_food(obj/container)
score["bagelscooked"]++
score.bagelscooked++
return ..()
// Burgers /////////////////////////////////////////////////////

View File

@@ -520,7 +520,7 @@ var/global/list/gene_tag_masks = list() // Gene obfuscation for delicious tria
else
product = new product_type(T)
score["stuffharvested"] += 1 //One point per product unit
score.stuffharvested += 1 //One point per product unit
if(mysterious)
product.name += "?"

View File

@@ -97,7 +97,7 @@
spawn(1) // Plants will sometimes be spawned in the turf adjacent to the one they need to end up in, for the sake of correct dir/etc being set.
SSplant.add_plant(src)
score["kudzugrowth"]++
score.kudzugrowth++
// Some plants eat through plating.
if(seed.chems && !isnull(seed.chems[PHENOL]))
var/turf/T = get_turf(src)

View File

@@ -412,7 +412,7 @@
while(R.checkIngredients(ore)) //While we have materials for this
for(var/ore_id in R.ingredients)
ore.removeAmount(ore_id, R.ingredients[ore_id]) //arg1 = ore name, arg2 = how much per sheet
score["oremined"] += 1 //Count this ore piece as processed for the scoreboard
score.oremined += 1 //Count this ore piece as processed for the scoreboard
drop_stack(R.yieldtype, out_T)

View File

@@ -51,7 +51,7 @@
for(var/O in B.stored_ores)
var/amount = B.stored_ores[O]
SmeltOreType(O, amount)
score["oremined"] += amount
score.oremined += amount
else
for(var/i = 0; i < 10; i++)
var/obj/item/stack/ore/O = locate() in in_T
@@ -59,7 +59,7 @@
continue //Skip slag for now.
if(O)
SmeltMineral(O)
score["oremined"] += O.amount
score.oremined += O.amount
else
break

View File

@@ -369,7 +369,7 @@
while(R.checkIngredients(materials)) //While we have materials for this
for(var/ore_id in R.ingredients)
materials.removeAmount(ore_id, R.ingredients[ore_id]) //arg1 = ore name, arg2 = how much per sheet
score["oremined"] += 1 //Count this ore piece as processed for the scoreboard
score.oremined += 1 //Count this ore piece as processed for the scoreboard
if(istype(loc,/obj/structure/forge))
drop_stack(R.yieldtype,loc.loc)
else

View File

@@ -130,7 +130,7 @@
if(mind)
mind.store_memory("Time of death: [tod]", 0)
if(!(mind && mind.suiciding)) //Cowards don't count
score["deadcrew"]++ //Someone died at this point, and that's terrible
score.deadcrew++ //Someone died at this point, and that's terrible
if (dorfpod)
dorfpod.scan_body(src)
if(ticker && ticker.mode)

View File

@@ -82,6 +82,7 @@
LAssailant = M
assaulted_by(M)
log_attack("[M.name] ([M.ckey]) bitten by [src.name] ([src.ckey])")
return
//KICKS

View File

@@ -1732,7 +1732,7 @@ Thanks.
stop_pulling()
Stun(stun_amount)
Knockdown(weaken_amount)
score["slips"]++
score.slips++
return 1
///////////////////////DISEASE STUFF///////////////////////////////////////////////////////////////////

View File

@@ -152,7 +152,6 @@
throwByName = M.name
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Hit [src.name] ([src.ckey]) with a thrown [O] (speed: [speed])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been hit with a thrown [O], last touched by [throwByName] ([assailant.ckey]) (speed: [speed])</font>")
if(!src.isDead() && src.ckey) //Message admins if the hit mob is alive and has a ckey
msg_admin_attack("[src.name] ([src.ckey]) was hit by a thrown [O], last touched by [throwByName] ([assailant.ckey]) (speed: [speed]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
@@ -161,7 +160,6 @@
else
src.LAssailant = M
assaulted_by(M)
/*
Ear and eye protection

View File

@@ -194,10 +194,10 @@ var/list/headset_modes = list(
if(src.mind && (src.mind.GetRole(TRAITOR) || src.mind.GetRole(NUKE_OP) || src.mind.GetRole(CHALLENGER)))
for(var/syn in syndicate_code_phrase)
if(findtext(speech.message, syn))
score["syndiphrases"] += 1
score.syndiphrases += 1
for(var/syn in syndicate_code_response)
if(findtext(speech.message, syn))
score["syndisponses"] += 1
score.syndisponses += 1
var/message_range = 7
treat_speech(speech)

View File

@@ -68,6 +68,6 @@
if(mind)
mind.store_memory("Time of death: [tod]", 0)
if(!mind.suiciding) //Cowards don't count
score["deadaipenalty"] += 1
score.deadaipenalty += 1
return ..(gibbed)

View File

@@ -13,7 +13,7 @@
if(mind) //To make sure we're gibbing a player, who knows
if(!mind.suiciding) //I don't know how that could happen, but you can't be too sure
score["deadsilicon"] += 1
score.deadsilicon += 1
living_mob_list -= src
dead_mob_list -= src
@@ -75,7 +75,7 @@
if(mind)
mind.store_memory("Time of death: [tod]", 0)
if(!mind.suiciding)
score["deadsilicon"] += 1
score.deadsilicon += 1
sql_report_cyborg_death(src)

View File

@@ -247,7 +247,7 @@
speech.message = buttbottify(speech.message, 3, 9) // 3 times as intense
var/obj/machinery/bot/buttbot/BB = current_bot
BB.fart()
score["buttbotfarts"]++
score.buttbotfarts++
else if(!istype(loc,/obj/item/device/radio)) // Speak via radios, including intercoms
to_chat(src, "You have nothing to speak with.")

View File

@@ -33,13 +33,13 @@
/obj/structure/painting/custom/New()
src.painting_data = new(src, painting_width, painting_height, painting_offset_x, painting_offset_y, base_color)
var/list/gallery = score["global_paintings"]
var/list/gallery = score.global_paintings
if(!gallery.Find(src))
gallery += src
..()
/obj/structure/painting/custom/Destroy()
var/list/gallery = score["global_paintings"]
var/list/gallery = score.global_paintings
if(gallery.len && gallery.Find(src))
gallery -= src
qdel(painting_data)

View File

@@ -25,7 +25,7 @@
type = null
if(ishuman(M) && type == null)
score["random_soc"]++ //Just for scorekeeping. Humans that were hit by a random-type bolt.
score.random_soc++ //Just for scorekeeping. Humans that were hit by a random-type bolt.
var/randomize = type == null? pick(available_staff_transforms):type

View File

@@ -59,7 +59,7 @@
if(!reagentreference || !reagentreference.total_volume) //Are we done eating (determined by the amount of reagents left, here 0)
user.visible_message("<span class='notice'>[user] finishes eating \the [src].</span>", \
"<span class='notice'>You finish eating \the [src].</span>")
score["foodeaten"]++ //For post-round score
score.foodeaten++ //For post-round score
//Drop our item before we delete it, to clear any references of ourselves in people's hands or whatever.
var/old_loc = loc

View File

@@ -77,7 +77,7 @@
if(istype(holder, /obj/machinery/artifact))
var/obj/machinery/artifact/A = holder
if (A.analyzed)
score["artifacts"]++
score.artifacts++
spawn(20 SECONDS)
isolated = 0

View File

@@ -144,7 +144,7 @@ var/anomaly_report_num = 0
if (!A.analyzed)
A.analyzed = TRUE
if (istype(A.primary_effect) && A.primary_effect.triggered)
score["artifacts"]++
score.artifacts++
/obj/machinery/artifact_analyser/Topic(href, href_list)

View File

@@ -117,7 +117,7 @@
spawn()
zapmuthafucka(user, L, bounces)
score["lightningwiz"]++
score.lightningwiz++
/spell/lightning/proc/zapmuthafucka(var/mob/user, var/mob/living/target, var/chained = bounces, var/list/zapped = list(), var/oursound = null)
var/otarget = target

View File

@@ -39,7 +39,7 @@
playsound(src, 'sound/effects/superfart.ogg', 50, 1)
C.apply_damage(40, BRUTE, LIMB_GROIN)
C.apply_damage(10, BURN, LIMB_GROIN)
score["assesblasted"]++
score.assesblasted++
return
/spell/targeted/buttbots_revenge/empower_spell()

View File

@@ -50,4 +50,4 @@
if(user.has_spell_with_flag(SPELL_FIRE))
s.carried_reagents.Add(FUEL)
s.start()
score["greasewiz"]++
score.greasewiz++

View File

@@ -68,7 +68,7 @@
if(!success)
L.Remove(attempt)
else
score["dimensionalpushes"]++
score.dimensionalpushes++
break
if(!success)
target.forceMove(pick(backup_L))

View File

@@ -34,7 +34,7 @@
target.visible_message( "<span class='danger'>[target]'s shoes suddenly vanish!</span>", \
"<span class='danger'>Your shoes suddenly vanish!</span>")
user.put_in_active_hand(old_shoes)
score["shoesnatches"]++
score.shoesnatches++
else if(spawn_shards) //Spawn shards if the target isn't wearing shoes
to_chat(user, "<span class='danger'>You conjure several glass shards around \the [target].</span>")

View File

@@ -442,7 +442,7 @@
if(istype(AM, /obj/machinery/power/supermatter))
AM.visible_message("<span class='sinister'>As \the [src] bumps into \the [AM] an otherworldly resonance ringing begins to shake the room, you ponder for a moment all the incorrect choices in your life that led you here, to this very moment, to witness this. You take one final sigh before it all ends.</span>")
sleep(10) //Adds to the hilarity
score["shardstouched"]++
score.shardstouched++
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
explode()
return

View File

@@ -133,20 +133,20 @@
d.effect = memorybank
if (!(memorybank.type in extracted_gna))
extracted_gna |= memorybank.type
score["disease_extracted"] += 1
score.disease_extracted += 1
switch (memorybank.badness)
if (EFFECT_DANGER_HELPFUL)
score["disease_effects"] += 20
score.disease_effects += 20
if (EFFECT_DANGER_FLAVOR)
score["disease_effects"] += 2
score.disease_effects += 2
if (EFFECT_DANGER_ANNOYING)
score["disease_effects"] += 1
score.disease_effects += 1
if (EFFECT_DANGER_HINDRANCE)
score["disease_effects"] += 5
score.disease_effects += 5
if (EFFECT_DANGER_HARMFUL)
score["disease_effects"] += 10
score.disease_effects += 10
if (EFFECT_DANGER_DEADLY)
score["disease_effects"] += 30
score.disease_effects += 30
alert_noise("ping")
spawn(10)
d.forceMove(loc)

View File

@@ -556,7 +556,7 @@
spawn_turfs.Add(get_turf(H))
var/mob/living/simple_animal/hostile/heart_attack/HA = new(pick(spawn_turfs))
HA.update_heart(blown_heart,H.dna,virus_copylist(H.virus2))
score["heartattacks"]++
score.heartattacks++
qdel(blown_heart)
/datum/disease2/effect/wizarditis

View File

@@ -595,7 +595,6 @@
#include "code\game\gamemodes\gameticker.dm"
#include "code\game\gamemodes\highscores.dm"
#include "code\game\gamemodes\intercept_report.dm"
#include "code\game\gamemodes\scoreboard.dm"
#include "code\game\gamemodes\setupgame.dm"
#include "code\game\gamemodes\steal_items.dm"
#include "code\game\gamemodes\blob\overmind.dm"
@@ -611,6 +610,10 @@
#include "code\game\gamemodes\endgame\endgame.dm"
#include "code\game\gamemodes\endgame\halloween\gravestone.dm"
#include "code\game\gamemodes\endgame\halloween\halloween.dm"
#include "code\game\gamemodes\endgame\scoreboard\antag_score.dm"
#include "code\game\gamemodes\endgame\scoreboard\department_score.dm"
#include "code\game\gamemodes\endgame\scoreboard\misc_score.dm"
#include "code\game\gamemodes\endgame\scoreboard\scoreboard.dm"
#include "code\game\gamemodes\endgame\supermatter_cascade\blob.dm"
#include "code\game\gamemodes\endgame\supermatter_cascade\portal.dm"
#include "code\game\gamemodes\endgame\supermatter_cascade\universe.dm"