Add an asset cache log that logs send assets (#43089)

This commit is contained in:
oranges
2019-03-17 11:31:07 +01:00
committed by AnturK
parent bf8ddd56bb
commit cde413db78
4 changed files with 8 additions and 0 deletions
+3
View File
@@ -66,6 +66,9 @@
if (CONFIG_GET(flag/log_virus))
WRITE_LOG(GLOB.world_virus_log, "VIRUS: [text]")
/proc/log_asset(text)
WRITE_LOG(GLOB.world_asset_log, "ASSET: [text]")
/proc/log_access(text)
if (CONFIG_GET(flag/log_access))
WRITE_LOG(GLOB.world_game_log, "ACCESS: [text]")
+2
View File
@@ -30,6 +30,8 @@ GLOBAL_VAR(world_mecha_log)
GLOBAL_PROTECT(world_mecha_log)
GLOBAL_VAR(world_virus_log)
GLOBAL_PROTECT(world_virus_log)
GLOBAL_VAR(world_asset_log)
GLOBAL_PROTECT(world_asset_log)
GLOBAL_LIST_EMPTY(bombers)
GLOBAL_PROTECT(bombers)
+1
View File
@@ -99,6 +99,7 @@ GLOBAL_VAR(restart_counter)
GLOB.world_game_log = "[GLOB.log_directory]/game.log"
GLOB.world_mecha_log = "[GLOB.log_directory]/mecha.log"
GLOB.world_virus_log = "[GLOB.log_directory]/virus.log"
GLOB.world_asset_log = "[GLOB.log_directory]/asset.log"
GLOB.world_attack_log = "[GLOB.log_directory]/attack.log"
GLOB.world_pda_log = "[GLOB.log_directory]/pda.log"
GLOB.world_telecomms_log = "[GLOB.log_directory]/telecomms.log"
+2
View File
@@ -44,6 +44,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
if(client.cache.Find(asset_name) || client.sending.Find(asset_name))
return 0
log_asset("Sending asset [asset_name] to client [client]")
client << browse_rsc(SSassets.cache[asset_name], asset_name)
if(!verify)
client.cache += asset_name
@@ -92,6 +93,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
to_chat(client, "Sending Resources...")
for(var/asset in unreceived)
if (asset in SSassets.cache)
log_asset("Sending asset [asset] to client [client]")
client << browse_rsc(SSassets.cache[asset], asset)
if(!verify) // Can't access the asset cache browser, rip.