refactor(packages): 0.R5 - a question no longer starts its state - 64 lazy starts ('if st.x == null { st.x = ... }' inside a getter) are the state's defaults, gear__ensure is gone, and ludic migrate state --tighten took mut off 208 package parameters: things_all, thing_find, gear_charge, gear_level, jobs_state and the rest read
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
54f5efb23f
commit
9862ec82e3
102 changed files with 320 additions and 351 deletions
|
|
@ -52,7 +52,7 @@ export state TelemetryState {
|
|||
telemetry__proc_t0: int = 0
|
||||
telemetry__rand_n: int = 0
|
||||
telemetry__clock_on: bool = false
|
||||
telemetry__cfg: TelemetryConfig = null
|
||||
telemetry__cfg: TelemetryConfig = new TelemetryConfig
|
||||
telemetry__ready: bool = false
|
||||
telemetry__id: string = ""
|
||||
telemetry__session: string = ""
|
||||
|
|
@ -64,15 +64,14 @@ export state TelemetryState {
|
|||
telemetry__saved_ms: int = 0 # when the queue was last put on disk
|
||||
telemetry__fails: int = 0 # sends failed in a row
|
||||
telemetry__t0: int = 0 # the default clock's zero, wall seconds
|
||||
telemetry__facts: Queue<TelemetryFact> = null
|
||||
telemetry__facts: Queue<TelemetryFact> = telemetry__facts__new()
|
||||
}
|
||||
|
||||
export function telemetry_facts(telemetry_st: mut TelemetryState) -> Queue<TelemetryFact> {
|
||||
if telemetry_st.telemetry__facts == null { telemetry_st.telemetry__facts = queue_new("telemetry.facts") }
|
||||
export function telemetry_facts(telemetry_st: TelemetryState) -> Queue<TelemetryFact> {
|
||||
return telemetry_st.telemetry__facts
|
||||
}
|
||||
|
||||
function telemetry__fact(telemetry_st: mut TelemetryState, what: int, count: int, status: int, retry: int) -> void {
|
||||
function telemetry__fact(telemetry_st: TelemetryState, what: int, count: int, status: int, retry: int) -> void {
|
||||
let f = new TelemetryFact
|
||||
f.what = what
|
||||
f.count = count
|
||||
|
|
@ -80,3 +79,4 @@ function telemetry__fact(telemetry_st: mut TelemetryState, what: int, count: int
|
|||
f.retry_ms = retry
|
||||
q_push(telemetry_facts(telemetry_st), f)
|
||||
}
|
||||
function telemetry__facts__new() -> Queue<TelemetryFact> { return queue_new("telemetry.facts") }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue