mirror of
https://github.com/TemujinCalidius/SurvivorCore.git
synced 2026-08-14 00:58:01 +00:00
feat(plugin): add Survival Stats admin Studio plugin (deltas-only, locked tuning)
A Studio dock widget that lets the experience owner tune the survival stats through a validated form instead of hand-editing Attributes on the SurvivalStatsConfig instance — the first slice of the Builder/Admin plugin (#11). The point is compatibility: edits are LOCKED against engine updates. StatAdmin (the pure, headlessly-testable logic layer) writes deltas only — it sets an attribute solely when the owner changes a field from the live engine default, and removes it on reset / edit-back-to-default. So unset fields keep following the (improvable) engine defaults across a SurvivorCore release, while explicit overrides live on the owner's instance, which the engine only ever seeds and never overwrites. Nothing tuned is lost; nothing left alone is frozen. Hard guardrail: the plugin can read/write only the seven owner-tunable fields (STUDIO_ATTR_MAP). A write() assert makes it impossible to ever set the engine-owned semantics Invert / DangerHigh — re-freezing the affliction fill-direction bug is structurally unreachable. Runtime-verified in Studio: every write path exercised (including rejected Invert/DangerHigh attempts) left zero banned attributes on the instance. - plugin/StatAdmin.luau — logic: roster, effective values, deltas-only writes - plugin/StatAdminUi.luau — the dock-widget form (per-field reset, override dots) - plugin/init.server.luau — toolbar/widget wiring + ChangeHistory undo steps - plugin.project.json — separate Rojo tree; build with --plugin to install - CI: stylua + a plugin-sourcemap luau-lsp pass + a plugin build - docs/admin-plugin.md + cross-links; fix stale Invert row in the no-code table Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
63b1bbd6fb
commit
4256edfd87
@@ -26,7 +26,7 @@ jobs:
|
||||
uses: CompeyDev/setup-rokit@v0.1.2
|
||||
|
||||
- name: StyLua (format check)
|
||||
run: stylua --check src demo assets
|
||||
run: stylua --check src demo assets plugin
|
||||
|
||||
- name: Selene (lint)
|
||||
run: selene .
|
||||
@@ -51,9 +51,20 @@ jobs:
|
||||
--ignore "ServerPackages/**" \
|
||||
src demo assets/client
|
||||
|
||||
# Prove both Rojo targets build: the drop-in engine model and the runnable demo place.
|
||||
# The Studio admin plugin is a separate Rojo tree (its requires resolve against its own
|
||||
# sourcemap, not the demo's), so analyze it with the plugin sourcemap.
|
||||
- name: Generate plugin sourcemap
|
||||
run: rojo sourcemap plugin.project.json --output plugin-sourcemap.json
|
||||
|
||||
- name: luau-lsp (plugin)
|
||||
run: luau-lsp analyze --sourcemap plugin-sourcemap.json --defs globalTypes.d.luau --no-strict-dm-types plugin
|
||||
|
||||
# Prove every Rojo target builds: the drop-in engine model, the demo place, the plugin.
|
||||
- name: Build engine model (default.project.json)
|
||||
run: rojo build default.project.json --output SurvivorCore.rbxm
|
||||
|
||||
- name: Build demo place (demo.project.json)
|
||||
run: rojo build demo.project.json --output demo.rbxl
|
||||
|
||||
- name: Build admin plugin (plugin.project.json)
|
||||
run: rojo build plugin.project.json --output SurvivorCoreStatAdmin.rbxm
|
||||
|
||||
Reference in New Issue
Block a user