NullSect
Systems nominal

Docs / Electrician / Changelog

Changelog

All notable changes to ns-electrician. The format follows Keep a Changelog and the version lives in fxmanifest.lua.

1.5.3

Fixed

  • Admin check: on servers where the ACE check answers 1 / 0 instead of true / false, real admins were refused (Qbox fallback and the standalone Config.Standalone.isAdmin). Only true or 1 counts as allowed now (Utils.AceAllowed). If you keep an edited config.lua without a framework, change isAdmin to return Utils.AceAllowed(src, 'admin').

Development

  • Offline test for the 1 / 0 ACE answer.

1.5.2

Fixed

  • The router refuses payloads with NaN / infinite numbers or nesting deeper than 8 levels (NaN passes every range check); Utils.Clamp maps NaN to the minimum.

Development

  • Offline server tests (lua5.4 tests/run_server.lua): router refusals, profile, shift, job board, accept / cancel, diagnosis probe range, admin permission, disconnect cleanup. Not shipped.

1.5.1 — security and lifecycle fixes

Fixed

  • Reflex minigames (voltage, multimeter, cable) and the minimum solve time of the puzzle minigames trusted the time reported by the client: a modified client could finish them instantly. The server now measures the time from challenge to submission itself.
  • Test jobs touched the career: they paid no money but still gave XP, reputation, job counters, tool wear and fired ns-electrician:hook:jobCompleted; cancelling or failing one cost reputation. Test jobs are now logged only (with the XP they would have earned).
  • /electest offers were not flagged as test jobs and paid real money. They are now test jobs like the recorder's Test call.
  • Restarting or stopping the resource counted every active job as abandoned (reputation penalty, failed log row). A resource stop now drops the job without a penalty; a disconnect is still penalised.
  • The deadline watchdog could expire a job while it was being paid (the payment waits on the database), which charged an expiry penalty on top of the payout; a second watchdog tick could also penalise the same expired job twice. A finished job is never ended a second time.
  • A database error while paying a job was treated as a duplicate completion: the player was flagged duplicate_completion. It now answers err_database, raises no security flag and logs the job uid, payout and XP so an admin can compensate it.
  • An error while settling a job could leave the finished job stuck on the player (no new job, no cancel). It is now closed and answered with err_internal.
  • The last step of a job (job:restore, the closing dlg:choose) answered success even when the payment failed; the error key now reaches the player.

Changed

  • Locale key ui_test_note reworded (EN + TR).

1.5.0 — realistic minigames

Changed

  • Every minigame is now drawn as the real hardware: an RAL 7035 enclosure frame with an engraved title plate, red fault lamps for the mistake allowance, an LED bargraph timer and a backlit status display.
    • Fuse box: NEOZED D02 bases on a DIN rail with colour-coded fuse indicators; the selected cap is unscrewed and installed with a green pushbutton.
    • Wiring: wires come out of a cable duct and are landed on a screw terminal block.
    • Circuit: 0/I selector switches with pilot lamps and legend plates.
    • Breakers: MCBs behind a dead-front cover with a hand-written circuit chart.
    • Voltage: analogue panel voltmeter (0–400 V) with an "in range" lamp.
    • Multimeter: handheld DMM with a segment LCD and bargraph.
    • Cable repair: the cable is cut, stripped, crimped and taped on screen; the timing track is a measuring tape.
  • The diagnosis tester is a handheld instrument with a reflective segment LCD.
  • Minigame code moved to nui/minigames.js / nui/minigames.css.
  • Locale keys: mg_breaker_no, mg_lamp_inrange, mg_lamp_readings, mg_lamp_hold added; mg_slot, mg_terminal, mg_terminal_rail removed; mg_multimeter_help and mg_fusebox_selected reworded (EN + TR).

Fixed

  • The breaker minigame title showed B%d / Ş%d: the per-breaker label used the same locale key as the title (mg_breaker); it is now mg_breaker_no.

1.4.0 — tablet item

