no need for scriptstate any more

This commit is contained in:
2026-07-07 23:55:27 -05:00
parent 78823fcf96
commit 23b5bf2afb
18 changed files with 146 additions and 174 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
// A gem is a grabbable collectible: walking onto it (or pushing it into the
// player) fires this `grab()` hook instead of blocking. We bump the player's gem
// count and remove ourselves from the board.
fn grab(me, state) {
fn grab(me) {
add_gems(1);
die();
}
+1 -1
View File
@@ -2,7 +2,7 @@
//
// A heart is a grabbable collectible: walking onto it fires `grab()` instead
// of blocking. It restores 1 health and removes itself from the board.
fn grab(me, state) {
fn grab(me) {
alter_health(1);
die();
}
+1 -1
View File
@@ -3,7 +3,7 @@
// A gem is a grabbable collectible: walking onto it (or pushing it into the
// player) fires this `grab()` hook instead of blocking. We bump the player's gem
// count and remove ourselves from the board.
fn grab(me, state) {
fn grab(me) {
let colors = [
"red",
"orange",
+1 -1
View File
@@ -6,7 +6,7 @@
// pusher shares one compiled copy and learns its direction from the
// `BUILTIN_pusher_<dir>` tag the map loader attached to it.
fn tick(me, state, dt) {
fn tick(me, dt) {
// Only queue a step when idle. `move` shoves the chain ahead via step_object
// and is a no-op when blocked; the delay pads each step out to ~0.5s (move
// itself costs 0.25s), matching the old global pusher heartbeat.
+1 -1
View File
@@ -5,7 +5,7 @@
// engine and the script just hands it the ring. The spin direction comes from the
// `BUILTIN_spinner_*` tag the map loader attaches (it defaults to clockwise when no
// tag is present).
fn tick(me, state, dt) {
fn tick(me, dt) {
// Only start a new rotation when the previous one (and its delay) has drained,
// exactly like the built-in pusher's pacing.
if me.waiting { return; }