Add independent Rust engine, deterministic mod API and asset pipeline

This commit is contained in:
raptorreplica committed 2026-10-10 12:17:43 +11:00
1 parent f2cce6f51b
commit dbb1d4596b
53 files changed
+18314 -56

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
fn on_spawn(event, state, random) {
#{ commands: [], state: state }
}
fn on_tick(event, state, random) {
// on_tick may be queued on the same step as on_death; do not command a retired entity.
if event.health <= 0 { return #{ commands: [], state: state }; }
let sideways = if (event.tick / 24) % 2 == 0 { 1 } else { -1 };
#{ commands: [#{ op: "velocity", entity: event.entity, vx: sideways, vy: 1 }], state: state }
}
fn on_death(event, state, random) {
let destroyed = if state.contains("destroyed") { state.destroyed + 1 } else { 1 };
#{ commands: [#{ op: "objective", key: "aurora:destroyed", value: destroyed }],
state: #{ destroyed: destroyed } }
}