Docs · Engineering reference
Lockers
docs/features/lockers.mdEdit on GitHub
LF_LockerRules — Feature/Lockers/LF_LockerRules.c
- ✅ Pure locker rules (2026-11-17, #2658):
CheckRent(one locker per character per site, price in hand),PaidUntil(a renewal stacks on unexpired time),LapseMoment(paid-until plus grace),StateAt(ACTIVE,GRACE,LAPSED),MoveToLostAndFound,CheckReclaim.rentPeriodDays 0never lapses. Proof:LF_Test_LockerRules(LOGIC). - ⚠️ No stored contents, renewal, reclaim or lapse sweep yet (later slices of #1038).
LF_LockerConfig — Feature/Lockers/LF_LockerConfig.c
- ✅ Owner section
lockersoverConfigs/Lockers/LF_Lockers.conf:rentPrice100,rentPeriodDays7,gracePeriodDays2,reclaimFee50,weightCapacity60 kg. A bad value keeps the shipped one;/configreloadre-reads it.
LF_LockerBank — Feature/Lockers/LF_LockerBank.c, LF_LockerBankComponent.c, LF_LockerRentAction.c
- ✅ Rent a locker at a locker bank (2026-11-18, #2659): "Rent a locker" on
Prefabs/Props/Lockers/LF_LockerBank.ettakesrentPricein cash and records{siteId, characterKey, paidUntil}. The server finds the bank from the character's position; refused out of reach, already renting at the site, or short of cash (nothing taken). Proof:LF_Test_LockerRent(WORLD). - ✅ Saved as the
lockerspayload (save v57); a pre-v57 save loads with nobody renting. Proof:LF_Test_LockerPersist(PERSISTENCE),tools\cli wt e2e. - 🧪 The Saint-Philippe bank holds one locker bank (2026-11-19, #3192): kit row
lf-locker-bankintools/town/kits/bank.json, site idsaint_philippe_bank, fitted intoPlace_saint-philippe_bank.layerin the ground-floor corridor. Needs a session check on the island (rent, store, rejoin, reopen). - 🧪 Pack rent (2026-11-19, #3192):
LF_LockerConfigreads pack overlays (the mission header'sm_aLF_ConfigOverlays); a rootLF_LockerConfigsets the fields it names, an out-of-range one is refused. Everon 1989 rents at 40 cash a week, reclaim 25 (LF_Lockers_Everon1989.conf). Proof:LF_Test_LockerPackOverlay(LOGIC).
LF_LockerStorageManagerComponent — Feature/Lockers/LF_LockerStorageManagerComponent.c, LF_LockerOpenAction.c, LF_LockerPlayerController.c
- 🧪 Open your own locker (2026-11-18, #2661): "Open your locker" on the bank. The server finds the bank from the
character's position and the renter from their own record key; a non-renter and an out-of-reach character are refused
with a toast and nothing is built. The contents are an
LF_StorageSnapshotRecord(owner = character key, slotlocker:<siteId>) in the existingcarriedpayload: no new save section. Each open builds a transient container (Prefabs/Props/Lockers/LF_LockerContents.et), fills it from the snapshot (LF_StorageSnapshot.Apply) and opens it on the renter's client only. A change recaptures the snapshot; close, disconnect, death, walking away (reach + 3 m) and every save point (CaptureAllOpen, one line in thecarriedpayload write) capture it before the container is deleted. Release also captures the renter's carried inventory in the same step, so an item that moved between them is in exactly one snapshot. Death clearscarried, neverlocker:<siteId>. The engine's access check (HandleAccessValidation) lets only the renter's own inventory touch an open locker. Weight capacity is 60 kg on the container prefab (the config'sweightCapacityis not read by the prefab yet). Logs[LFDebug:Lockers]. Proof:LF_Test_LockerRoundtrip,LF_Test_LockerIsolation(WORLD),tools\cli wt e2e(a stored handgun survives the restart). - 🧪 Opens on a dedicated client (2026-11-18, #3369): the server spawns the container and sends its
RplIdin the same call, so the client could resolve it before it streamed in and drop the open (9 of 9 opens on a dedicated server with one remote client, a listen host never saw it).LF_LockerPlayerControllernow retries the lookup 10 times, 100 ms apart, then gives up with the same warning; a newer open cancels a pending retry. Proof:node agent-box/session.mjs locker-open-proof(up--mission grid --clients 1, ten rent-and-open cycles at the bank in grid cellslice-3369): 0 dropped lines. - ⚠️ A snapshot is current at every capture, not marked "open" in the save: a crash between a change and the next capture loses that change, it never duplicates an item (the opener's carried inventory is captured with it). The lost-and-found sweep and reclaim are wave 2.
LF_LostAndFound — Feature/Lockers/LF_LostAndFound.c, LF_LostAndFoundBoxComponent.c, LF_LostAndFoundReclaimAction.c
- ✅ Lapse and reclaim (2026-11-19, #3457):
Prefabs/Props/Lockers/LF_LostAndFoundBox.etbeside a bank. A locker past paid-until plus grace is freed (LF_LockerBank.Free) and its contents move to the owner'slostfound:<siteId>snapshot (the existingcarriedpayload, no new section); a slow sweep armed by the first bank or box, the renter's visit to the box and their next open all run it. "Reclaim your things (fee)" takesreclaimFeeafter every check and moves every item to the owner's inventory or feet; a stranger gets nothing, short of the fee is refused, a second try finds nothing. Proof:LF_Test_LostAndFound,LF_Test_LockerLapseOnOpen(WORLD). - ⚠️ The prompt is hidden from non-owners on a listen host only; a dedicated client shows it and the server refuses with a toast. No box is placed in a world yet.