|
228 | 228 | -- ============================================================================= |
229 | 229 |
|
230 | 230 | ---@class Log |
231 | | ----@field mod_path? string Path to the mod directory for log file storage |
232 | | ----@field current_run_file? string Path to the current run's log file |
233 | | ----@field pending_logs? table<string, PendingLog> Map of pending log entries awaiting conditions |
234 | | ----@field previous_game_state? G Game state before function call |
235 | | ----@field init fun(self: Log) Initializes the logger by setting up hooks |
236 | | ----@field write fun(self: Log, original_function: function, function_call: FunctionCall, ...) Writes a log entry to the JSONL file |
237 | | ----@field update fun(self: Log) Processes pending logs by checking completion conditions |
| 231 | +---@field mod_path string? Path to the mod directory for log file storage |
| 232 | +---@field current_run_file string? Path to the current run's log file |
| 233 | +---@field pending_logs table<string, PendingLog> Map of pending log entries awaiting conditions |
| 234 | +---@field game_state_before G Game state before function call |
| 235 | +---@field init fun() Initializes the logger by setting up hooks |
| 236 | +---@field write fun(log_entry: LogEntry) Writes a log entry to the JSONL file |
| 237 | +---@field update fun() Processes pending logs by checking completion conditions |
| 238 | +---@field schedule_write fun(function_call: FunctionCall) Schedules a log entry to be written when condition is met |
238 | 239 |
|
239 | 240 | ---@class PendingLog |
240 | 241 | ---@field log_entry table The log entry data to be written when condition is met |
|
245 | 246 | ---@field arguments table The parameters passed to the function |
246 | 247 |
|
247 | 248 | ---@class LogEntry |
248 | | ----@field timestamp_ms number Timestamp in milliseconds since epoch |
| 249 | +---@field timestamp_ms_before number Timestamp in milliseconds since epoch before function call |
| 250 | +---@field timestamp_ms_after number? Timestamp in milliseconds since epoch after function call |
249 | 251 | ---@field function FunctionCall Function call information |
250 | 252 | ---@field game_state_before G Game state before function call |
251 | | ----@field game_state_after G Game state after function call |
| 253 | +---@field game_state_after G? Game state after function call |
252 | 254 |
|
253 | 255 | -- ============================================================================= |
254 | 256 | -- Configuration Types (used in balatrobot.lua) |
|
0 commit comments