builtin macro
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user