-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: remove handler property from archetype definition and update gravity zones in STAR archetype #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,8 +102,6 @@ export interface ArchetypeDef { | |
| // ── Rules (unified neighbor/spread/dissolve/spawn) ── | ||
| rules?: Rule[] | ||
|
|
||
| // ── Special handler (for truly unique complex behaviors) ── | ||
| handler?: string // Named handler for behaviors that can't be data-driven yet | ||
| isSpawner?: true // Mark as spawner (prevents chunk sleeping, used by orchestration) | ||
| } | ||
|
|
||
|
|
@@ -1111,9 +1109,9 @@ ARCHETYPES[STAR] = { | |
| matchers: [{ when: { kind: 'idIn', ids: [EMPTY] }, outcomeId: 0 }], | ||
| outcomes: [{ kind: 'transform', neighborInto: GLITTER, neighborChance: 0.4 }] | ||
| }, | ||
| // Life aura: transform materials at radius 3–15 | ||
| // Life aura: transform materials at radius 15–30 | ||
| { | ||
| chance: 0.04, sampler: { kind: 'ring', rMin: 3, rMax: 15, samples: 1 }, | ||
| chance: 0.04, sampler: { kind: 'ring', rMin: 15, rMax: 30, samples: 1 }, | ||
|
Comment on lines
+1112
to
+1114
|
||
| matchers: [ | ||
| { when: { kind: 'idIn', ids: [PLANT] }, outcomeId: 0 }, | ||
| { when: { kind: 'idIn', ids: [WATER] }, outcomeId: 1 }, | ||
|
|
@@ -1142,7 +1140,7 @@ ARCHETYPES[STAR] = { | |
| } | ||
|
|
||
| // Black hole: data-driven gravity pull via directionSwap rules. | ||
| // Graduated gravity zones (high/medium/low) replace the old named handler. | ||
| // Graduated gravity zones (high/medium/low) expressed as compiled rules. | ||
| // Adjacent particles are consumed; further particles are pulled inward. | ||
| const BH_PULLABLE: TargetPredicate = { | ||
| kind: 'and', ps: [ | ||
|
|
@@ -1593,7 +1591,7 @@ ARCHETYPES[PLANT] = { | |
| } | ||
|
|
||
| ARCHETYPES[SEED] = { | ||
| gravity: 1.0, density: 1, | ||
| gravity: 1.0, density: 3, | ||
| rules: [ | ||
| { | ||
| chance: 1.0, sampler: { kind: 'offsets', offsets: [[0, 1]] }, | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doc now states that all particles are fully defined by archetype data, but there is still hardcoded behavior in the physics pipeline (e.g. risingPhysicsSystem clears any non-empty particle at y===0). Please soften this claim ("almost all" / "particle behaviors are data-driven") or explicitly mention the remaining engine-level exceptions so the doc stays accurate.