Tidying pass on the KubeJS suite before plot system V1 lands. Sets up
the file structure + conventions + diagnostics so the larger plot
system has a clean foundation.
Changes:
1. NEW kubejs/README.md
File layout doc + conventions: logging prefix [bns/<module>],
persistent-data key naming (bns* prefix), one concern per file,
performance discipline (O(1) lookups, no polling).
2. Split economy_policy.js -> recipes_waystones.js + recipes_numismatics.js
Single-concern files. recipes_waystones removes ALL waystones
crafting (welcome.js distributes the only allowed waystone instead).
recipes_numismatics removes the 5 coin-denomination crafts.
3. NEW kubejs/server_scripts/bns_admin.js
/bns admin subcommands for OP diagnostics:
- info calling player's flags+counts
- waystone-count <player> read stored count
- waystone-set <player> <n> override stored count
- reset-welcome <player> clear bnsWelcomeGranted -- replays
the welcome grant on next login
Registered via ServerEvents.commandRegistry with Brigadier tree,
permission level 2 (OP). No performance cost (operator-triggered only).
4. Logging added to waystones_policy.js + welcome.js
Every action prints `[bns/<module>] ...` so server logs can be
filtered with `journalctl ... | grep '\[bns/'`.
Performance discipline applied:
- All event-handler lookups use Set.has (O(1)), not Array.includes
- No periodic tick polling anywhere
- No network calls in event handlers
- console.info is cheap (no string format unless logged)
Bumps to 0.20.0. Plot system V1 follows in v0.21.x as a separate
multi-file submodule under server_scripts/plots/.
Matt
merged commit 3cec2cb69b into main2026-05-23 15:40:00 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Tidying pass before plot V1: README, single-concern recipe files, /bns admin command suite, consistent logging. Pack 0.19.5 -> 0.20.0.
Tidying pass on the KubeJS suite before plot system V1 lands. Sets up the file structure + conventions + diagnostics so the larger plot system has a clean foundation. Changes: 1. NEW kubejs/README.md File layout doc + conventions: logging prefix [bns/<module>], persistent-data key naming (bns* prefix), one concern per file, performance discipline (O(1) lookups, no polling). 2. Split economy_policy.js -> recipes_waystones.js + recipes_numismatics.js Single-concern files. recipes_waystones removes ALL waystones crafting (welcome.js distributes the only allowed waystone instead). recipes_numismatics removes the 5 coin-denomination crafts. 3. NEW kubejs/server_scripts/bns_admin.js /bns admin subcommands for OP diagnostics: - info calling player's flags+counts - waystone-count <player> read stored count - waystone-set <player> <n> override stored count - reset-welcome <player> clear bnsWelcomeGranted -- replays the welcome grant on next login Registered via ServerEvents.commandRegistry with Brigadier tree, permission level 2 (OP). No performance cost (operator-triggered only). 4. Logging added to waystones_policy.js + welcome.js Every action prints `[bns/<module>] ...` so server logs can be filtered with `journalctl ... | grep '\[bns/'`. Performance discipline applied: - All event-handler lookups use Set.has (O(1)), not Array.includes - No periodic tick polling anywhere - No network calls in event handlers - console.info is cheap (no string format unless logged) Bumps to 0.20.0. Plot system V1 follows in v0.21.x as a separate multi-file submodule under server_scripts/plots/.