new layer model
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use rhai::{Dynamic, Engine, ImmutableString};
|
||||
use crate::api::board::BoardRef;
|
||||
use crate::script::Registerable;
|
||||
use crate::utils::{ErrorSink, RegistryValue};
|
||||
use crate::utils::{LogSink, RegistryValue};
|
||||
|
||||
/// The board's script registry, pushed into scope as the constant `Registry`.
|
||||
/// `get`/`set`/`get_or` methods let scripts read and write per-board key→value pairs
|
||||
@@ -11,7 +11,7 @@ use crate::utils::{ErrorSink, RegistryValue};
|
||||
pub struct Registry(pub BoardRef);
|
||||
|
||||
impl Registerable for Registry {
|
||||
fn register(engine: &mut Engine, _error_sink: ErrorSink) {
|
||||
fn register(engine: &mut Engine, _log_sink: LogSink) {
|
||||
engine.register_type_with_name::<Registry>("Registry");
|
||||
|
||||
// Registry.get(key) -> Dynamic — returns () if the key is absent.
|
||||
|
||||
Reference in New Issue
Block a user