Added

  • Config.Tablet (enabled, item): the service terminal is an inventory item (electrician_tablet). It is taken at the depot point (Take service tablet, RPC tablet:take) and opened by using the item. Starting a shift needs the tablet (err_no_tablet); clocking in / out happens on the tablet.
  • Locale keys err_no_tablet, err_tablet_owned, err_tablet_carry, target_take_tablet, notify_tablet_taken (EN + TR).

Changed

  • With the tablet item the depot point only hands out the tablet; the duty, job board and equipment bench targets are only used when Config.Tablet.enabled = false / standalone.

Removed

  • The F6 terminal keybind (Config.Keybinds.terminal, locale keys key_terminal, ui_key_terminal). Add the electrician_tablet item to your inventory (INSTALLATION §7).

Fixed

  • A finished, failed or cancelled job stayed on the player (HUD, blip, active page): the server now clears the client's job when it ends.
  • The job HUD flickered every second (its fade-in replayed on every update).

1.3.0 — prop scanner

Added

  • Scan mode in /eleclocations (Scan props button or /eleclocations scan): the real electrical boxes, street lights, traffic lights and transformers of the map around you are highlighted. E adds the nearest one, G toggles auto add (drive around, everything found is added), X / Backspace stops. Sites keep Config.Locations.scan.minSpacing between them.
  • Config.Locations.scan (radius, minSpacing, categories) and Data.PowerAreas: job classes and power system of a scanned site come from the server config, never from the client.
  • Teaching in scan mode: aim at any prop and press H to add its model to the category picked with ← / → (again to forget it). Stored as scanModels in data/locations.json.
  • New scan category breaker (breaker / fuse panels): business sites, so the manager waits at the panel. Starts without models — teach the panels of your map.
  • loc_scan_*, loc_cat_* and loc_teach_* locale keys (EN + TR).

Removed

  • All example sites in data/locations.lua (they did not match real props). data/locations.json was emptied as well — record your sites with the scanner.

1.2.0 — in-game job site recorder

Added

  • /eleclocations now opens a site panel (survey map + list): record, edit, move, remove, restore, teleport, GPS and test call per site, plus a world view and optional map blips. Nothing has to be edited in a file any more.
  • Recording snaps to electrical boxes: walk up to an electrical box prop and the work point is placed on it, heading facing you. Without a box nearby the spot you stand on is used. The prop models are listed in Config.Locations.boxModels.
  • Recorded sites are stored in data/locations.json (keep that file when updating). Changes are live immediately, no restart. Default sites can be switched off one by one or all at once with Config.Locations.useDefaults = false.
  • New Config.Locations block (useDefaults, file, viewRange, boxModels, boxSearchRadius).

Changed

  • The old coordinate printer (press G) is replaced by the panel. Locale keys admin_coords_copied and admin_locations_* are gone, loc_* keys were added (EN + TR).
  • The active job now carries heading and powerSystem, so recorded sites (which only exist on the server) restore power and place the customer correctly.
  • Test calls placed from the panel are flagged isTest: logged, never paid, not counted towards assignments.

1.1.1 — admin access without ACE

Changed

  • Admin commands (/eleclocations, /electest, /elecreset, /elecgrant) now rely purely on the framework's own admin check, so the server's existing admins can use them immediately. The ns-electrician.admin ACE and Config.Admin.useFrameworkAdmin are gone — the add_ace group.admin ns-electrician.admin allow line is no longer needed and can be removed.
  • Without a framework the check falls back to Config.Standalone.isAdmin, which now tests the server's own admin group instead of the removed resource ACE.

1.1.0 — field tablet interface

