|
35 | 35 | ---@field stake? number The stake level (optional) |
36 | 36 | ---@field seed? string The seed for the run (optional) |
37 | 37 | ---@field challenge? string The challenge name (optional) |
| 38 | +---@field log_path? string The full file path for the run log (optional, must include .jsonl extension) |
38 | 39 |
|
39 | 40 | -- ============================================================================= |
40 | 41 | -- Game Action Argument Types (used in api.lua) |
|
226 | 227 | -- Log Types (used in log.lua) |
227 | 228 | -- ============================================================================= |
228 | 229 |
|
| 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 | + |
| 236 | +---@class PendingLog |
| 237 | +---@field log_entry table The log entry data to be written when condition is met |
| 238 | +---@field condition function Function that returns true when the log should be written |
| 239 | + |
| 240 | +---@class FunctionCall |
| 241 | +---@field name string The name of the function being called |
| 242 | +---@field arguments table The parameters passed to the function |
| 243 | + |
229 | 244 | ---@class LogEntry |
230 | 245 | ---@field timestamp_ms number Timestamp in milliseconds since epoch |
231 | | ----@field function {name: string, arguments: table} Function call information |
232 | | ----@field game_state G Game state at time of logging |
| 246 | +---@field function FunctionCall Function call information |
| 247 | +---@field game_state_before G Game state before function call |
| 248 | +---@field game_state_after G Game state after function call |
233 | 249 |
|
234 | 250 | -- ============================================================================= |
235 | 251 | -- Configuration Types (used in balatrobot.lua) |
|
0 commit comments