builtin scripts
This commit is contained in:
@@ -51,6 +51,11 @@ pub struct ObjectDef {
|
||||
/// Name of the Rhai script in [`Board::scripts`] that drives this object.
|
||||
/// `None` means this object has no script yet.
|
||||
pub script_name: Option<String>,
|
||||
/// Embedded built-in script source, set when a script-backed archetype (e.g. a
|
||||
/// `pusher_*`) is expanded into an object at load time (see
|
||||
/// [`crate::builtin_scripts`]). Takes precedence over [`script_name`](ObjectDef::script_name)
|
||||
/// and is not part of the map file (it is regenerated from the archetype on load).
|
||||
pub builtin_script: Option<&'static str>,
|
||||
/// Open-ended string labels for this object. Serialized as a TOML array;
|
||||
/// not subject to any rate limit — mutations take effect immediately after
|
||||
/// the frame's action queue is drained.
|
||||
@@ -88,6 +93,7 @@ impl ObjectDef {
|
||||
opaque: true,
|
||||
pushable: false,
|
||||
script_name: None,
|
||||
builtin_script: None,
|
||||
tags: HashSet::new(),
|
||||
name: None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user