feat(scripting): typed layer/skill constants + auto-derived kind; fix GameServer image build #212
No reviewers
Labels
No labels
alpha:wave-0
alpha:wave-1
alpha:wave-2
alpha:wave-3
area:assets
area:combat
area:ecology
area:infra
area:render
area:scripting
area:ui
area:world
enhancement
epic
migration
post-alpha
roadmap
tech-debt
type:bug
type:chore
type:design
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
marco/IsoMmo!212
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/scripting-dx"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two follow-ups on top of the just-merged inventory epic (#209/#211), bundled per request:
1.
fix(ci)— GameServer image build. The Dockerpublish --no-restorewas failing (IsoMmo.Scripting/obj/project.assets.json not found): the GameServer referencesIsoMmo.Scripting(#183) but the Dockerfile only copied the Shared + GameServer csproj into the cached restore layer. CopyIsoMmo.Scripting.csprojtoo. Verified by building the image locally (restore + publish now pass).2.
feat(scripting)— typed closed-vocabulary def fields + auto-derivedkind(DX). Establishes a rule and applies it:Messages.*.layer/skillon the weapon/item defs now readlayer = Layer.OneHanded,skill = Skill.Swordsmanship— LuaLS-autocompleted, drift-free (values reflected from the enum), and validated at load (an invalidskill/layeris a fatal diagnostic, not silently accepted).EquipLayer/SkillNamemoved toIsoMmo.Shared/Protocolso the scripting host can reflect them without referencingGameServer(layering gate intact; enum ordinals unchanged → no wire/save change, noProtocolVersionbump).kindis now optional onitem{}/weapon{}defs — it defaults to the FQN leaf lowercased (Items.Weapons.Bow→"bow"), with an explicit override still allowed; derived-kind collisions are caught. Removes the redundant hand-written line without touchingkind's wire/art/catalog/persistence role.src/IsoMmo.Scripting/CLAUDE.md(hard gate) + a## Design checklistbullet in the rootCLAUDE.md;docs/scripting.mdupdated (references the generated defs, doesn't mirror the enum values).api.d.luaregenerated.Screenshots / recording
N/A — no visible/runtime change. The Lua constants are an editor/build-time DX improvement; the CI fix is build-only.
How it was tested
just lint(CSharpier + analyzers) — 0 warnings;just test— all green (Scripting 32 incl. new host-rejects-invalid + kind-derivation + api-def assertions and the drift-check, GameServer 271, Client.Core 147, Auth 19, +others);just check-docsclean;just lua-lint(luacheck + lua-language-server) clean — the content type-checks against the generated---@enumdefs.src/IsoMmo.GameServer/Dockerfilelocally (context = repo root) — restore + publish succeed.Checklist
just lintpasses (zero warnings)just testis greene9cfd417ebb4ee644f62