This commit is contained in:
2026-06-21 18:44:42 -05:00
parent d4b9278838
commit cbdaca4a90
8 changed files with 48 additions and 27 deletions
+5 -3
View File
@@ -55,9 +55,11 @@ pub(crate) fn archetype_script(arch: Archetype) -> Option<&'static str> {
}
}
/// Returns the embedded script implementing `arch` as an object, or `None` if the
/// archetype is a plain terrain cell. The one place script-backed archetypes are
/// declared.
/// Returns the synthetic `BUILTIN_*` compile-key for `arch`'s embedded script, or
/// `None` if the archetype is a plain terrain cell. [`Board::expand_builtin_archetypes`](crate::board::Board::expand_builtin_archetypes)
/// stores this as the expanded object's `script_name` so every instance of a
/// script-backed archetype shares one compiled AST (the source comes from
/// [`archetype_script`]).
pub(crate) fn archetype_script_key(arch: Archetype) -> Option<&'static str> {
match arch {
Archetype::Pusher(_) => Some("BUILTIN_pusher"),