@neocompose/cli 0.50.10 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/neo.mjs +9451 -7315
- package/package.json +1 -1
- package/skills/neocompose-cli/SKILL.md +4 -3
- package/skills/neocompose-cli/references/animation-and-world-authoring.md +35 -1
- package/skills/neocompose-cli/references/cli-development.md +1 -1
- package/skills/neocompose-cli/references/commands-and-sync.md +6 -0
- package/skills/neocompose-cli/references/declarations-and-construction.md +4 -0
- package/skills/neocompose-cli/references/neoscript.md +6 -0
- package/skills/neocompose-cli/references/values-identities-and-references.md +6 -3
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
`@neocompose/cli` or `node cli/bin/neo.mjs` in the neo-compose repository.
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
<!-- reviewed-through-cli: 0.
|
|
12
|
+
<!-- reviewed-through-cli: 0.51.0 -->
|
|
13
13
|
|
|
14
14
|
# Neo Compose CLI
|
|
15
15
|
|
|
@@ -229,8 +229,9 @@ AudioClipRegistry AudioClips = new() {
|
|
|
229
229
|
Use `Images.Sword.Slice(0)` for a sprite and `AudioClips.SwordHit` for audio.
|
|
230
230
|
Registry declarations and their image/audio paths may be in any project folder
|
|
231
231
|
outside ignored/private directories. Update the registry path when moving a
|
|
232
|
-
binary file. Renaming the registry symbol or replacing bytes
|
|
233
|
-
|
|
232
|
+
binary file. Renaming the registry symbol or replacing bytes retains the file
|
|
233
|
+
ID when the declaration keeps its `@id`; keep the symbol aligned with the
|
|
234
|
+
persisted file name, or set `@settings(name: ...)` explicitly.
|
|
234
235
|
Omitting `@settings(template: ...)` uses the complete built-in Unity import
|
|
235
236
|
defaults for that file kind.
|
|
236
237
|
|
|
@@ -6,6 +6,7 @@ NeoFlow dialogue graphs.
|
|
|
6
6
|
## Contents
|
|
7
7
|
|
|
8
8
|
- World object contracts
|
|
9
|
+
- Cell patterns and grid queries
|
|
9
10
|
- Sorting and optional children
|
|
10
11
|
- Structured leaves
|
|
11
12
|
- Object variants and lookup folders
|
|
@@ -24,6 +25,37 @@ For world layer links, derive a concrete project class from
|
|
|
24
25
|
`targetLayer` relation. Do not add value-level target metadata or ask painting
|
|
25
26
|
operations to create/repair relation targets.
|
|
26
27
|
|
|
28
|
+
## Cell patterns and grid queries
|
|
29
|
+
|
|
30
|
+
`NeoCellPattern` stores an immutable ordered list of `Vector2Int` offsets.
|
|
31
|
+
Its constructor copies the input list and preserves duplicates. Use `Box`,
|
|
32
|
+
`Cross`, `Ring`, `Rect`, or `Line` for common shapes, and `Center`,
|
|
33
|
+
`FourNeighbors`, `EightNeighbors`, or `Empty` for presets. `Cells(origin)`
|
|
34
|
+
returns absolute cells in pattern order.
|
|
35
|
+
|
|
36
|
+
```neo
|
|
37
|
+
NeoCellPattern neighbors = NeoCellPattern.Box(1, excluding: .Center);
|
|
38
|
+
NeoCellPattern custom = new(offsets: [new(-1, 0), new(2, 1)]);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
On a placed `NeoObject`, `this.Cell` returns its grid cell.
|
|
42
|
+
`this.GetObjects<Plant>(neighbors)` returns matching placed objects in the
|
|
43
|
+
same grid, filtered to `Plant` and subclasses. `this.GetTile(neighbors)`
|
|
44
|
+
returns the first tile found in pattern order, or null. These queries track
|
|
45
|
+
empty cells as well as hits, so a getter updates when a new neighbor appears.
|
|
46
|
+
Calling them on an unplaced object is an error.
|
|
47
|
+
|
|
48
|
+
`WithCenter`, `WithoutCenter`, `Translate`, and `Union` return patterns.
|
|
49
|
+
`Union` removes duplicate offsets while preserving first occurrence order.
|
|
50
|
+
Box, Cross, and Line include the origin by default. Use `excluding: .Center`
|
|
51
|
+
to omit it. Line's `length` is the number of steps beyond the origin, so
|
|
52
|
+
`Line(new(1, 0), 3)` contains four cells.
|
|
53
|
+
|
|
54
|
+
The SDK uses the existing `NeoCellPattern` type and `GetCells(origin)` API.
|
|
55
|
+
Replace old boolean factory arguments with `NeoCellPatternExcluding.None`
|
|
56
|
+
or `.Center`. To retain Line's old default, pass
|
|
57
|
+
`excluding: NeoCellPatternExcluding.Center` explicitly.
|
|
58
|
+
|
|
27
59
|
## Tile placements
|
|
28
60
|
|
|
29
61
|
Use `@tile(VoidTile)` on a `NeoTileInstance` construction to select its tile
|
|
@@ -388,6 +420,8 @@ Require destinations for triggers, options, and outcomes. Permit terminal
|
|
|
388
420
|
text/actions to fall through. Keep all statements for
|
|
389
421
|
`Actions Empty = new();` inside its body.
|
|
390
422
|
|
|
391
|
-
After editing, run `neo dialogue dryrun <dialogue-ref>`.
|
|
423
|
+
After editing, run `neo dialogue dryrun <dialogue-ref>`. It prepares the local
|
|
424
|
+
project candidate, including new dialogues and pending schema or value changes,
|
|
425
|
+
without fetching or committing server content. Exit 1 means the graph
|
|
392
426
|
would fail on device. Keep every dialogue edit in the tracked `.neoflow` source
|
|
393
427
|
and commit it with `neo push`.
|
|
@@ -90,7 +90,7 @@ wrappers.
|
|
|
90
90
|
The marker near the top of `SKILL.md` must exactly match the package version:
|
|
91
91
|
|
|
92
92
|
```html
|
|
93
|
-
<!-- reviewed-through-cli: 0.
|
|
93
|
+
<!-- reviewed-through-cli: 0.51.0 -->
|
|
94
94
|
```
|
|
95
95
|
|
|
96
96
|
The quoted version above is checked too, so this instruction cannot go stale
|
|
@@ -39,6 +39,12 @@ records. If the remote head is unchanged, pull preserves the local source
|
|
|
39
39
|
without compiling it; use `neo status` to inspect local edits and diagnostics.
|
|
40
40
|
An undo/reset metadata change invalidates the cursor and causes a safe
|
|
41
41
|
full-snapshot fallback.
|
|
42
|
+
|
|
43
|
+
If a compiler upgrade rejects the cached snapshot, save local edits outside the
|
|
44
|
+
checkout, run `neo pull --force`, then reapply the edits. Normal pull cannot
|
|
45
|
+
merge against a snapshot whose compiler revision is no longer supported.
|
|
46
|
+
The force pull replaces local source with the server version.
|
|
47
|
+
|
|
42
48
|
Pull pins every page and snapshot batch to one published generation and logical
|
|
43
49
|
revision. If either changes during assembly, the CLI discards the attempt and
|
|
44
50
|
restarts. Upgrade the CLI together with the P83 server read protocol.
|
|
@@ -121,6 +121,10 @@ entry and its declared type is the entry type; `public Set<Config> Configs`
|
|
|
121
121
|
selects several. An initializer body for a single-select lookup returns one
|
|
122
122
|
entry, never a set.
|
|
123
123
|
|
|
124
|
+
The CLI also accepts `List<T>` with `selection: .Multi` on a member. Emitted
|
|
125
|
+
source uses `Set<T>`; constructor and function parameters must use `Set<T>`
|
|
126
|
+
to carry selection semantics.
|
|
127
|
+
|
|
124
128
|
Declare a multicast event as `NeoAction<…>`. Its value is an ordered listener
|
|
125
129
|
set, so give it a bracketed list of method groups — never a lambda, and never
|
|
126
130
|
a bare method group — and never mark it `required`: the rest state is the
|
|
@@ -64,6 +64,12 @@ Declare a bodyless NeoScript contract with `abstract`, for example
|
|
|
64
64
|
`public abstract bool Equals(Item other);`. Reserve `native` for host-provided
|
|
65
65
|
functions; concrete NeoScript overrides inherit the abstract signature.
|
|
66
66
|
|
|
67
|
+
Inside an override body, use `base.Member(args)` or `base.Property` to invoke
|
|
68
|
+
its nearest ancestor implementation. The ancestor receives the same `this`,
|
|
69
|
+
so ordinary virtual calls inside that implementation still reach the most
|
|
70
|
+
derived override. `base` outside an override or targeting an abstract member
|
|
71
|
+
is a compile error. Base constructors and stored-field reads are not supported.
|
|
72
|
+
|
|
67
73
|
Use the shared language service through focused commands:
|
|
68
74
|
|
|
69
75
|
```sh
|
|
@@ -214,9 +214,12 @@ creates a pending file with a provisional deterministic symbol. Status,
|
|
|
214
214
|
diff, and dry-run do not rewrite its registry. A successful push creates the
|
|
215
215
|
record, uploads verified bytes, and materializes its declaration and ID.
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
Registry symbols derive deterministically from the persisted file name. For
|
|
218
|
+
example, `tree.cherryblossom.png` becomes `TreeCherryblossom`. Keep an authored
|
|
219
|
+
declaration aligned with that spelling, or set an explicit persisted name such
|
|
220
|
+
as `@settings(name: "TreeCherryBlossom.png")` when the binary path should stay
|
|
221
|
+
different. With no template annotation, the CLI persists the complete built-in
|
|
222
|
+
Unity defaults for the file kind.
|
|
220
223
|
|
|
221
224
|
Pull/push compare server-verified SHA-256, not storage ETags. A divergent
|
|
222
225
|
binary keeps local bytes and writes the verified remote side under
|