fix(ludic.npc): the facts' records and the queue's lists made at their size at the start (64), so a frame with a new peak of facts makes nothing
The fence found np_fact_record making a record in five frames of every scenario: the pool grew to each new peak of facts held at once, and q_unheld's free list and the queue's two lists grew with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f74738a4e0
commit
7fdd6582be
4 changed files with 32 additions and 5 deletions
|
|
@ -102,7 +102,7 @@ program NpcWayTest {
|
|||
expect(p.phase > 100.0)
|
||||
}
|
||||
|
||||
test "an arrival a turn, drained each turn, makes a few fact records and then reuses them" (npc_st: mut NpcState, npc_tests_fake_st: mut NpcTestsFakeState, way_test_st: WayTestState) {
|
||||
test "an arrival a turn, drained each turn, makes no fact record past the ones made at the start" (npc_st: mut NpcState, npc_tests_fake_st: mut NpcTestsFakeState, way_test_st: WayTestState) {
|
||||
fk_setup(npc_st, npc_tests_fake_st)
|
||||
npc_tests_fake_st.fk_want = 1
|
||||
let p = npc_spawn(npc_st, NPCK_HIKER)
|
||||
|
|
@ -115,6 +115,6 @@ program NpcWayTest {
|
|||
for i in 0 .. len(fs) { if fs[i].what == NPC_F_ARRIVED { arrived += 1 } }
|
||||
}
|
||||
expect(arrived > 400)
|
||||
expect(npc_fact_records(npc_st) <= 4)
|
||||
expect_eq(npc_fact_records(npc_st), 64)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue