Docs · Engineering reference
Hidden crime record (#270)
docs/features/hidden-crime-record.mdEdit on GitHub
- ✅
LF_CrimeRecord(Feature/Crime/LF_CrimeRecord.c) subscribes toLF_OnCrimeCommitted(EnsureSubscribed, game-mode start) and counts completed crimes per account uid and offence key, so one robbery counts once. An unpaid ticket is not counted. Server only, never replicated, no UI. Read withLF_CrimeRecord.Count(uid, offence)/Total(uid)(the fence #271 and serials #272 use these). Persisted as thecrimerecordpayload (save version 15). Testscrime/record,crime/record-persist. Crime paths wired to the event today: robbery, vehicle and weapon theft, break-in, hospital, murder; gas station and contraband run count once their success path reports throughLF_Dispatch.Report. - ✅ Fence (#271): an NPC (
Prefabs/Characters/Npcs/LF_Fence.et, DebugWorldFenceNpc) with anLF_ShopComponentset tom_bFence. EachLF_ShopItem.m_iMinCrimesis the completed crimes the buyer needs on the hidden record (LF_CrimeRecord.Total): drill 3, charge 5, keycard 8.LF_ShopComponent.BuyasksLF_FenceRules.Checkbefore any cash moves; a refusal logs[LFDebug:Fence] refused ...and prints#LF-Shop_RefuseNotTrustedon the order slip. Prices are the per-prefabShopPrices.confrules (m_Prefab, matched by GUID). Each sale publishesLF_OnFenceSale. Testcrime/fence-gate. - ✅ Fence serials (#272): each tool the fence sells carries an
LF_SerialComponent(Prefabs/Items/Fence/; saved with the item byLF_SerialComponentSerializer, readable through the Read serial action).LF_FenceSerialssubscribes toLF_OnFenceSale, stamps the delivered tools and books each serial to the buyer's account (server only).LF_FenceSerials.Identify(serial)/IdentifyItem(item)mark the buyer's wanted reports identified; the evidence locker (#269) calls it when it checks a bagged tool (not wired until #269 lands). Persisted as thefenceserialspayload (save version 16). Carried tools keep their serial across a restart (#470):LF_StorageSnapshotcaptures it per snapshot item and saves it as theitemserialspayload (save version 22), restored onto the re-spawned item on apply; a stale row is skipped and the item comes back unstamped. Testsinvestigation/serial,investigation/serial-persist,persist/carried-serial.