wip(0.S2): migrate - a var nothing writes becomes a let; a state is keyed by its module, directory or program, so every program's plan agrees; paths normalized; program states named SceneDemoState / scene_demo_st; the LSP reads state, mut and entry/handler parameters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3eda72e8c2
commit
5ffe50ed02
463 changed files with 72045 additions and 67421 deletions
|
|
@ -27,13 +27,14 @@ export property WildFact {
|
|||
diet: int = 0
|
||||
}
|
||||
|
||||
var wl_facts: Queue<WildFact> = null
|
||||
|
||||
export function wildlife_facts(base_st: mut BaseState, wildlife_st: mut WildlifeState) -> Queue<WildFact> {
|
||||
if wildlife_st.wl_facts == null { wildlife_st.wl_facts = queue_new(base_st, "wildlife.facts") }
|
||||
return wildlife_st.wl_facts
|
||||
export function wildlife_facts() -> Queue<WildFact> {
|
||||
if wl_facts == null { wl_facts = queue_new("wildlife.facts") }
|
||||
return wl_facts
|
||||
}
|
||||
|
||||
function wl_fact(base_st: mut BaseState, wildlife_st: mut WildlifeState, what: int, a: WildAnimal) -> WildFact {
|
||||
function wl_fact(what: int, a: WildAnimal) -> WildFact {
|
||||
let f = new WildFact
|
||||
f.what = what
|
||||
f.key = a.key
|
||||
|
|
@ -44,6 +45,6 @@ function wl_fact(base_st: mut BaseState, wildlife_st: mut WildlifeState, what: i
|
|||
f.z = a.z
|
||||
f.yaw = a.yaw
|
||||
f.scale = a.scale
|
||||
q_push(base_st, wildlife_facts(base_st, wildlife_st), f)
|
||||
q_push(wildlife_facts(), f)
|
||||
return f
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue