Improved storyteller logging 2 (#3610)

## About The Pull Request

More storyteller logging data

## Changelog

None
This commit is contained in:
LT3
2025-04-23 11:39:08 -07:00
committed by GitHub
parent fd164732b0
commit ff8b3c2d2a
4 changed files with 13 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
///Returns an assoc list in plain english as a string
/proc/english_list_assoc(list/input)
var/output
for(var/item as anything in input)
output += "[item] = [input[item]] "
return trim_right(output)
@@ -376,6 +376,7 @@ SUBSYSTEM_DEF(gamemode)
if(storyteller_halted)
message_admins("WARNING: Didn't roll roundstart events (including antagonists) due to the storyteller being halted.")
return
log_dynamic("Initializing storyteller [storyteller.name] with the following multipliers! [english_list_assoc(storyteller.tag_multipliers)]")
while(TRUE)
if(!storyteller.handle_tracks())
break
@@ -104,7 +104,9 @@
if(event.can_spawn_event(player_pop))
valid_events[event] = event.calculated_weight
if(event.roundstart)
log_dynamic("[event] added to roundstart event pool with calculated weight [event.calculated_weight].")
log_dynamic("[event] added to roundstart event pool with calculated weight [event.calculated_weight] and tags [english_list(event.tags)].")
else if(event.roundstart)
log_dynamic("[event] did not meet inclusion criteria, skipped.")
///If we didn't get any events, remove the points inform admins and dont do anything
if(!length(valid_events))
message_admins("Storyteller failed to pick an event for track of [track].")
@@ -131,7 +133,7 @@
message_admins("Storyteller purchased and triggered [bought_event] event, on [track] track, for [total_cost] cost.")
log_admin("Storyteller purchased and triggered [bought_event] event, on [track] track, for [total_cost] cost.")
if(bought_event.roundstart)
log_dynamic("Roundstart event is [bought_event] based on weighted selection.")
log_dynamic("Storyteller selected roundstart event [bought_event] based on weighted selection!")
mode.TriggerEvent(bought_event)
else
mode.schedule_event(bought_event, (rand(3, 4) MINUTES), total_cost)
+1
View File
@@ -662,6 +662,7 @@
#include "code\__HELPERS\paths\sssp.dm"
#include "code\__HELPERS\sorts\helpers.dm"
#include "code\__HELPERS\sorts\sort_instance.dm"
#include "code\__HELPERS\~bubber_helpers\lists.dm"
#include "code\__HELPERS\~bubber_helpers\mobs.dm"
#include "code\__HELPERS\~bubber_helpers\virus.dm"
#include "code\__HELPERS\~skyrat_helpers\is_helpers.dm"