legacy-bossmenu
Troubleshooting
Known gotchas and how to work around them.
Troubleshooting
No one can open the boss menu
- There is no player-facing
/bossmenucommand. Access is only via a placedox_targetzone, or theOpenBossMenuexport /legacy-bossmenu:openClientevent. - If
Config.SeedDefaultLocationsisfalseand no admin has placed a zone withConfig.AdminCommand(default/bossmenu_admin), there is genuinely no way in. - Check that the player's job grade (or
jobData.boss) is actually flagged as boss in your framework —IsBoss()'s fallback path depends entirely onFramework.GetJobGradeshavingisBossset correctly per grade.
Zone shape is a box instead of a sphere
Target.AddSphereZone is expected from legacy-lib. If it's missing (older legacy-lib build), the client falls back to Target.AddBoxZone with a console warning — update/restart legacy-lib.
Zones don't appear after a restart
The client only actively fetches the zone list once, after a hardcoded 2-second wait on resource start (legacy-bossmenu:listLocations). If legacy-lib or the server is slow, or resources start out of order, zones may not build initially — after that point, the client only relies on the legacy-bossmenu:locationsUpdated broadcast for updates.
Deposit/withdraw fails with banking_error
All money flows go through legacy-lib's Banking bridge (GetAccountMoney/AddAccountMoney/RemoveAccountMoney), not oxmysql directly. If you swap banking resources, confirm exports['legacy-lib']:Banking() actually resolves to a working bridge implementing these methods.
Charts and transfer are empty/unsupported
- Revenue/balance charts and the transactions list query
legacy_banking_transactionsdirectly — they are only populated whenlegacy-bankingis the active banking resource. Other bridges will show correct current balances (viaBanking.GetAccountMoney) but empty charts. legacy-bossmenu:transferrequiresBanking.SocietyTransfer, which is gated tolegacy-bankingspecifically. Withqb-banking,Renewed-Banking, etc., transfer will returntransfer_unsupportedeven though deposit/withdraw work fine.
Revenue/bills or banking flags stuck at 0/false
hasBilling and hasBanking are only evaluated once, 2 seconds after legacy-bossmenu starts, via GetResourceState. If legacy-billing or legacy-banking start after legacy-bossmenu, or restart later, these flags never re-evaluate — restart legacy-bossmenu itself to refresh them.
Per-employee bills/revenue always empty
This data queries the legacy_bills table directly and only runs if hasBilling is true — it's a hard dependency on legacy-billing's own schema, not an abstracted interface.
Duty hours / heatmap not populating
legacy_bossmenu_hours relies entirely on the client emitting legacy-bossmenu:dutyHeartbeat roughly every minute while on duty. If a custom duty-toggle script bypasses this event, hours and heatmap data will stay empty.
Locations table edits have no effect
Boss menu zones moved from the SQL table legacy_bossmenu_locations to data/locations.json (via legacy-lib's Store). The SQL table is only read once on first boot to migrate old data in, then left untouched — edit zones via the admin UI/callbacks (saveLocation/deleteLocation), not the database.
Re-seeding default locations doesn't work
Config.SeedDefaultLocations only seeds when there is both no existing data/locations.json content and nothing importable from the legacy SQL table. Deleting the JSON file alone isn't enough if old SQL rows still exist — clear both if you want a clean reset.
Re-running sql/schema.sql wipes data
The schema file DROP TABLE IF EXISTSs all three tables before recreating them. Re-running it on a live server wipes audit history, tracked hours, and any legacy zone rows. Back up first.
legacy_bossmenu_hours insert failures
The unq_emp_bucket unique key on (citizenid, job_name, bucket_date, bucket_hour) means writes must use INSERT ... ON DUPLICATE KEY UPDATE — plain inserts will fail once a bucket already exists.
Promote blocked unexpectedly
Promoting a target into a boss-flagged grade is blocked server-side unless the acting player is an admin (Config.AdminGroups/framework admin) — even if the actor is themselves a boss of that job. This cannot be bypassed from the UI.
legacy-bossmenu:listLocations has no auth check
Any client can call this callback and get the full zone list — this is expected behavior, not a bug, but worth knowing if zone data is sensitive.
Unstyled/transparent UI colors
The web UI's Tailwind config drives colors off CSS variables (--accent, --accent-dim, --accent-gradient) supplied at runtime by legacy-lib. If these aren't injected, the UI renders without proper accent colors — make sure legacy-lib is present and up to date.