builtin macro

This commit is contained in:
2026-06-23 01:08:01 -05:00
parent a67f3fa8cf
commit 2e160d6c61
12 changed files with 237 additions and 237 deletions
+3 -3
View File
@@ -36,9 +36,9 @@ fn pusher_loads_as_a_tagged_scripted_solid_object() {
p.builtin_script.is_some(),
"carries the embedded pusher script"
);
// Expansion keys all pushers under one synthetic script name so they share a
// compiled AST; the source still comes from `builtin_script`.
assert_eq!(p.script_name.as_deref(), Some("BUILTIN_pusher"));
// Each alias gets its own compile-cache key (e.g. "BUILTIN_pusher_east") so the
// script can read direction from Me.has_tag("BUILTIN_pusher_east").
assert_eq!(p.script_name.as_deref(), Some("BUILTIN_pusher_east"));
assert!(!board.is_passable(0, 0), "pusher is solid");
}
+3 -3
View File
@@ -25,9 +25,9 @@ fn spinner_loads_as_a_tagged_scripted_solid_object() {
obj.builtin_script.is_some(),
"carries the embedded spinner script"
);
// Expansion keys all spinners under one synthetic script name so they share a
// compiled AST; the source still comes from `builtin_script`.
assert_eq!(obj.script_name.as_deref(), Some("BUILTIN_spinner"));
// Each alias gets its own compile-cache key (e.g. "BUILTIN_spinner_cw") so the
// script can read direction from Me.has_tag("BUILTIN_spinner_cw").
assert_eq!(obj.script_name.as_deref(), Some("BUILTIN_spinner_cw"));
assert!(!board.is_passable(0, 0), "spinner is solid");
}