Skip to content

Merge Feature to dev#2

Merged
KudenikovNS merged 8 commits into
devfrom
feature
Mar 9, 2026
Merged

Merge Feature to dev#2
KudenikovNS merged 8 commits into
devfrom
feature

Conversation

@KudenikovNS
Copy link
Copy Markdown
Collaborator

No description provided.

z-hunter and others added 8 commits March 6, 2026 00:06
Implemented a first-pass text asset system for scenes and objects with runtime resolution and editor tooling.

Added support for text asset files under public/text for scenes and objects, plus a new TextAssetManager responsible for loading assets, resolving title/description fields, applying runtime text redirects, and duplicating/deleting/opening TA files.

Updated the scene editor properties panel so Title is read-only and sourced from the linked text asset. Added Create/Open/Sync/Delete TA actions, including backend file operations for creating, opening, reading, and deleting text asset files.

Integrated text assets into parser and runtime behavior:
- LOOK now resolves scene descriptions from scene TA
- LOOK object title resolves objects by TA title and prints TA description
- LOOK AROUND / LOOK HERE / LOOK SCENE resolve to the current scene description
- clicking visible scene objects with a TA title prints "You see <title>" instead of walking
- Subtrigger clicks resolve title from the forwarded target object

Adjusted click hit-testing so layer ordering is respected between entities and triggerboxes, and restored correct close-on-click-outside behavior for subscenes while preserving title detection inside subscenes.

Also unified command handling between closed and popup console modes so gameplay commands in the expanded console follow the parser path instead of being treated as console-only commands.

Included current scene file updates and added TextAssets.md documentation describing the chosen asset model and redirect rules.
Add a separate service text-asset layer under public/text/system for parser, engine and script strings, with dotted key lookup and placeholder interpolation via TextAssetManager.

Expose game.text(key, params?) as the base runtime access point for service TA and mirror it in ScriptAPI as api.text(key, params?) for script-side convenience. Keep api.log() as output-only, and document the distinction between lookup and output.

Implement runtime text redirect mutators on Scene and SceneObject so scripts can switch standard TA fields like description to alternate fields at runtime via scene.setTextRedirect()/clearTextRedirect() and entity.setTextRedirect()/clearTextRedirect().

Migrate the first set of hardcoded strings in Parser, ComponentSystem, SceneInteraction and DemoScripts to service TA lookups, including parser feedback, click titles, distance/lock messages and demo script narration.

Expand GDD scripting/API documentation into a coherent guide covering ScriptContext, game/api responsibilities, currentScene access, object lookup helpers, text redirects, entity and actor operations, and the distinction between script context and browser-console globals.
Remove .md from the lint-staged prettier rule so Husky no longer rewrites Markdown files during pre-commit. Keep JSON/CSS/SCSS formatting and TypeScript checks unchanged.
Only block movement when a clicked object actually handles activation or has a resolved title to show. Passive Static/Quad hits without TA titles no longer swallow mouse movement commands.
Resolve mouse-walk targeting for actors on non-1.0 parallax layers and keep click movement stable when 3d-parallax updates actor parallax during motion.

Mouse clicks now drive actors through a visual-space target that is re-projected each frame using the current parallax, while script-driven walkTo/moveTo remain world-space and backward compatible.
@KudenikovNS KudenikovNS merged commit 85f6613 into dev Mar 9, 2026
1 check passed
@KudenikovNS KudenikovNS deleted the feature branch March 9, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants