mindustry logic execution, map- and schematic- parsing and rendering
Diffstat (limited to 'lemu/src/memory.rs')
-rw-r--r--lemu/src/memory.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/lemu/src/memory.rs b/lemu/src/memory.rs
index ff99dc8..bd9ca52 100644
--- a/lemu/src/memory.rs
+++ b/lemu/src/memory.rs
@@ -35,6 +35,13 @@ impl LVar<'_> {
Self::String(_) => None,
}
}
+
+ pub const fn num_mut(&mut self) -> Option<&mut f64> {
+ match self {
+ LVar::Num(x) => Some(x),
+ LVar::String(_) => None,
+ }
+ }
}
#[derive(Clone, Copy)]