Docs · Engineering reference
Payphone (#247)
docs/features/payphone.mdEdit on GitHub
-
✅
LF_Payphone(prefabPrefabs/Comms/LF_Payphone.et, the base-game phone booth): one action per preset: report a crime, an emergency or someone suspicious (police), ring for a doctor (medic), ring for a cab (taxi; mechanic waits for a mechanic job). The coin comes from carried cash (m_iPayphoneCostinLF_ServiceCalls.conf), per-player and per-phone cooldowns apply, and nothing is charged when nobody is on duty. The call isLF_OnServiceCallon the bus;LF_ServiceCallDispatchturns a police call into a radio line to on-duty officers with the phone's place (LF_Dispatch.Receive), and the dispatch log shows it. Coin and dial-tone sounds play from the booth. Not done: free text, handset animation (the booth has no handset mesh). Placed in DebugWorld at the square, the fuel station, the hospital and the police station (#254), with a police dispatch board (Prefabs/Comms/LF_DispatchBoard_Police.et) beside the wanted board. -
✅ Fixed (#147): a player or payphone that had never called read as having called at time 0 (
map.Findleaves 0 in the out value when the key is missing), so every call in a server's first 60 s was refused with the cooldown.LF_Payphone.UseAtnow treats a missing entry as never used;comms/payphonecovers a first call at second 5. -
✅ A missed dial is cooled down (#2405, life review 2026-11-17). A call nobody on duty answers took no coin and stamped neither cooldown, so a player could redial every second (each dial built a call row, a bus event and log lines).
LF_Payphone.UseAtnow stamps a per-player-and-service miss time (MissKey,LF_EPayphoneResult.MISSED_COOLDOWN, the player cooldown's length, toastLF-Payphone_Cooldown); the check runs before the route lookup. It is per service so a missed medic call never blocks an emergency call to the police. Testcomms/payphone. -
✅ A carried radio set calls from anywhere (#3155).
LF_HandsetCallActionon a radio item (pack prefabLF_Everon1989/Prefabs/Items/Comms/LF_HandsetRadio.et, the vanilla R148 retuned to 46.0 MHz and up so it never reaches the police or medic duty frequencies; $250 at the general store) places the payphone's call from where the carrier stands: one action each for a cab, a doctor and the police.LF_HandsetCall.CallAtchecks the radio is in the caller's inventory, a per-player-and-service cooldown (m_iPlayerCooldownSeconds), the route (nobody on duty takes no fee), then takes the fee (m_iFeeon the action, 5) from carried cash only when the whole fee is there, and callsLF_ServiceCalls.Placewith the caller's position, so the board, pager and police dispatch see it like a payphone call. Server only; the client sends which action it picked. Testcomms/handset-call. -
🔧 A payphone on the main road (#3379, X15, merged, in-dev). The vanilla fuel station about 1.2 km south-east of the Saint-Philippe square (scouted as
roadfuel, the kiosk b02 beside the shop b01, 17 m from the N-S main road) gets anLF_Payphoneon its pavement for a broken-down driver, anLF_FuelDropbarrel at the kiosk's back corner (a far drop for the fuel delivery run, #3370) and afuel_stationpole sign. Placeroadfuel, templateroadfuel, kitroadfuel(sourcetools/town/kits/sources/roadfuel.layer), layerPlace_roadfuel_fuel.layer, kindRoadFuel, no map POI (poinone).audit placement --strictclean. The booth's own lamp budget is fixed by #3562 (next row). ⚠️ Not checked live: a walk-up call from this booth and a fuel run ending at this drop. -
🔧 The payphone passes the building light budget (#3562). The vanilla booth lamp (
PhoneBooth_E_01_Light, a spot light that leavesCastShadowunset, so in game a shadow caster) is overridden by ID inLF_Payphone.et(GameEntity 5F0B08C0B7BE37EE>LightEntity 5878F673B04BA318,CastShadow 0); the lamp still lights, it just casts no shadow map.tools/perf/building-count.mjsnow counts a block that repeats an inherited ID as the same entity with the later properties laid over, not a second one (that read the vanilla booth as two lights), sotown check roadfueland every payphone slot read one light withCastShadow 0. Selftestperf-building-selftest. The town check also accepts a second marker of a slot kind with id<place>.<slot>-<suffix>(the hostel safe circle, #3350), sotown check saint-philippehas 0 errors. ⚠️ Not checked live: the lamp at night beside a payphone. -
🔧 Five booths around Saint-Philippe (#3358, town draft; merged, in-dev). The
payphonesslot is fitted on the island withtools\cli town drops saint-philippe payphones: oneLF_Payphone.etper drop, back to the wall and front to the street, on the square (b06, the hostel row; the vanilla booth at 4406, 10653 stays alone), the fuel station kiosk (b97), the clinic (b39), the dock harbour master's cabin (dock b14) and the districts crossroads (b26, on its south side with"turn": 1, because its front wall is a porch the booth cannot stand against). LayerPlace_saint-philippe_payphones.layer, claimsaint-philippe-payphones.json(sizemedium: five lit booths are five lights, the small budget allows three). The drops tool takes the booth prop from itspayphoneskit name (DROP_KITS). Manual: in a session, a taxi call from the square booth logsLF_OnServiceCallwith the place, and the coin is taken. -
🧪 (2026-11-19, #3187) The radio set's call is proven from a dedicated-server client, from the hand.
handset-call-proof(node agent-box/session.mjs handset-call-proof): a client with no set is offered no call action; after the server grants the set and the client clocks in as a medic, the call action is not offered while the set is only carried in the inventory (the interaction and the harness use read actions off world entities, and an item inside a storage is not one), and is offered once the set is in the hand (hold). From the hand the call crosses to the server: the board pins a medic call at the client's position, cash drops by $5, and a second call inside the cooldown is refused and takes nothing. An inventory-only call would need a vanilla inventory context-action hook: filed as its own card. -
🔧 A payphone at a working farm (#3381, X16, merged, in-dev). The state farm yard on the Montignac road, 3.7 km south of the Saint-Philippe square (scouted as
roadfarmat x 5134, z 7044), gets its machine shed's (b03,Workshop_02_grey) far fuel drop (LF_FuelDrop, by the shed wall, #3370), anLF_Payphoneand a pole signroadfarm("Ferme des Silos", pack signLF_Signs_RoadFarm.conf, stringsLF-Sign_RoadFarm_*) where the paved yard meets the lane to the junction. Placeroadfarm, slota, templateroadfarm, kitroadfarm(sourcetools/town/kits/sources/roadfarm.layer), layerPlace_roadfarm_a.layer, kindRoadFarm, no map POI.audit placement --strictclean. ⚠️ Not checked live: a walk-up call from this booth and a fuel run ending at this drop; the sign face is blank in Workbench shots (#3075). -
🔧 Road Fuel drop seated on the ground, clear of the pumps (#3878).
Fit_roadfuel_fuel_fuel_drophovered 5.1 cm over the pavement and clipped the pump nozzle (FuelStation_E_01_tankpistol) on the kiosk forecourt.LF_FuelDropis a plainGenericEntitybarrel, so its layer y is a world height: it now stands at the kiosk back (west) corner on the grass, as the kit intends ("by its back corner"), y 21.313 from a terrain probe under its footprint, 0 cm over its support and clear of both pumps.LF_FuelDropbounds are intools/place/prefab-bounds.json.audit placement --world MainWorld --layer Place_roadfuel_fuel.layer --strictexits 0; the booth row keeps aclips GenericEntitywarning (a GenericEntity at the booth's own spot, the booth row from #3923, not touched here) and the per-booth roomcrowded/lanerow every payphone has. ⚠️ Not checked live: a fuel run ending at this drop. -
🔧 Road Farm fuel drop seated on the ground (#3878).
Fit_roadfarm_a_fuel_dropstood at world height 176.3 over terrain at 175.84 (hovered 46 cm by the shed wall).LF_FuelDropis a plainGenericEntitybarrel (not terrain-relative like the booth), so its layer y is a world height: reseated to 175.838 from a terrain probe under its footprint (tools/town/terrain.mjs, one boot), 0 cm over its support.Prefabs/Props/Roleplay/LF_FuelDrop.etis measured intools/place/prefab-bounds.json(0.67 x 1.01 x 0.67 m, base on the pivot).audit placement --world MainWorld --layer Place_roadfarm_a.layer --strictexits 0 with no finding on this layer. ⚠️ Not checked live: a fuel run ending at this drop.