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
|
|
@ -32,7 +32,7 @@ function wl_tick_one(wildlife_st: mut WildlifeState, a: WildAnimal, dt: float, g
|
|||
}
|
||||
|
||||
# the gait advanced by a copy the game moves itself (a guest's copy of the host's animal)
|
||||
export function wildlife_stride(wildlife_st: mut WildlifeState, a: WildAnimal, dt: float) -> void {
|
||||
export function wildlife_stride(wildlife_st: WildlifeState, a: WildAnimal, dt: float) -> void {
|
||||
var stride = 1.2 * a.scale
|
||||
if wl_sp(wildlife_st, a.sp).flies { stride = 0.6 }
|
||||
a.phase = (a.phase + a.speed * dt / stride * WL_TAU) % WL_TAU
|
||||
|
|
@ -48,7 +48,7 @@ export function wildlife_release(a: WildAnimal) -> void {
|
|||
}
|
||||
|
||||
# the animal a snare holds, by the snare's uid
|
||||
export function wildlife_in_snare(wildlife_st: mut WildlifeState, uid: int) -> WildAnimal {
|
||||
export function wildlife_in_snare(wildlife_st: WildlifeState, uid: int) -> WildAnimal {
|
||||
let all = wildlife_all(wildlife_st)
|
||||
for i in 0 .. len(all) {
|
||||
let a = all[i]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue