Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statistic #6945

Open
wants to merge 77 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
fb3e0d3
b1
Aug 7, 2024
459718b
b2
Aug 7, 2024
79cfdbf
a1
Aug 7, 2024
cd66a8d
CR1
Aug 7, 2024
b1bc330
CR2
Aug 7, 2024
e427452
CR3
Aug 7, 2024
6c63adb
a2
Aug 7, 2024
0689d0a
a3
Aug 7, 2024
7f3e388
CR4/A
Aug 7, 2024
ded619b
Cool number count of problems mark passed
Aug 7, 2024
40dec4f
CR5 fuck it for now...
Aug 7, 2024
c4ab412
fffff
Aug 13, 2024
dfc4505
Revert of factions 1
Aug 13, 2024
35d14cc
Revert of factions 2
Aug 13, 2024
d7978ca
Revert of factions 3
Aug 13, 2024
e61f019
Revert of factions 4 (CR3)
Aug 13, 2024
a95333d
Revert of factions 5 (CR2)
Aug 13, 2024
a8d24d8
Revert of factions 6 (CR1)
Aug 13, 2024
6d8f47e
Revert of factions 7 (a1)
Aug 13, 2024
781e191
Fix of shitty shit around
Aug 13, 2024
194ee6c
Merge branch 'master' into statistic
blackcrystall Aug 13, 2024
d061887
remaining shit
Aug 13, 2024
48fd9ad
f
Aug 13, 2024
b65b861
krill yourself IB
Aug 13, 2024
fc5e6ea
WOW! slow down, wtf this doing here... probably somewhere I messed up
Aug 13, 2024
8cc34f1
messed up
Aug 13, 2024
e306f77
gadsfbgsaduddfibds
Aug 13, 2024
e65ca95
krill yourself now... hard to port something from
Aug 13, 2024
f104fbf
krill?
Aug 13, 2024
6833482
Ehhh, old code...
Aug 13, 2024
81ff79c
space...
Aug 13, 2024
aae2679
no more useles update tab
Aug 13, 2024
483fd05
some QoL
Aug 13, 2024
006f940
stop runtiming here now
Aug 13, 2024
5fb33bb
a little bit more qol
Aug 13, 2024
29d2ff3
thanks for returning empty list, then now stop runtiming!
Aug 13, 2024
a0eb530
a little bit of explnt for type global and how to use it in future
Aug 13, 2024
fa7ef7b
fun around and tea
Aug 13, 2024
f673c9c
strange issue with zeroes fix
Aug 13, 2024
81bc920
some depricatedddddddd fun around
Aug 13, 2024
68c5ba6
no context for useBackend
Aug 13, 2024
a9a9794
Merge remote-tracking branch 'upstream/master' into statistic
Aug 14, 2024
2cdb36d
fix, stupid check on mind failing all fun around
Aug 15, 2024
f90d840
Krill unit test... I'll fuck you up, if you one more time do stupid t…
Aug 16, 2024
cc24069
for normal pods count escapes too
Aug 16, 2024
ca8327d
Merge branch 'master' into statistic
blackcrystall Aug 16, 2024
afa49c5
f
Aug 19, 2024
30ac076
fix
Aug 19, 2024
ca05d3f
right way check
Aug 19, 2024
c5aaf14
protectiond around, for funny admins, no calls and edits
Aug 19, 2024
34d7302
some minor cachnges + old ui remove
Aug 19, 2024
c89d087
f
Aug 29, 2024
48d82f7
Дорогой дневник, у меня нету слов что бы описать remote tracking bran…
Aug 30, 2024
433d704
statistic count fix
Sep 1, 2024
bac1e8e
fix of issue
Sep 13, 2024
b63ad1c
Merge branch 'master' into statistic
blackcrystall Oct 8, 2024
0c0c727
DON'T SPAM WITH THAT AAAAAAAAAAAAAAAAAAAAAAA
Oct 8, 2024
c2f35a8
some funny fckery around
Oct 8, 2024
65b226d
some playing around and fixing
Oct 8, 2024
716e0c7
no button size increase
Oct 8, 2024
85f9763
funny
Oct 9, 2024
09620a8
I have no idea what i done, and it's don't working as supposed, but w…
Oct 10, 2024
735fa40
unused var
Oct 10, 2024
13cc562
Merge branch 'master' into statistic
blackcrystall Oct 12, 2024
88a9d4d
unitests fix? (without stick in, for ignore)
blackcrystall Oct 16, 2024
8382b38
didn't working out, so just ignore it
blackcrystall Oct 16, 2024
4ec892e
some qol and fixes
blackcrystall Oct 18, 2024
53d4418
lolz
blackcrystall Oct 18, 2024
8c89b7b
Merge branch 'master' into statistic
blackcrystall Oct 18, 2024
807065a
Fun
blackcrystall Oct 19, 2024
1008328
Update code/modules/projectiles/guns/flamer/flamer.dm
blackcrystall Oct 19, 2024
945be4b
some another
blackcrystall Oct 19, 2024
56bcd9e
Merge branch 'master' into statistic
blackcrystall Nov 8, 2024
925e32f
Merge branch 'master' into statistic
blackcrystall Nov 9, 2024
3263120
AAAAAAAAAAAAAAAAAAAAA CONFLICTS, KYS
blackcrystall Nov 9, 2024
689575e
fuck off linters
blackcrystall Nov 9, 2024
e77ec5a
this is funny one, that I totally messed up first time, don't let me …
blackcrystall Nov 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions code/__DEFINES/__game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
#define MAP_NEW_VARADERO "New Varadero"//ice colony underground but as its own map
#define MAP_CHINOOK "Chinook 91 GSO" //admin level

