Docs · Engineering reference
Notifications
docs/features/notifications.mdEdit on GitHub
LF_NotificationManagerComponent — Feature/Notifications/
-
✅ Server→client notification broadcast with toast renderer;
SendToPlayer/SendToJob/SendToAll+ staticNotifyPlayer/NotifyJob/NotifyAll. Before 2026-11-07 the toast layout{4C38FD68D45325D2}UI/Layouts/Notifications/EL_NotificationToast.layoutdid not exist, so every toast (fines, arrests, rank denials, lot, lock, jail) failed silently. It now exists: a paper slip in the UI kit palette with a stamp-ink type strip (Background,ColorStrip,Icon,Title,Message,LF_NotificationToastUIon the root). Slips that overlap in time stack downwards. Timing reads the real clock (System.GetTickCount), not an assumed 16 ms frame.notifications/toast-layout(WORLD) instantiates the layout on the dedicated server and checks every named widget;notifications/toast-timing(LOGIC) checks show/fade/remove. On-screen look is visual-only: manual check pending (verified 2026-11-07) -
✅ Toasts are visible on a game client (2026-11-08, #157): until now no toast was ever drawn. The slip's frame slot had a height of -48 (
OffsetBottom -92underOffsetTop 140), the fills werePanelWidgets (near-transparent) nested inside anImageWidget(which draws no children), and the text column's negative stretch offsets ran the message past the slip. Now: 420x120 slip, sibling image fills, wrapped message, fade driven fromTick(LF_NotificationToastUI.OpacityAt). Seen at 1280x720 on a dedicated client (contraband refusal). Newtools/validation/validate-layout-slots.mjsfails a point-anchored slot whoseOffset*andSize*disagree (it also fixedEL_SurvivalHUD.layout). -
✅ Targeted delivery fixed (verified 2026-08-30):
RpcDo_ShowNotificationisRplRcver.Broadcastwith a client-sideplayerIdfilter (-1= all), plus a direct call for the listen-server host so the authority sees its own toast.SendToJobduty semantics now read the account'sIsOnDuty(), not ajob != UNEMPLOYEDtautology. -
✅ Private targeted delivery (verified 2026-11-07: dedicated/* tests, server side; client receipt is manual):
SendToPlayersends an Owner RPC on the target'sSCR_PlayerController(LF_DeliverNotification), so only that client receives it; the listen host's own controller calls the handler directly. Broadcast is left forSendToAllonly.SendToPolice/NotifyPolicereach connected on-duty police by account faction.LF_Utils.NotifyEntity(shop, robbery, duty, confiscate toasts) route through it;LF_Utils.Notifystill shows a hint on the calling machine only. Since 2026-11-08 the courier job (sign-up, paid, abandoned), gather/process rewards, weapon and vehicle robbery, and the contraband payout toast throughNotifyEntity; on a dedicated server they had reached nobody. enforce-lint L8 fails anLF_Utils.Notifyafter anif (!Replication.IsServer()) return;guard. -
⚠️ Hard-coded Spanish prefixes, emoji in logs,
m_Colornever transmitted. -
✅
LF_NotificationHold.Hold(true|false): a full-screen sheet (the personal file) puts every toast away while it is open; toasts made meanwhile wait hidden and show on release with their own remaining time. -
🧪 (2026-11-22, first-2h review B4) Step notes replace each other. A toast can carry a slot (
LF_Utils.NotifyEntity(..., slot), throughNotifyPlayer,LF_DeliverNotificationand the owner RPC). A new toast in a slot removes the one still showing there before it is created, so it stacks where the old one stood. The quest system's chain-step errand and the activity guide's step note useLF_NotificationManagerComponent.SLOT_STEP, so only the current step's note shows ("Take your car out" no longer sits under "Go to the mine" when the car step passes at once). -
🔧 Notes in one style (fix-hud-atm, 0.2.1, in-dev):
LF_Utils.Notifyand the newLF_Utils.NoteToastshow the cream note toast instead of the vanilla dark hint panel with an orange heading; the bus ticket, job-access, hire and licence messages use it too (the vanilla hint stays only as the fallback when the game mode has no notification manager). Review row C11.