userDaniel Pcancel
branchrust_reboot/main/playerinventory_oncycle_optimcancel

8 Commits over 0 Days - ∞cph!

8 Days Ago
Bugfix: fix leaking onCycle items when calling Item::Remove - Consolidated onCycle callback cleanup to DoRemove - ItemManager::DoRemoves(bool) can now force remove all items - Added a unit test to validate the logc Tests: ran unit test, cooked meat on a campfire, ate it, cooked again - no exception
9 Days Ago
Buildfix: add SERVER guards Tests: none, trivial change
9 Days Ago
Bugfix: ItemCointainer loading items no longer throws due to stale itemsWithOnCycle Fixed by resetting itemsWithOnCycle before population Tests: unit tests
9 Days Ago
Update: add TestLoad that exposes a bug for caching onCycle Still not the one I'm looking for, but would bite eventually Tests: ran unit test - fails as expected
10 Days Ago
Update: add TestOnCycleStackables test to validate onCycle caching Weirdly it passes with no duplicate-key exceptions. Maybe the exception is just a symptom, gonna check elsewhere Tests: ran unit test
10 Days Ago
Merge: from main
21 Days Ago
Optim: ItemContainer.OnCycle now uses cached list of items with a callback - added a perf test of 300 containers with ~10% items with OnCycle callback Goes from 0.179 ms down to 0.074ms(-58%) for 300 player inventories. Real world server's invoke times are 0.97ms for 171 inventories, so might need to move it out of invokes later. Tests: ran unit test
21 Days Ago
Tests: add ItemContainer.TestOnCycle test Tests: ran unit tests