Repository navigation
Stop artifacts muffling for time in a player's hands, and drop finished station intents - #69
Conversation
…finished station intents An artifact at 0% muffle in a player's inventory never wrote its care clock, because nothing on its lore changed. Placing it on a pedestal or display then counted every hour since that stale clock as unhoused time, so artifacts carried overnight came out heavily muffled. Housed artifacts holding aura now re-anchor the clock once a minute, and a pedestal or display placement counts the time before it as housed. Station rows kept their deposit and charge intents (two full inventory snapshots each, 100-200 KB per row) for as long as the weapon stayed on the station, and every station click re-reads the whole file. A finished operation now drops its intent; interrupted ones still keep it as evidence when the row is held. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…y on clock anchors Breaking a pedestal or display, or punching an artifact out of an item frame, dropped it without a care tick, so the pickup charged its housed time as unhoused. Those paths now tick it as housed first. Any care write now also decays the elapsed aura time, so a clock anchor without a lore change no longer drops it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Housed artifacts with aura now write their clock every scaled minute, so a decay step under the old 0.0001 threshold would be lost each time. Any change in fill is saved. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Why
Two player reports from 2026-10-22: "all artifacts muffled overnight", and "the magic table still drops the server TPS dramatically".
Muffle. Muffle builds at
attunement.muffled.off_per_hour(1/24 per hour) while an artifact holding aura is unhoused, and recovers while it is housed. The care clock (care_last_tick) is only saved whenArtifactCareStore.applywrites.IF_VISIBLE. A housed artifact at 0% muffle has no lore change, because aura decay is 0 for every element, so its clock was never saved.apply(housed=false). That charged every hour since the stale clock, including the night in the player's inventory, as unhoused.inventory == null, unhoused) charged the housed time.Station. Main is quiet today:
gear-stations.ymlis 4 KB since #66 archived released rows, and no station write has happened since the 06:10 restart. The cost would come back, though:deposit-intentandcharge-intent, each holding two full base64 inventory snapshots (100–200 KB per row on Main), for as long as the weapon stays on the station;holdInterrupted/holdmark as held.What changes
activedeposit-intentkeptcharge-intentkeptExisting active rows lose their old intents the next time they are updated. Main's only live row today is a legacy row with no intents. The fsync of every parent folder on each station write is unchanged. On the host it measured ~9 ms per file sync, plus 0–50 ms for the folder chain.
Tests
ArtifactCareTest: housed anchor, decay on anchor, small decay steps.ArtifactListenerTest: housed pedestal add, furniture break.FrameCareTest: frame damage and break.GearEffectsTest: intent present while depositing or charging, gone once active, kept when held.mvn verifylocally: 718 tests. The only failures are the four known Windows-only tests (two case-spelling, two symlink; they also fail onmain). The run uses the usual local-only directory-fsync workaround, which is not committed. Every changed class is at 100% coverage; the only gaps are Windows-only (MagicProfileStore,GearFiles,GearPropertyStore).magic-DEV-20261022-muffle.jar, bots in~/muffle-intent-test):muffle.js: carried 10 h → 41.67% on 0.12.1, 0% with this change.chest.js: 10 h in a chest still gives 41.68%, as designed.station.js: on 0.12.1 the active row keepsdeposit-intentandcharge-intent(6.4 KB / 13.3 KB with the bot's near-empty inventory). With this change it has none (2.2 KB), andcharge-intentexists only while charging. Refunds and aborts are unchanged, with no held rows and no Magic errors in the log.Draft: not for merge or release yet.
🤖 Generated with Claude Code