From 1d31d2d8e056198929fbef2eaff3a397afbc6640 Mon Sep 17 00:00:00 2001 From: D4VID Date: Wed, 20 Aug 2025 20:54:24 +0200 Subject: [PATCH] Add mount builder --- logicworld-subassembly/src/lw.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/logicworld-subassembly/src/lw.rs b/logicworld-subassembly/src/lw.rs index aeecf9b..c337d3b 100644 --- a/logicworld-subassembly/src/lw.rs +++ b/logicworld-subassembly/src/lw.rs @@ -145,6 +145,7 @@ impl CircuitBoard { return custom_data; } } + pub struct Label<'a> { text: &'a str, color: Vec, @@ -225,6 +226,18 @@ impl<'a> Label<'a> { } } +pub struct Mount { + height: Int, +} +impl Mount { + pub fn new(height: Int) -> Self { + Self { height } + } + pub fn custom_data(&self) -> Vec { + return Vec::from(self.height.to_le_bytes()); + } +} + impl BinarySerializable for Vec { fn write_to(&self, writer: &mut W) -> io::Result<()> { writer.write_all(&(self.len() as Int).to_le_bytes())?;