ludic/packages/ludic.wildlife/tests
Orkuncakilkaya fe2d2bacd7 ludic.base, ludic.wildlife, ludic.npc: fact records reused, not made per fact
wl_fact made a new WildFact per fact, about one a frame, and Ludic never gives one back. ludic.base's q_unheld(q, pool, out) lists the records a queue no longer holds: neither waiting nor handed out by its last drain, which is good until the next drain. ludic.wildlife and ludic.npc now keep a pool, hand out a free record, and make a new one only when every record is held. Taking a record writes the state, so wl_fact / np_fact and the few callers holding their state read-only take it mut. Tests: q_unheld's rules (an empty drain holds on, the safe side); 3000 prints drained frame by frame use at most 4 records; 500 arrivals drained turn by turn use at most 4. base 37, wildlife 27, npc 17; all packages 420.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-28 01:58:19 +03:00
..
fake merge lang/physics-senses: animals and people slide round still things, the aim's, photo's and animals' sight lines are one Jolt ray 2026-09-27 01:23:17 +03:00
climb_test.ludic ludic.wildlife: a climb is judged over half a metre ahead, not one frame's step 2026-09-27 23:52:49 +03:00
crowd_test.ludic ludic.base, ludic.wildlife, ludic.npc: fact records reused, not made per fact 2026-09-28 01:58:19 +03:00
lures_test.ludic 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 2026-09-27 00:51:03 +03:00
way_test.ludic ludic.wildlife (17.6): a fleeing or wary animal goes by the world's way 2026-09-27 22:31:07 +03:00
wildlife_test.ludic feat(ecs): wildlife_near / wildlife_near_of into the caller's list, wildlife_alive_of 2026-09-27 21:54:39 +03:00