#define GAMEMODE_WHISKEY_OUTPOST "Whiskey Outpost"
#define GAMEMODE_HIVE_WARS "Hive Wars"

/// Number of players before we switch to lowpop maps only (LV, BR, Prison).
#define PLAYERCOUNT_LOWPOP_MAP_LIMIT 130
/// Time before the round starts.
Expand Down
51 changes: 0 additions & 51 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -188,60 +188,9 @@
#define EMERGENCY_PLATE_OD_WARNING 1
#define EMERGENCY_PLATE_ADJUSTED_WARNING 2


// RESEARCH UPGRADES DEFINES END

// Statistics defines
#define STATISTIC_XENO "xeno"
#define STATISTIC_HUMAN "human"

#define STATISTICS_DEATH_LIST_LEN 10

#define STATISTICS_NICHE_EXECUTION "Executions Made"
#define STATISTICS_NICHE_MEDALS "Medals Received"
#define STATISTICS_NICHE_MEDALS_GIVE "Medals Given"
#define STATISTICS_NICHE_SHOCK "Times Shocked"
#define STATISTICS_NICHE_GRENADES "Grenades Thrown"
#define STATISTICS_NICHE_FLIGHT "Flights Piloted"
#define STATISTICS_NICHE_HANDCUFF "Handcuffs Applied"
#define STATISTICS_NICHE_PILLS "Pills Fed"
#define STATISTICS_NICHE_DISCHARGE "Accidental Discharges"
#define STATISTICS_NICHE_FULTON "Fultons Deployed"
#define STATISTICS_NICHE_DISK "Disks Decrypted"
#define STATISTICS_NICHE_UPLOAD "Data Uploaded"
#define STATISTICS_NICHE_CHEMS "Chemicals Discovered"
#define STATISTICS_NICHE_CRATES "Supplies Airdropped"
#define STATISTICS_NICHE_OB "Bombardments Fired"

#define STATISTICS_NICHE_CADES "Barricades Built"
#define STATISTICS_NICHE_UPGRADE_CADES "Barricades Upgraded"
#define STATISTICS_NICHE_REPAIR_CADES "Barricades Repaired"
#define STATISTICS_NICHE_REPAIR_GENERATOR "Generators Repaired"
#define STATISTICS_NICHE_REPAIR_APC "APCs Repaired"
#define STATISTICS_NICHE_DEFENSES_BUILT "Defenses Built"

#define STATISTICS_NICHE_CORGI "Corgis Murdered"
#define STATISTICS_NICHE_CAT "Cats Murdered"
#define STATISTICS_NICHE_COW "Cows Murdered"
#define STATISTICS_NICHE_CHICKEN "Chickens Murdered"

#define STATISTICS_NICHE_SURGERY_BONES "Bones Mended"
#define STATISTICS_NICHE_SURGERY_IB "Internal Bleedings Stopped"
#define STATISTICS_NICHE_SURGERY_BRAIN "Brains Mended"
#define STATISTICS_NICHE_SURGERY_EYE "Eyes Mended"
#define STATISTICS_NICHE_SURGERY_LARVA "Larvae Removed"
#define STATISTICS_NICHE_SURGERY_SHRAPNEL "Shrapnel Removed"
#define STATISTICS_NICHE_SURGERY_AMPUTATE "Limbs Amputated"
#define STATISTICS_NICHE_SURGERY_ORGAN_REPAIR "Organs Repaired"
#define STATISTICS_NICHE_SURGERY_ORGAN_ATTACH "Organs Implanted"
#define STATISTICS_NICHE_SURGERY_ORGAN_REMOVE "Organs Harvested"

#define STATISTICS_NICHE_DESTRUCTION_WALLS "Walls Destroyed"
#define STATISTICS_NICHE_DESTRUCTION_DOORS "Doors Destroyed"
#define STATISTICS_NICHE_DESTRUCTION_WINDOWS "Windows Destroyed"

//Multiplier for turning points into cash
#define DEFCON_TO_MONEY_MULTIPLIER 10000
#define SUPPLY_TO_MONEY_MUPLTIPLIER 100

//Force the config directory to be something other than "config"
Expand Down
15 changes: 14 additions & 1 deletion code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@

//=================================================

#define MODE_NAME_EXTENDED "Extended"
#define MODE_NAME_EXTENDED_NO_SPAWN "Extended - No Spawn"
#define MODE_NAME_DISTRESS_SIGNAL "Distress Signal"
#define MODE_NAME_FACTION_CLASH "Faction Clash"
#define MODE_NAME_WISKEY_OUTPOST "Whiskey Outpost"
#define MODE_NAME_HUNTER_GAMES "Hunter Games"
#define MODE_NAME_HIVE_WARS "Hive Wars"
#define MODE_NAME_INFECTION "Infection"

//=================================================

#define IS_MODE_COMPILED(MODE) (ispath(text2path("/datum/game_mode/"+(MODE))))

Expand Down Expand Up @@ -321,8 +331,11 @@ DEFINE_BITFIELD(whitelist_status, list(
#define FACTION_XENOMORPH_BRAVO "Bravo Xenomorph"
#define FACTION_XENOMORPH_CHARLIE "Charlie Xenomorph"
#define FACTION_XENOMORPH_DELTA "Delta Xenomorph"
#define FACTION_XENOMORPH_FERAL "Feral Xenomorph"
#define FACTION_XENOMORPH_FORSAKEN "Forsaken Xenomorph"

#define FACTION_LIST_XENOMORPH list(FACTION_XENOMORPH, FACTION_XENOMORPH_CORRPUTED, FACTION_XENOMORPH_ALPHA, FACTION_XENOMORPH_BRAVO, FACTION_XENOMORPH_CHARLIE, FACTION_XENOMORPH_DELTA)
#define FACTION_LIST_XENOMORPH list(FACTION_XENOMORPH, FACTION_XENOMORPH_CORRPUTED, FACTION_XENOMORPH_ALPHA, FACTION_XENOMORPH_BRAVO, FACTION_XENOMORPH_CHARLIE, FACTION_XENOMORPH_DELTA, FACTION_XENOMORPH_FERAL, FACTION_XENOMORPH_FORSAKEN)
#define FACTION_LIST_ALL FACTION_LIST_HUMANOID + FACTION_LIST_XENOMORPH + FACTION_PREDALIEN

// Faction allegiances within a certain faction.

Expand Down
94 changes: 94 additions & 0 deletions code/__DEFINES/statistic.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
#define FACEHUG_TIER_1 5
#define FACEHUG_TIER_2 25
#define FACEHUG_TIER_3 100
#define FACEHUG_TIER_4 1000

// OOD mean Out Of Date (not used, please keep this list up to date, and remember sync in db changes, I'm hard against db wipe after every big change)

// Statistics defines
#define STATISTIC_TYPE_MISC "Misc"
#define STATISTIC_TYPE_CASTE "Caste"
#define STATISTIC_TYPE_CASTE_ABILITIES "Caste Abilities"
#define STATISTIC_TYPE_JOB "Role"
#define STATISTIC_TYPE_WEAPON "Weapon"

// Used to replace faction name
#define STATISTIC_TYPE_GLOBAL "Global Statistic"// Don't have link to a faction

#define STATISTICS_DEATH_LIST_LEN 20

#define STATISTICS_FF_SHOT_HIT "FF Shot Hit"
#define STATISTICS_SHOT_HIT "Shot Hit"
#define STATISTICS_SHOT "Shot"
#define STATISTICS_DAMAGE "Damage"
#define STATISTICS_FF_DAMAGE "FF Damage"
#define STATISTICS_HEALED_DAMAGE "Healed Damage"
#define STATISTICS_SCREAM "Scream"
#define STATISTICS_HIT "Hit"
#define STATISTICS_FF_HIT "FF Hit"
#define STATISTICS_EXPLODED_MOBS "Blowjobs Done"// :clueless_face:
#define STATISTICS_SLASH "Slash"
#define STATISTICS_REVIVE "Revive"
#define STATISTICS_REVIVED "Revived"
#define STATISTICS_STEPS_WALKED "Steps"
#define STATISTICS_KILL "Kill"
#define STATISTICS_DEATH "Death"
#define STATISTICS_KILL_FF "Kill FF"
#define STATISTICS_DEATH_FF "Death FF"
#define STATISTICS_ROUNDS_PLAYED "Rounds Played"

#define STATISTICS_ABILITES "Abilites"
#define STATISTICS_FACEHUGGE "Facehugge"
#define STATISTIC_XENO_STRUCTURES_BUILD "Builded"

#define STATISTICS_EXECUTION "Executions Made"
#define STATISTICS_MEDALS "Medals Received"
#define STATISTICS_MEDALS_GIVE "Medals Given"
#define STATISTICS_SHOCK "Times Shocked"
#define STATISTICS_GRENADES "Grenades Thrown"
#define STATISTICS_FLIGHT "Flights Piloted"
#define STATISTICS_HANDCUFF "Handcuffs Applied"
#define STATISTICS_PILLS "Pills Fed"
#define STATISTICS_DISCHARGE "Accidental Discharges"
#define STATISTICS_FULTON "Fultons Deployed"
#define STATISTICS_DISK "Disks Decrypted"
#define STATISTICS_UPLOAD "Data Uploaded"
#define STATISTICS_CHEMS "Chemicals Discovered"
#define STATISTICS_CRATES "Supplies Airdropped"
#define STATISTICS_OB "Bombardments Fired"
#define STATISTICS_AMMO_CONVERTED "Ammo Converted"
#define STATISTICS_IMPLANTS_IMPLANTED "Implants Implanted"
#define STATISTICS_REVIVED_BY_IMPLANT "Revive Implant Saved Lifes"
#define STATISTICS_SD_ACTIVATION "SD Activated"// OOD
#define STATISTICS_SACRIFICE "Sacrificed"// OOD
#define STATISTICS_ESCAPE "Escaped"

#define STATISTICS_CADES "Barricades Built"
#define STATISTICS_UPGRADE_CADES "Barricades Upgraded"
#define STATISTICS_REPAIR_CADES "Barricades Repaired"
#define STATISTICS_REPAIR_GENERATOR "Generators Repaired"
#define STATISTICS_REPAIR_SENSORTOWER "Sensor Towers Repaired"
#define STATISTICS_REPAIR_APC "APCs Repaired"
#define STATISTICS_UPGRADE_TURRETS "Defenses Upgraded"
#define STATISTICS_DEFENSES_BUILT "Defenses Built"// OOD

#define STATISTICS_CORGI "Corgis Murdered"
#define STATISTICS_CAT "Cats Murdered"
#define STATISTICS_COW "Cows Murdered"
#define STATISTICS_CHICKEN "Chickens Murdered"

#define STATISTICS_SURGERY_BONES "Bones Mended"
#define STATISTICS_SURGERY_IB "Internal Bleedings Stopped"
#define STATISTICS_SURGERY_BRAIN "Brains Mended"
#define STATISTICS_SURGERY_EYE "Eyes Mended"
#define STATISTICS_SURGERY_LARVA "Larvae Removed"
#define STATISTICS_SURGERY_NECRO "Necro Limbs Fixed"// OOD
#define STATISTICS_SURGERY_SHRAPNEL "Shrapnel Removed"
#define STATISTICS_SURGERY_AMPUTATE "Limbs Amputated"
#define STATISTICS_SURGERY_ORGAN_REPAIR "Organs Repaired"
#define STATISTICS_SURGERY_ORGAN_ATTACH "Organs Implanted"// OOD
#define STATISTICS_SURGERY_ORGAN_REMOVE "Organs Harvested"// OOD

#define STATISTICS_DESTRUCTION_WALLS "Walls Destroyed"
#define STATISTICS_DESTRUCTION_DOORS "Doors Destroyed"
#define STATISTICS_DESTRUCTION_WINDOWS "Windows Destroyed"
14 changes: 0 additions & 14 deletions code/__DEFINES/stats.dm

This file was deleted.

11 changes: 7 additions & 4 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@
#define SS_INIT_TOPIC 83
#define SS_INIT_LOBBYART 82
#define SS_INIT_INFLUXDRIVER 28
// Do not break this braket
#define SS_INIT_DATABASE 27.9
#define SS_INIT_ENTITYMANAGER 27.8
#define SS_INIT_TICKER 27.7
#define SS_INIT_PREF_LOGGING 27.6
#define SS_INIT_PLAYTIME 27.5
// Do not break this braket
#define SS_INIT_GARBAGE 24
#define SS_INIT_EVENTS 23.5
#define SS_INIT_HIJACK 22.6
Expand Down Expand Up @@ -143,11 +150,7 @@
#define SS_INIT_UNSPECIFIED 0
#define SS_INIT_PREDSHIPS -19
#define SS_INIT_ASSETS -20
#define SS_INIT_TICKER -21
#define SS_INIT_VOTE -23
#define SS_INIT_DATABASE -27
#define SS_INIT_ENTITYMANAGER -28
#define SS_INIT_PLAYTIME -29
#define SS_INIT_STICKY -30
#define SS_INIT_OBJECTIVES -32
#define SS_INIT_MINIMAP -34
Expand Down
2 changes: 2 additions & 0 deletions code/_globalvars/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ GLOBAL_LIST_EMPTY(cached_maps)
GLOB.minimap_icons = base64_icons


GLOBAL_DATUM(round_statistics, /datum/entity/statistic_round)
GLOBAL_LIST_EMPTY_TYPED(player_entities, /datum/player_entity)

// Xeno stuff //
// Resin constructions parameters
Expand Down
2 changes: 1 addition & 1 deletion code/_globalvars/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ GLOBAL_VAR_INIT(perf_flags, NO_FLAGS)

GLOBAL_LIST_INIT(bitflags, list((1<<0), (1<<1), (1<<2), (1<<3), (1<<4), (1<<5), (1<<6), (1<<7), (1<<8), (1<<9), (1<<10), (1<<11), (1<<12), (1<<13), (1<<14), (1<<15), (1<<16), (1<<17), (1<<18), (1<<19), (1<<20), (1<<21), (1<<22), (1<<23)))

GLOBAL_VAR_INIT(master_mode, "Distress Signal")
GLOBAL_VAR_INIT(master_mode, MODE_NAME_DISTRESS_SIGNAL)

GLOBAL_VAR_INIT(timezoneOffset, 0)

Expand Down
12 changes: 9 additions & 3 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,17 @@
if("fire")
M.apply_damage(power,BURN)
to_chat(M, SPAN_WARNING("It burns!"))

if(user.faction == M.faction)
user.track_friendly_hit(initial(name))
user.track_friendly_damage(initial(name), M, power)
else
user.track_hit(initial(name))
user.track_damage(initial(name), M, power)

if(power > 5)
M.last_damage_data = create_cause_data(initial(name), user)
user.track_hit(initial(name))
if(user.faction == M.faction)
user.track_friendly_fire(initial(name))

M.updatehealth()
else
var/mob/living/carbon/human/H = M
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/configuration/entries/general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ Voting

// Gamemode to auto-switch to at the start of the round
/datum/config_entry/string/gamemode_default
config_entry_value = "Extended"
config_entry_value = MODE_NAME_EXTENDED

/datum/config_entry/number/rounds_until_hard_restart
config_entry_value = -1 // -1 is disabled by default, 0 is every round, x is after so many rounds
Expand Down
3 changes: 2 additions & 1 deletion code/controllers/subsystem/influxstats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ SUBSYSTEM_DEF(influxstats)
SSinfluxdriver.enqueue_stats("burst_larva", list("hive" = hive.reporting_id), list("count" = burst_larvas))

/datum/controller/subsystem/influxstats/proc/run_round_statistics()
var/datum/entity/statistic/round/stats = SSticker?.mode?.round_stats
var/datum/entity/statistic_round/stats = GLOB.round_statistics
if(!stats)
return // Sadge

SSinfluxdriver.enqueue_stats_crude("chestbursts", stats.total_larva_burst)
SSinfluxdriver.enqueue_stats_crude("hugged", stats.total_huggers_applied)
SSinfluxdriver.enqueue_stats_crude("friendlyfire", stats.total_friendly_fire_instances)
SSinfluxdriver.enqueue_stats_crude("friendlykills", stats.total_friendly_kills)

var/list/participants = flatten_entity_list(stats.participants)
if(length(participants))
Expand Down
29 changes: 16 additions & 13 deletions code/controllers/subsystem/perf_logging.dm
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#define WAIT_SSPERFLOGGING_READY while(!SSperf_logging.round) {stoplag();}

SUBSYSTEM_DEF(perf_logging)
name = "Perf Logging"
wait = 60 SECONDS
flags = SS_NO_INIT | SS_KEEP_TIMING
init_order = SS_INIT_PREF_LOGGING
flags = SS_KEEP_TIMING
priority = SS_PRIORITY_PERFLOGGING
var/datum/entity/mc_round/round
var/list/datum/entity/mc_controller/controller_assoc = list()
var/list/datum/controller/subsystem/currentrun
var/ord = 0 // Amount of measurements
var/tcost = 0 // Total cost for current tick

/datum/controller/subsystem/perf_logging/Initialize(timeofday)
start_logging()
return SS_INIT_SUCCESS

/datum/controller/subsystem/perf_logging/fire(resumed = FALSE)
if(SSticker?.current_state < GAME_STATE_PLAYING)
return // Not started yet
if(!SSentity_manager?.ready)
return // DB not ready
if(!round) // Init
start_logging()
return
if(!resumed)
ord++
tcost = 0
Expand All @@ -26,8 +26,8 @@ SUBSYSTEM_DEF(perf_logging)
if(SS?.cost > 0.1)
currentrun += SS

while(length(currentrun))
var/datum/controller/subsystem/SS = currentrun[length(currentrun)]
while(currentrun.len)
var/datum/controller/subsystem/SS = currentrun[currentrun.len]
currentrun.len--
var/datum/entity/mc_controller/C = controller_assoc[SS.type]
new_record(SS, C)
Expand All @@ -39,15 +39,18 @@ SUBSYSTEM_DEF(perf_logging)
/// Setup to begin performance logging when game starts
/datum/controller/subsystem/perf_logging/proc/start_logging()
SHOULD_NOT_SLEEP(TRUE)
var/datum/map_config/ground = SSmapping.configs[GROUND_MAP]
if(!ground) return
var/datum/map_config/ground = SSmapping.configs?[GROUND_MAP]
if(!ground)
return
ord = 0
round = SSentity_manager.round
round.map_name = ground.map_name
round.save()
var/datum/entity/mc_controller/C
for(var/datum/controller/subsystem/SS in Master.subsystems)
C = SSentity_manager.select_by_key(/datum/entity/mc_controller, "[SS.type]")
if(!C) continue
if(!C)
continue
C.wait_time = SS.wait
C.save()
controller_assoc[SS.type] = C
Expand Down
Loading
Loading