Added

  • NS-E7 field tablet replaces the flat service terminal: a rugged device with hazard bumpers, screws, status LEDs and an amber LCD strip, held in hand as a real prop with an animation while it is open. Nine pages — overview, job board, active work order, grid status, equipment, vehicle, assignments, statistics and settings.
  • Grid page — every power system with a live/isolated LED, so an electrician can see at a glance which feeders are down.
  • Settings page — interface volume and the job HUD, stored per player in the game's own key/value store (nothing goes to the server).
  • Interface sounds — relays, breakers, fuse seating, instrument beeps, sparks, mains hum, cutting/stripping/taping, stamps and thermal printing, all synthesized with WebAudio (no audio files, nothing to license).
  • Trade-specific presentation — work orders are paper tickets with perforation, pins and stamps; the active job shows its whole step list on the ticket; calls arrive as a torn-off pager slip; finished jobs print a thermal invoice; career progress is drawn as a copper cable filling up; daily assignments sit on a clipboard.
  • Instrument-style diagnosis panel — components are screw terminals on a rail with a DSEG7 reading window that beeps differently for a healthy and a dead component.
  • Re-skinned minigames — real fuse carriers, a terminal block with conductor colours, DIN-rail breakers, a ladder circuit and moving-coil meters.
  • Customer identity — every customer with a dialogue now has a name, shown on the service note and on the work order.
  • Level-up card and toast notifications for complications.

Changed

  • The NUI contract is now three callbacks (ready, close, action) with a registered action whitelist, instead of one callback per button.
  • Bundled fonts (Barlow, Barlow Condensed, IBM Plex Mono, Special Elite, DSEG7) ship with the resource; the interface no longer depends on system fonts.
  • ESC closes any screen, 1–9 pick dialogue lines.

1.0.0 — first release

Added

  • Job system with 13 call-out types — blown fuse, house fault, business outage, street light, distribution panel, broken cable, short circuit, generator, transformer, emergency outage, pole maintenance, meter inspection and line inspection. Every type is its own ordered list of steps (travel, talk, inspect, minigame, restore, report).
  • Fault diagnosis — the faulty component is drawn and kept server-side. The electrician has a limited number of measurements (more with a better multimeter), can earn a hint from the customer and finally names the component. Wrong calls cost quality, reputation and equipment.
  • Seven minigames — fuse box, wiring, circuit, breakers, voltage, multimeter and cable repair. Fuse box, wiring, circuit and breakers are verified against a solution only the server knows; voltage, multimeter and cable repair are score based and bounds-checked against the generated parameters and the elapsed time.
  • Customer system — NPC customers with data-driven dialogue: greeting, questions, hints, possibly wrong information and a closing report. Satisfaction feeds payment, XP and reputation.
  • Career and reputation — XP-based levels with configurable titles (Apprentice → Master Electrician) and a separate reputation score that gates business, industrial, emergency and VIP-grade work.
  • Equipment upgrades — multimeter, tool kit, repair kit and safety gear, three tiers each, with real effects on reading accuracy, extra measurements, mistake tolerance, minigame time, wear, finished quality and which job classes may be taken at all.
  • Tool condition — every job and every mistake wears the tools down; the depot bench services them for a fee.
  • Service vehicle — three upgradeable vans spawned at the depot, validated server-side, with a mobile toolbox that has to be taken from the back before a job can be accepted.
  • Power state — open jobs cut the power of their system; it is restored on the restore step and released again on cancel, timeout, disconnect and resource stop. Reference counted, and published through GlobalState, exports and the ns-electrician:hook:powerChanged event.
  • Random events — wrong information, a second fault, brittle wiring, tool damage, a re-trip, a customer in a hurry and jobs that turn out harder than advertised.
  • Daily assignments — three per player per day with money, XP and reputation rewards, claimed once through a conditional SQL update.
  • Own NUI — job HUD, dispatch card with accept/decline, service terminal (board, career, equipment, vehicle, assignments, statistics), diagnosis panel, minigame overlay, dialogue overlay and end-of-job summary. Local fonts only, no blur, ESC always closes safely.
  • Optional ns-hud integration — the active job is mirrored into a public widget and objective.
  • Framework bridge — Qbox, QBCore, ESX and a standalone adapter with your own money hooks. Optional bridges for notifications, targets, inventory, in-game time and HUD.
  • Admin tools — /eleclocations coordinate helper, /electest test calls (logged, never paid), /elecreset and /elecgrant, all behind ACE or framework admin and audited.
  • Localisation — complete English and Turkish files; every user-facing string, including the NUI, comes from the locale table.
  • Database — six tables with automatic migrations, retention purging and a UNIQUE job_uid on the job log that makes a double payout impossible, including after a restart.

Cart

Your cart is empty.