Stage-10 editor-UX follow-up. The Script component's inspector section
now ends with a name field + "➕ New Script" button (Enter in the field
also submits): it writes a fresh .rhai from the tested template into
assets/scripts/ via create_script_file (sanitized stem, collisions
suffixed), registers it in the asset database, saves the manifest, and
assigns it to the component's `source` through the normal edit path —
so the assignment is one undoable SetFieldCmd. Disabled with a hint
while no project is open; failures land in the Console via the log.
GUI piece — needs an eye-check before promotion to main.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Groundwork for the Stage-10 editor-UX batch (file explorer, New Script
button), all pure logic proven by unit tests:
- `AssetDatabase::move_asset` / `move_folder` / `delete_asset`: perform
the disk operation and the uid-map update together, so renaming or
moving an asset (or a whole folder) keeps its uid and every saved
`AssetRef` resolving. Kinds re-classify from the new path; `..` and
existing destinations are refused via the new `AssetDbError` enum;
deleted uids are never reused.
- Editor `assets.rs`: `script_template` (compiles under the sandboxed
ScriptEngine — covered by a test), `sanitize_script_stem`, and
`create_script_file` which writes a collision-free
`assets/scripts/<stem>.rhai` and returns the relative path for
database registration.
- docs/assets.md: new "File operations" section + the missing Script
row in the typed-folder table.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rustc 1.97 promotes the float-literal type-fallback check on generic
`impl Into<f32>` arguments (rust#154024) to a denied lint, which breaks
the editor's `#![deny(warnings)]` build: every bare literal passed to
`egui::Stroke::new` now needs an explicit type. Suffix the eleven
affected literals with `_f32`; no behavior change.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Full project snapshot migrated to new Gitea remote without history:
engine, editor, physics, script, examples, tests, docs, and assets.
Relicensed from GPLv3 to MIT and updated repo URLs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>