Skip to content

v0.7.0 — in-game map voting + IP-keyed guest identity + upload/parser/config fixes

Latest

Choose a tag to compare

@ayozetr ayozetr released this 02 Jun 21:39

Follow-up release after v0.5.0, jumping straight to 0.7 at the operator's
request (no 0.6 intermediate). Headlined by in-game chat map voting
end-to-end (PanelBridge v4) and a guest-identity overhaul that keys
returning guests by IP so the same person stops spawning a fresh players
row on every relaunch — with an admin-only manual merge for the residual
duplicates. The rest is a batch of upload / parser / UI correctness fixes
surfaced by real mods on the live server: BeamNG character packs are no
longer badged as cars, vehicle mods carrying client-side Lua are no longer
mistagged as server plugins, and the malformed-info.json tolerance now
also recovers dropped commas between array elements. Rounded out by the
long-broken Server config page finally being editable again, a
warning-free i18n build, the sidebar credit centred, and the voting
feature documented end-to-end.

Added

  • In-game map voting end-to-end. Players run /vote map <name>,
    /vote yes / /vote no, /vote status, /vote cancel in BeamMP's
    chat. PanelBridge v4 handles the state machine (one active vote at a
    time, proposer auto-counts as yes, tally re-announced every 15 s)
    and on a passing quorum writes vote_result.json. The panel reads
    it, broadcasts a countdown via commands.json, then runs the same
    _doActivateMap(..., {autoRestart:true}) primitive the Maps page
    uses for manual activation. Plugin also broadcasts a periodic
    "tip: start a vote with /vote map" every suggestIntervalSec when
    no vote is in flight, listing the maps the operator allowed.
    Configurable from the Maps page (Votación de mapa en juego card):
    enabled toggle, duration, quorum %, min votes, countdown, suggestion
    interval, optional allowed-maps whitelist. Dashboard shows a live
    tally + countdown when a vote is open; admins get a Cancel button.
    New endpoints GET /api/maps/vote, PUT /api/maps/vote/config
    (admin), POST /api/maps/vote/cancel (admin). Voter identity uses
    the same stable-id scheme as players (bmp:<uid> / guest:<name> /
    …) so a guest can't double-vote and a player reconnecting on a
    different slot still maps to the same ballot. Full wire protocol +
    defaults documented in docs/live-state.md and docs/api.md.
  • /vote map with no name now lists the available maps. Running
    /vote map with no argument (or a name not on the allowed list) used
    to reply with a bare usage/error line, leaving the player to guess
    the exact name. Both replies now append "Available maps: "
    from a single allowedMapNames() helper (shared with the periodic
    tease); when the operator hasn't restricted the list, the line says
    any level is allowed instead of showing an empty list.
  • Guest players keyed by IP, with an admin-only manual merge. With
    BeamMP forum registration disabled everyone connects as a guest, and
    _stableIdFor was keying guests on BeamMP's guestXXXXXXX handle —
    which re-rolls on every game relaunch, so one person spawned a fresh
    players row each session (16 live rows were really 4 people / 4 IPs).
    identifiers.ip now wins right after the forum UID, so a returning
    guest collapses back onto one row (the bmp: branch still takes over
    automatically if registration ever returns). For the residual drift
    (two people behind one NAT, or an ISP rotating a dynamic IP) a new
    POST /api/players/merge (admin-only, irreversible, audit-logged)
    re-points player_events / player_nicknames / bans onto a chosen
    survivor, widens its first_seen/last_seen, drops the source rows
    and republishes bans — all in one transaction. The Players history
    table gains an admin-only "Fusionar" toggle with per-row checkboxes,
    a keep-which selector and a ConfirmModal.

Fixed

  • Vehicle mods with client-side Lua no longer mistagged as server
    plugins.
    The upload classifier flagged any main.lua at any
    depth as a BeamMP server plugin, which sent vehicle mods that ship
    a client-side script under vehicles/<X>/lua/main.lua
    (turbo / traction-control / scripted gimmicks — the Nissan 180
    RPS13 mod was the trigger) into the server-plugin extraction
    branch. That branch enforces a "single root folder" rule, so the
    upload was rejected with Server plugin archive must contain exactly one root folder. Found: art, ui, vehicles. Classifier now
    ignores main.lua files that live under the vehicles/ or
    levels/ subtrees, so client-side car / track scripts no longer
    derail the upload — the archive falls into the client-mod branch
    and is copied verbatim to Resources/Client/<name>.zip as
    intended.
  • BeamNG character packs are classified as their own kind, not
    "Coche".
    A character pack ships vehicles/<x>/info.json because the
    engine models the walking avatar as a vehicle, so the Mods page
    badged it "Coche" and the Cars catalogue would have listed it as a
    drivable car. _classifyClientMod now reads each
    vehicles/<x>/info.json's Type: "Characters" → new 'character'
    kind, anything else stays 'car' (stops at the first real car, so
    multi-car packs cost one read). enumerateCustomCars skips
    Type=="Characters" the same way, so the Mods badge and Cars
    catalogue stay aligned. Frontend gains a "Personajes"/"Characters"
    filter chip, badge label and an IconUsers palette.
  • The Server config page is editable again. Changing any field
    (MaxCars, Tags, Name…) reverted instantly and the Save bar never
    appeared, so saving was unreachable — which is why the live
    ServerConfig.toml still held all-default values. In
    useServerConfig the initial-load effect depended on reload, a
    useCallback over [toast, t] where t is a fresh
    window.AppI18n.t.bind() every render, so reload's identity
    changed each render, re-firing the effect → reload() → setDirty({})
    and wiping the operator's edit (plus an unbounded /api/config
    refetch loop). The effect now depends only on canEdit, so config
    loads once (and on permission flips) and dirty state survives until
    Save.
  • Malformed-info.json recovery now handles dropped commas between
    array elements
    , not just between property keys. 2K-Happogahara
    ships an info.json with two missing commas — one between
    "features" and "suitablefor" (the original Sadamine fix) and a
    second between two adjacent {} objects inside the spawnPoints
    array — so it parsed half the file then died at position 509, meta
    came back null and the catalogue card stayed on the SVG. The regex
    now matches any value-end token (string / } / ] / true /
    false / null / number) followed by whitespace+newline and a
    value-start token, so Happogahara parses to its 3 spawn points and
    picks up its quickrace/TH.jpg thumbnail. Sadamine still parses
    identically and Nordschleife (trailing-comma-only) is unchanged;
    parser-level fix, no frontend changes.
  • Removed 6 duplicate i18n keys (profile.copied, config.lang,
    config.lang_sub, pl.col.last, common.delete, common.refresh)
    that were each defined twice in en + es, triggering 12 esbuild
    duplicate-key warnings and silently dropping the earlier definition.
    Build is now warning-free; the only user-visible change is es
    common.refresh, which now resolves to the intended "Actualizar"
    instead of the stray "Refrescar".
  • Sidebar credit centred. The "Desarrollado por ayozetr" link in
    the sidebar footer is now horizontally centred (justifyContent: center on the flex anchor).

Docs

  • Voting documented end-to-end. docs/live-state.md gains the
    vote_config.json / vote_state.json / vote_result.json wire
    formats + a player-side chat-command table; docs/api.md documents
    the three /api/maps/vote* endpoints; the PanelBridge README bumps
    to v4 with an in-game voting commands table for operators.
  • ROADMAP Phase 1 ticked. The AC purge was long done but never
    checked off — verified each named symbol/file/regex returns zero
    hits in the tree, marked the section "(done)" and added
    forward-pointers (apiCars / SteamIDs / LiveMapCard) to the phases
    where their BeamMP replacements landed. Phase 8 also picked up the
    voting + classifier bullets.