From 7b6909a323613fd607d1c8ea49ccc0466af5b85e Mon Sep 17 00:00:00 2001 From: Rachel Powers <508861+Ryex@users.noreply.github.com> Date: Wed, 29 May 2024 20:08:16 -0700 Subject: [PATCH] refactor(vm, frontend): memory instructions, baseObject - parse and map meory instructions - use FrozenObjectFull to propogate data out of VM to componates (far less wasm calls) --- ic10emu/src/vm/object/templates.rs | 51 +- stationeers_data/src/database/prefab_map.rs | 3029 ++++++++++++++++- stationeers_data/src/templates.rs | 24 + www/data/database.json | 2811 ++++++++++++++- www/src/ts/utils.ts | 14 + www/src/ts/virtual_machine/base_device.ts | 289 +- .../ts/virtual_machine/device/add_device.ts | 4 +- www/src/ts/virtual_machine/device/card.ts | 153 +- .../ts/virtual_machine/device/device_list.ts | 8 +- www/src/ts/virtual_machine/device/fields.ts | 8 +- www/src/ts/virtual_machine/device/index.ts | 4 +- www/src/ts/virtual_machine/device/pins.ts | 41 +- www/src/ts/virtual_machine/device/slot.ts | 76 +- .../virtual_machine/device/slot_add_dialog.ts | 4 +- www/src/ts/virtual_machine/device/template.ts | 29 +- www/src/ts/virtual_machine/index.ts | 22 +- xtask/src/generate/database.rs | 77 +- 17 files changed, 6235 insertions(+), 409 deletions(-) diff --git a/ic10emu/src/vm/object/templates.rs b/ic10emu/src/vm/object/templates.rs index 16cbdd3..1328c53 100644 --- a/ic10emu/src/vm/object/templates.rs +++ b/ic10emu/src/vm/object/templates.rs @@ -1,7 +1,7 @@ -use std::{collections::BTreeMap, fmt::Display, rc::Rc, str::FromStr}; +use std::{collections::BTreeMap, rc::Rc, str::FromStr}; use crate::{ - errors::TemplateError, + errors::{ICError, TemplateError}, interpreter::ICInfo, network::Connection, vm::{ @@ -77,10 +77,13 @@ pub struct ObjectInfo { pub reagents: Option>, pub memory: Option>, pub logic_values: Option>, + pub slot_logic_values: Option>>, pub entity: Option, pub source_code: Option, + pub compile_errors: Option>, pub circuit: Option, pub socketed_ic: Option, + pub visible_devices: Option>, } impl From<&VMObject> for ObjectInfo { @@ -97,10 +100,13 @@ impl From<&VMObject> for ObjectInfo { reagents: None, memory: None, logic_values: None, + slot_logic_values: None, entity: None, source_code: None, + compile_errors: None, circuit: None, socketed_ic: None, + visible_devices: None, } } } @@ -125,10 +131,13 @@ impl ObjectInfo { reagents: None, memory: None, logic_values: None, + slot_logic_values: None, entity: None, source_code: None, + compile_errors: None, circuit: None, socketed_ic: None, + visible_devices: None, } } @@ -229,6 +238,8 @@ impl ObjectInfo { .collect(), ); } + let visible_devices = device.get_vm().visible_devices(*device.get_id()); + self.visible_devices.replace(visible_devices); self } @@ -254,6 +265,29 @@ impl ObjectInfo { }) .collect(), ); + let num_slots = logic.slots_count(); + if num_slots > 0 { + let slot_logic_values = (0..num_slots) + .map(|index| { + ( + index as u32, + LogicSlotType::iter() + .filter_map(|slt| { + if logic.can_slot_logic_read(slt, index as f64) { + Some(( + slt, + logic.get_slot_logic(slt, index as f64).unwrap_or(0.0), + )) + } else { + None + } + }) + .collect(), + ) + }) + .collect(); + self.slot_logic_values.replace(slot_logic_values); + } self } @@ -282,6 +316,10 @@ impl ObjectInfo { if !code.is_empty() { self.source_code.replace(code); } + let errors = source.get_compile_errors(); + if !errors.is_empty() { + self.compile_errors.replace(errors); + } self } @@ -868,15 +906,10 @@ impl FrozenObject { .get_template(Prefab::Hash(obj_ref.get_prefab().hash)) .map_or_else( || try_template_from_interfaces(&interfaces, obj), - |template| { - Ok(template) - }, + |template| Ok(template), )?; - Ok(FrozenObjectFull { - obj_info, - template, - }) + Ok(FrozenObjectFull { obj_info, template }) } pub fn freeze_object_sparse(obj: &VMObject, vm: &Rc) -> Result { diff --git a/stationeers_data/src/database/prefab_map.rs b/stationeers_data/src/database/prefab_map.rs index eb15523..415ad50 100644 --- a/stationeers_data/src/database/prefab_map.rs +++ b/stationeers_data/src/database/prefab_map.rs @@ -20460,31 +20460,353 @@ pub fn build_prefab_database() -> std::collections::BTreeMap< vec![ ("DeviceSetLock".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" - .into(), typ : "PrinterInstruction".into(), value : 6i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" + .into(), typ : "PrinterInstruction".into(), value : 6i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "LOCK_STATE".into(), typ : + InstructionPartType::Bool8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(48u32) }] .into_iter().collect() }), ("EjectAllReagents".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 8i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 8i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }), ("EjectReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "PrinterInstruction".into(), value : 7i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "PrinterInstruction".into(), value : 7i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "REAGENT_HASH".into(), typ : + InstructionPartType::Int32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }), ("ExecuteRecipe".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 2i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 2i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "PREFAB_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("JumpIfNextInvalid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 4i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 4i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("JumpToAddress".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 5i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 5i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("MissingRecipeReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 9i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 9i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((54u32, + Some(62u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY_CEIL".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "REAGENT_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("StackPointer".into(), Instruction { description : "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 1i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 1i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((63u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "INDEX".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("WaitUntilNextValid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 3i64 }) + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 3i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }) ] .into_iter() .collect(), @@ -21692,31 +22014,353 @@ pub fn build_prefab_database() -> std::collections::BTreeMap< vec![ ("DeviceSetLock".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" - .into(), typ : "PrinterInstruction".into(), value : 6i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" + .into(), typ : "PrinterInstruction".into(), value : 6i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "LOCK_STATE".into(), typ : + InstructionPartType::Bool8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(48u32) }] .into_iter().collect() }), ("EjectAllReagents".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 8i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 8i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }), ("EjectReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "PrinterInstruction".into(), value : 7i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "PrinterInstruction".into(), value : 7i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "REAGENT_HASH".into(), typ : + InstructionPartType::Int32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }), ("ExecuteRecipe".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 2i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 2i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "PREFAB_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("JumpIfNextInvalid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 4i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 4i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("JumpToAddress".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 5i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 5i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("MissingRecipeReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 9i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 9i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((54u32, + Some(62u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY_CEIL".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "REAGENT_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("StackPointer".into(), Instruction { description : "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 1i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 1i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((63u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "INDEX".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("WaitUntilNextValid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 3i64 }) + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 3i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }) ] .into_iter() .collect(), @@ -21952,31 +22596,353 @@ pub fn build_prefab_database() -> std::collections::BTreeMap< vec![ ("DeviceSetLock".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" - .into(), typ : "PrinterInstruction".into(), value : 6i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" + .into(), typ : "PrinterInstruction".into(), value : 6i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "LOCK_STATE".into(), typ : + InstructionPartType::Bool8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(48u32) }] .into_iter().collect() }), ("EjectAllReagents".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 8i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 8i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }), ("EjectReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "PrinterInstruction".into(), value : 7i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "PrinterInstruction".into(), value : 7i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "REAGENT_HASH".into(), typ : + InstructionPartType::Int32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }), ("ExecuteRecipe".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 2i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 2i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "PREFAB_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("JumpIfNextInvalid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 4i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 4i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("JumpToAddress".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 5i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 5i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("MissingRecipeReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 9i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 9i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((54u32, + Some(62u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY_CEIL".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "REAGENT_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("StackPointer".into(), Instruction { description : "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 1i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 1i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((63u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "INDEX".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("WaitUntilNextValid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 3i64 }) + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 3i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }) ] .into_iter() .collect(), @@ -29510,31 +30476,353 @@ pub fn build_prefab_database() -> std::collections::BTreeMap< vec![ ("DeviceSetLock".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" - .into(), typ : "PrinterInstruction".into(), value : 6i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" + .into(), typ : "PrinterInstruction".into(), value : 6i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "LOCK_STATE".into(), typ : + InstructionPartType::Bool8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(48u32) }] .into_iter().collect() }), ("EjectAllReagents".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 8i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 8i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }), ("EjectReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "PrinterInstruction".into(), value : 7i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "PrinterInstruction".into(), value : 7i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "REAGENT_HASH".into(), typ : + InstructionPartType::Int32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }), ("ExecuteRecipe".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 2i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 2i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "PREFAB_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("JumpIfNextInvalid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 4i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 4i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("JumpToAddress".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 5i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 5i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("MissingRecipeReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 9i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 9i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((54u32, + Some(62u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY_CEIL".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "REAGENT_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("StackPointer".into(), Instruction { description : "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 1i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 1i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((63u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "INDEX".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("WaitUntilNextValid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 3i64 }) + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 3i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }) ] .into_iter() .collect(), @@ -32726,31 +34014,353 @@ pub fn build_prefab_database() -> std::collections::BTreeMap< vec![ ("DeviceSetLock".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" - .into(), typ : "PrinterInstruction".into(), value : 6i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" + .into(), typ : "PrinterInstruction".into(), value : 6i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "LOCK_STATE".into(), typ : + InstructionPartType::Bool8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(48u32) }] .into_iter().collect() }), ("EjectAllReagents".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 8i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 8i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }), ("EjectReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "PrinterInstruction".into(), value : 7i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "PrinterInstruction".into(), value : 7i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "REAGENT_HASH".into(), typ : + InstructionPartType::Int32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }), ("ExecuteRecipe".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 2i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 2i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "PREFAB_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("JumpIfNextInvalid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 4i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 4i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("JumpToAddress".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 5i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 5i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("MissingRecipeReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 9i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 9i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((54u32, + Some(62u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY_CEIL".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "REAGENT_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("StackPointer".into(), Instruction { description : "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 1i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 1i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((63u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "INDEX".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("WaitUntilNextValid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 3i64 }) + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 3i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }) ] .into_iter() .collect(), @@ -36849,22 +38459,263 @@ pub fn build_prefab_database() -> std::collections::BTreeMap< vec![ ("FilterPrefabHashEquals".into(), Instruction { description : "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | PREFAB_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "SorterInstruction".into(), value : 1i64 }), + .into(), description_stripped : + "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | PREFAB_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "SorterInstruction".into(), value : 1i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "PREFAB_HASH".into(), typ : + InstructionPartType::Int32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }), ("FilterPrefabHashNotEquals".into(), Instruction { description : "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | PREFAB_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "SorterInstruction".into(), value : 2i64 }), + .into(), description_stripped : + "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | PREFAB_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "SorterInstruction".into(), value : 2i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "PREFAB_HASH".into(), typ : + InstructionPartType::Int32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }), ("FilterQuantityCompare".into(), Instruction { description : "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | QUANTITY | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |" - .into(), typ : "SorterInstruction".into(), value : 5i64 }), + .into(), description_stripped : + "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | QUANTITY | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |" + .into(), typ : "SorterInstruction".into(), value : 5i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "CONDITION_OPERATION".into(), + typ : InstructionPartType::Byte8 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 31u32)) + }, name : "QUANTITY".into(), typ : InstructionPartType::UShort16 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((32u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(32u32) }] .into_iter().collect() }), ("FilterSlotTypeCompare".into(), Instruction { description : "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | SLOT_TYPE | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |" - .into(), typ : "SorterInstruction".into(), value : 4i64 }), + .into(), description_stripped : + "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | SLOT_TYPE | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |" + .into(), typ : "SorterInstruction".into(), value : 4i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "CONDITION_OPERATION".into(), + typ : InstructionPartType::Byte8 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 31u32)) + }, name : "SLOT_TYPE".into(), typ : InstructionPartType::UShort16 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((32u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(32u32) }] .into_iter().collect() }), ("FilterSortingClassCompare".into(), Instruction { description : "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | SORTING_CLASS | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |" - .into(), typ : "SorterInstruction".into(), value : 3i64 }), + .into(), description_stripped : + "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | SORTING_CLASS | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |" + .into(), typ : "SorterInstruction".into(), value : 3i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "CONDITION_OPERATION".into(), + typ : InstructionPartType::Byte8 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 31u32)) + }, name : "SORTING_CLASS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((32u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(32u32) }] .into_iter().collect() }), ("LimitNextExecutionByCount".into(), Instruction { description : "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | COUNT | UINT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "SorterInstruction".into(), value : 6i64 }) + .into(), description_stripped : + "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | COUNT | UINT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "SorterInstruction".into(), value : 6i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "COUNT".into(), typ : + InstructionPartType::UInt32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }) ] .into_iter() .collect(), @@ -41203,7 +43054,61 @@ pub fn build_prefab_database() -> std::collections::BTreeMap< vec![ ("BodyOrientation".into(), Instruction { description : "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CELESTIAL_INDEX | BYTE_8 |\r\n| 16-31 | HORIZONTAL_DECI_DEGREES | SHORT_16 |\r\n| 32-47 | VERTICAL_DECI_DEGREES | SHORT_16 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "CelestialTracking".into(), value : 1i64 }) + .into(), description_stripped : + "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CELESTIAL_INDEX | BYTE_8 |\r\n| 16-31 | HORIZONTAL_DECI_DEGREES | SHORT_16 |\r\n| 32-47 | VERTICAL_DECI_DEGREES | SHORT_16 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "CelestialTracking".into(), value : 1i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "CELESTIAL_INDEX".into(), typ + : InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 31u32)) + }, name : "HORIZONTAL_DECI_DEGREES".into(), typ : + InstructionPartType::Short16 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((32u32, 47u32)) + }, name : "VERTICAL_DECI_DEGREES".into(), typ : + InstructionPartType::Short16 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((48u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }) ] .into_iter() .collect(), @@ -41704,31 +43609,353 @@ pub fn build_prefab_database() -> std::collections::BTreeMap< vec![ ("DeviceSetLock".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" - .into(), typ : "PrinterInstruction".into(), value : 6i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" + .into(), typ : "PrinterInstruction".into(), value : 6i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "LOCK_STATE".into(), typ : + InstructionPartType::Bool8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(48u32) }] .into_iter().collect() }), ("EjectAllReagents".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 8i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 8i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }), ("EjectReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "PrinterInstruction".into(), value : 7i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "PrinterInstruction".into(), value : 7i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "REAGENT_HASH".into(), typ : + InstructionPartType::Int32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }), ("ExecuteRecipe".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 2i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 2i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "PREFAB_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("JumpIfNextInvalid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 4i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 4i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("JumpToAddress".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 5i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 5i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("MissingRecipeReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 9i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 9i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((54u32, + Some(62u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY_CEIL".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "REAGENT_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("StackPointer".into(), Instruction { description : "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 1i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 1i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((63u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "INDEX".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("WaitUntilNextValid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 3i64 }) + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 3i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }) ] .into_iter() .collect(), @@ -42470,31 +44697,353 @@ pub fn build_prefab_database() -> std::collections::BTreeMap< vec![ ("DeviceSetLock".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" - .into(), typ : "PrinterInstruction".into(), value : 6i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" + .into(), typ : "PrinterInstruction".into(), value : 6i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "LOCK_STATE".into(), typ : + InstructionPartType::Bool8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(48u32) }] .into_iter().collect() }), ("EjectAllReagents".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 8i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 8i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }), ("EjectReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "PrinterInstruction".into(), value : 7i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "PrinterInstruction".into(), value : 7i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "REAGENT_HASH".into(), typ : + InstructionPartType::Int32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }), ("ExecuteRecipe".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 2i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 2i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "PREFAB_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("JumpIfNextInvalid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 4i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 4i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("JumpToAddress".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 5i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 5i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("MissingRecipeReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 9i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 9i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((54u32, + Some(62u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY_CEIL".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "REAGENT_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("StackPointer".into(), Instruction { description : "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 1i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 1i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((63u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "INDEX".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("WaitUntilNextValid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 3i64 }) + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 3i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }) ] .into_iter() .collect(), @@ -46611,31 +49160,353 @@ pub fn build_prefab_database() -> std::collections::BTreeMap< vec![ ("DeviceSetLock".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" - .into(), typ : "PrinterInstruction".into(), value : 6i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |" + .into(), typ : "PrinterInstruction".into(), value : 6i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "LOCK_STATE".into(), typ : + InstructionPartType::Bool8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(48u32) }] .into_iter().collect() }), ("EjectAllReagents".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 8i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 8i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }), ("EjectReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" - .into(), typ : "PrinterInstruction".into(), value : 7i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |" + .into(), typ : "PrinterInstruction".into(), value : 7i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 39u32)) }, name : "REAGENT_HASH".into(), typ : + InstructionPartType::Int32 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((40u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(24u32) }] .into_iter().collect() }), ("ExecuteRecipe".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 2i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 2i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "PREFAB_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("JumpIfNextInvalid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 4i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 4i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("JumpToAddress".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 5i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 5i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "STACK_ADDRESS".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("MissingRecipeReagent".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" - .into(), typ : "PrinterInstruction".into(), value : 9i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |" + .into(), typ : "PrinterInstruction".into(), value : 9i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((54u32, + Some(62u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 15u32)) }, name : "QUANTITY_CEIL".into(), typ : + InstructionPartType::Byte8 }, InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((16u32, 47u32)) + }, name : "REAGENT_HASH".into(), typ : InstructionPartType::Int32 + }, InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((48u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(16u32) }] .into_iter().collect() }), ("StackPointer".into(), Instruction { description : "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" - .into(), typ : "PrinterInstruction".into(), value : 1i64 }), + .into(), description_stripped : + "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |" + .into(), typ : "PrinterInstruction".into(), value : 1i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((63u32, None)) }, + parts : vec![InstructionPart { range : { trait FromTuple < T >: + Sized { fn from_tuple(tuple : T) -> Self; } impl < T > FromTuple + < (T, T,) > for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) + -> Self { [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, + T1,) > for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) + -> Self { tuple } } #[inline] fn convert < T0, T1, Out : + FromTuple < (T0, T1,) >> (tuple : (T0, T1,)) -> Out { + Out::from_tuple(tuple) } convert((0u32, 7u32)) }, name : + "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 23u32)) }, name : "INDEX".into(), typ : + InstructionPartType::UShort16 }, InstructionPart { range : { + trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; + } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((24u32, 63u32)) + }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(40u32) }] .into_iter().collect() }), ("WaitUntilNextValid".into(), Instruction { description : "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" - .into(), typ : "PrinterInstruction".into(), value : 3i64 }) + .into(), description_stripped : + "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |" + .into(), typ : "PrinterInstruction".into(), value : 3i64, valid : + { trait FromTuple < T >: Sized { fn from_tuple(tuple : T) -> + Self; } impl < T > FromTuple < (T, T,) > for [T; 2] { #[inline] + fn from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } + impl < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] + fn from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, + Some(53u32))) }, parts : vec![InstructionPart { range : { trait + FromTuple < T >: Sized { fn from_tuple(tuple : T) -> Self; } impl + < T > FromTuple < (T, T,) > for [T; 2] { #[inline] fn + from_tuple(tuple : (T, T,)) -> Self { [tuple.0, tuple.1] } } impl + < T0, T1 > FromTuple < (T0, T1,) > for (T0, T1,) { #[inline] fn + from_tuple(tuple : (T0, T1,)) -> Self { tuple } } #[inline] fn + convert < T0, T1, Out : FromTuple < (T0, T1,) >> (tuple : (T0, + T1,)) -> Out { Out::from_tuple(tuple) } convert((0u32, 7u32)) }, + name : "OP_CODE".into(), typ : InstructionPartType::Byte8 }, + InstructionPart { range : { trait FromTuple < T >: Sized { fn + from_tuple(tuple : T) -> Self; } impl < T > FromTuple < (T, T,) > + for [T; 2] { #[inline] fn from_tuple(tuple : (T, T,)) -> Self { + [tuple.0, tuple.1] } } impl < T0, T1 > FromTuple < (T0, T1,) > + for (T0, T1,) { #[inline] fn from_tuple(tuple : (T0, T1,)) -> + Self { tuple } } #[inline] fn convert < T0, T1, Out : FromTuple < + (T0, T1,) >> (tuple : (T0, T1,)) -> Out { Out::from_tuple(tuple) + } convert((8u32, 63u32)) }, name : "UNUSED".into(), typ : + InstructionPartType::Unused(56u32) }] .into_iter().collect() }) ] .into_iter() .collect(), diff --git a/stationeers_data/src/templates.rs b/stationeers_data/src/templates.rs index b079e9d..2c60da7 100644 --- a/stationeers_data/src/templates.rs +++ b/stationeers_data/src/templates.rs @@ -291,12 +291,36 @@ pub struct StructureInfo { pub small_grid: bool, } +#[derive(Clone, Debug, PartialEq, PartialOrd, Eq, Ord, Hash, Serialize, Deserialize)] +#[cfg_attr(feature = "tsify", derive(Tsify), tsify(into_wasm_abi, from_wasm_abi))] +pub enum InstructionPartType { + Bool8, + Byte8, + Int32, + UInt32, + Short16, + UShort16, + Unused(u32), + Unknown(String), +} + +#[derive(Clone, Debug, PartialEq, PartialOrd, Eq, Ord, Hash, Serialize, Deserialize)] +#[cfg_attr(feature = "tsify", derive(Tsify), tsify(into_wasm_abi, from_wasm_abi))] +pub struct InstructionPart { + pub range: (u32, u32), + pub name: String, + pub typ: InstructionPartType, +} + #[derive(Clone, Debug, PartialEq, PartialOrd, Eq, Ord, Hash, Serialize, Deserialize)] #[cfg_attr(feature = "tsify", derive(Tsify), tsify(into_wasm_abi, from_wasm_abi))] pub struct Instruction { pub description: String, + pub description_stripped: String, pub typ: String, pub value: i64, + pub valid: (u32, Option), + pub parts: Vec, } #[derive(Clone, Debug, PartialEq, PartialOrd, Serialize, Deserialize)] diff --git a/www/data/database.json b/www/data/database.json index 3cf93e7..7c9fb13 100644 --- a/www/data/database.json +++ b/www/data/database.json @@ -6212,8 +6212,7 @@ "hygine_reduction_multiplier": 1.5, "waste_max_pressure": 4053.0 }, - "memory": { - "instructions": null, + "memory": {, "memory_access": "ReadWrite", "memory_size": 0 } @@ -6493,8 +6492,7 @@ "circuit_holder": false }, "slots": [], - "memory": { - "instructions": null, + "memory": {, "memory_access": "ReadWrite", "memory_size": 512 } @@ -16637,48 +16635,345 @@ "instructions": { "DeviceSetLock": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", "typ": "PrinterInstruction", - "value": 6 + "value": 6, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "LOCK_STATE", + "typ": "Bool8" + }, + { + "range": [ + 16, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 48 + } + } + ] }, "EjectAllReagents": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 8 + "value": 8, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] }, "EjectReagent": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "PrinterInstruction", - "value": 7 + "value": 7, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] }, "ExecuteRecipe": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 2 + "value": 2, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "PREFAB_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "JumpIfNextInvalid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 4 + "value": 4, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "JumpToAddress": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 5 + "value": 5, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "MissingRecipeReagent": { "description": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 9 + "value": 9, + "valid": [ + 54, + 62 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY_CEIL", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "StackPointer": { "description": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 1 + "value": 1, + "valid": [ + 63, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "INDEX", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "WaitUntilNextValid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 3 + "value": 3, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] } }, "memory_access": "ReadWrite", @@ -19070,48 +19365,345 @@ "instructions": { "DeviceSetLock": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", "typ": "PrinterInstruction", - "value": 6 + "value": 6, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "LOCK_STATE", + "typ": "Bool8" + }, + { + "range": [ + 16, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 48 + } + } + ] }, "EjectAllReagents": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 8 + "value": 8, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] }, "EjectReagent": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "PrinterInstruction", - "value": 7 + "value": 7, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] }, "ExecuteRecipe": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 2 + "value": 2, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "PREFAB_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "JumpIfNextInvalid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 4 + "value": 4, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "JumpToAddress": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 5 + "value": 5, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "MissingRecipeReagent": { "description": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 9 + "value": 9, + "valid": [ + 54, + 62 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY_CEIL", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "StackPointer": { "description": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 1 + "value": 1, + "valid": [ + 63, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "INDEX", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "WaitUntilNextValid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 3 + "value": 3, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] } }, "memory_access": "ReadWrite", @@ -19689,48 +20281,345 @@ "instructions": { "DeviceSetLock": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", "typ": "PrinterInstruction", - "value": 6 + "value": 6, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "LOCK_STATE", + "typ": "Bool8" + }, + { + "range": [ + 16, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 48 + } + } + ] }, "EjectAllReagents": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 8 + "value": 8, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] }, "EjectReagent": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "PrinterInstruction", - "value": 7 + "value": 7, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] }, "ExecuteRecipe": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 2 + "value": 2, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "PREFAB_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "JumpIfNextInvalid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 4 + "value": 4, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "JumpToAddress": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 5 + "value": 5, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "MissingRecipeReagent": { "description": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 9 + "value": 9, + "valid": [ + 54, + 62 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY_CEIL", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "StackPointer": { "description": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 1 + "value": 1, + "valid": [ + 63, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "INDEX", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "WaitUntilNextValid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 3 + "value": 3, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] } }, "memory_access": "ReadWrite", @@ -30132,48 +31021,345 @@ "instructions": { "DeviceSetLock": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", "typ": "PrinterInstruction", - "value": 6 + "value": 6, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "LOCK_STATE", + "typ": "Bool8" + }, + { + "range": [ + 16, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 48 + } + } + ] }, "EjectAllReagents": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 8 + "value": 8, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] }, "EjectReagent": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "PrinterInstruction", - "value": 7 + "value": 7, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] }, "ExecuteRecipe": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 2 + "value": 2, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "PREFAB_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "JumpIfNextInvalid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 4 + "value": 4, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "JumpToAddress": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 5 + "value": 5, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "MissingRecipeReagent": { "description": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 9 + "value": 9, + "valid": [ + 54, + 62 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY_CEIL", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "StackPointer": { "description": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 1 + "value": 1, + "valid": [ + 63, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "INDEX", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "WaitUntilNextValid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 3 + "value": 3, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] } }, "memory_access": "ReadWrite", @@ -35333,48 +36519,345 @@ "instructions": { "DeviceSetLock": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", "typ": "PrinterInstruction", - "value": 6 + "value": 6, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "LOCK_STATE", + "typ": "Bool8" + }, + { + "range": [ + 16, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 48 + } + } + ] }, "EjectAllReagents": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 8 + "value": 8, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] }, "EjectReagent": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "PrinterInstruction", - "value": 7 + "value": 7, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] }, "ExecuteRecipe": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 2 + "value": 2, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "PREFAB_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "JumpIfNextInvalid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 4 + "value": 4, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "JumpToAddress": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 5 + "value": 5, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "MissingRecipeReagent": { "description": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 9 + "value": 9, + "valid": [ + 54, + 62 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY_CEIL", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "StackPointer": { "description": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 1 + "value": 1, + "valid": [ + 63, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "INDEX", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "WaitUntilNextValid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 3 + "value": 3, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] } }, "memory_access": "ReadWrite", @@ -39351,33 +40834,255 @@ "instructions": { "FilterPrefabHashEquals": { "description": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | PREFAB_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | PREFAB_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "SorterInstruction", - "value": 1 + "value": 1, + "valid": [ + 0, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "PREFAB_HASH", + "typ": "Int32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] }, "FilterPrefabHashNotEquals": { "description": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | PREFAB_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | PREFAB_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "SorterInstruction", - "value": 2 + "value": 2, + "valid": [ + 0, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "PREFAB_HASH", + "typ": "Int32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] }, "FilterQuantityCompare": { "description": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | QUANTITY | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |", + "description_stripped": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | QUANTITY | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |", "typ": "SorterInstruction", - "value": 5 + "value": 5, + "valid": [ + 0, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "CONDITION_OPERATION", + "typ": "Byte8" + }, + { + "range": [ + 16, + 31 + ], + "name": "QUANTITY", + "typ": "UShort16" + }, + { + "range": [ + 32, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 32 + } + } + ] }, "FilterSlotTypeCompare": { "description": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | SLOT_TYPE | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |", + "description_stripped": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | SLOT_TYPE | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |", "typ": "SorterInstruction", - "value": 4 + "value": 4, + "valid": [ + 0, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "CONDITION_OPERATION", + "typ": "Byte8" + }, + { + "range": [ + 16, + 31 + ], + "name": "SLOT_TYPE", + "typ": "UShort16" + }, + { + "range": [ + 32, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 32 + } + } + ] }, "FilterSortingClassCompare": { "description": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | SORTING_CLASS | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |", + "description_stripped": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CONDITION_OPERATION | BYTE_8 |\r\n| 16-31 | SORTING_CLASS | USHORT_16 |\r\n| 32-63 | UNUSED | 32 |", "typ": "SorterInstruction", - "value": 3 + "value": 3, + "valid": [ + 0, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "CONDITION_OPERATION", + "typ": "Byte8" + }, + { + "range": [ + 16, + 31 + ], + "name": "SORTING_CLASS", + "typ": "UShort16" + }, + { + "range": [ + 32, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 32 + } + } + ] }, "LimitNextExecutionByCount": { "description": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | COUNT | UINT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | COUNT | UINT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "SorterInstruction", - "value": 6 + "value": 6, + "valid": [ + 0, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "COUNT", + "typ": "UInt32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] } }, "memory_access": "ReadWrite", @@ -43813,8 +45518,57 @@ "instructions": { "BodyOrientation": { "description": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CELESTIAL_INDEX | BYTE_8 |\r\n| 16-31 | HORIZONTAL_DECI_DEGREES | SHORT_16 |\r\n| 32-47 | VERTICAL_DECI_DEGREES | SHORT_16 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | CELESTIAL_INDEX | BYTE_8 |\r\n| 16-31 | HORIZONTAL_DECI_DEGREES | SHORT_16 |\r\n| 32-47 | VERTICAL_DECI_DEGREES | SHORT_16 |\r\n| 48-63 | UNUSED | 16 |", "typ": "CelestialTracking", - "value": 1 + "value": 1, + "valid": [ + 0, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "CELESTIAL_INDEX", + "typ": "Byte8" + }, + { + "range": [ + 16, + 31 + ], + "name": "HORIZONTAL_DECI_DEGREES", + "typ": "Short16" + }, + { + "range": [ + 32, + 47 + ], + "name": "VERTICAL_DECI_DEGREES", + "typ": "Short16" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] } }, "memory_access": "Read", @@ -44906,48 +46660,345 @@ "instructions": { "DeviceSetLock": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", "typ": "PrinterInstruction", - "value": 6 + "value": 6, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "LOCK_STATE", + "typ": "Bool8" + }, + { + "range": [ + 16, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 48 + } + } + ] }, "EjectAllReagents": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 8 + "value": 8, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] }, "EjectReagent": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "PrinterInstruction", - "value": 7 + "value": 7, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] }, "ExecuteRecipe": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 2 + "value": 2, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "PREFAB_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "JumpIfNextInvalid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 4 + "value": 4, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "JumpToAddress": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 5 + "value": 5, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "MissingRecipeReagent": { "description": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 9 + "value": 9, + "valid": [ + 54, + 62 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY_CEIL", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "StackPointer": { "description": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 1 + "value": 1, + "valid": [ + 63, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "INDEX", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "WaitUntilNextValid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 3 + "value": 3, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] } }, "memory_access": "ReadWrite", @@ -46134,48 +48185,345 @@ "instructions": { "DeviceSetLock": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", "typ": "PrinterInstruction", - "value": 6 + "value": 6, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "LOCK_STATE", + "typ": "Bool8" + }, + { + "range": [ + 16, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 48 + } + } + ] }, "EjectAllReagents": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 8 + "value": 8, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] }, "EjectReagent": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "PrinterInstruction", - "value": 7 + "value": 7, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] }, "ExecuteRecipe": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 2 + "value": 2, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "PREFAB_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "JumpIfNextInvalid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 4 + "value": 4, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "JumpToAddress": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 5 + "value": 5, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "MissingRecipeReagent": { "description": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 9 + "value": 9, + "valid": [ + 54, + 62 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY_CEIL", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "StackPointer": { "description": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 1 + "value": 1, + "valid": [ + 63, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "INDEX", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "WaitUntilNextValid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 3 + "value": 3, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] } }, "memory_access": "ReadWrite", @@ -52365,48 +54713,345 @@ "instructions": { "DeviceSetLock": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | LOCK_STATE | BOOL_8 |\r\n| 16-63 | UNUSED | 48 |", "typ": "PrinterInstruction", - "value": 6 + "value": 6, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "LOCK_STATE", + "typ": "Bool8" + }, + { + "range": [ + 16, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 48 + } + } + ] }, "EjectAllReagents": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 8 + "value": 8, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] }, "EjectReagent": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-39 | REAGENT_HASH | INT_32 |\r\n| 40-63 | UNUSED | 24 |", "typ": "PrinterInstruction", - "value": 7 + "value": 7, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 39 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 40, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 24 + } + } + ] }, "ExecuteRecipe": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY | BYTE_8 |\r\n| 16-47 | PREFAB_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 2 + "value": 2, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "PREFAB_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "JumpIfNextInvalid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 4 + "value": 4, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "JumpToAddress": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | STACK_ADDRESS | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 5 + "value": 5, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "STACK_ADDRESS", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "MissingRecipeReagent": { "description": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 54 TO 62 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-15 | QUANTITY_CEIL | BYTE_8 |\r\n| 16-47 | REAGENT_HASH | INT_32 |\r\n| 48-63 | UNUSED | 16 |", "typ": "PrinterInstruction", - "value": 9 + "value": 9, + "valid": [ + 54, + 62 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 15 + ], + "name": "QUANTITY_CEIL", + "typ": "Byte8" + }, + { + "range": [ + 16, + 47 + ], + "name": "REAGENT_HASH", + "typ": "Int32" + }, + { + "range": [ + 48, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 16 + } + } + ] }, "StackPointer": { "description": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", + "description_stripped": "| VALID ONLY AT ADDRESS 63 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-23 | INDEX | USHORT_16 |\r\n| 24-63 | UNUSED | 40 |", "typ": "PrinterInstruction", - "value": 1 + "value": 1, + "valid": [ + 63, + null + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 23 + ], + "name": "INDEX", + "typ": "UShort16" + }, + { + "range": [ + 24, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 40 + } + } + ] }, "WaitUntilNextValid": { "description": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", + "description_stripped": "| VALID ONLY AT ADDRESSES 0 TO 53 |\r\n| 0-7 | OP_CODE | BYTE_8 |\r\n| 8-63 | UNUSED | 56 |", "typ": "PrinterInstruction", - "value": 3 + "value": 3, + "valid": [ + 0, + 53 + ], + "parts": [ + { + "range": [ + 0, + 7 + ], + "name": "OP_CODE", + "typ": "Byte8" + }, + { + "range": [ + 8, + 63 + ], + "name": "UNUSED", + "typ": { + "Unused": 56 + } + } + ] } }, "memory_access": "ReadWrite", diff --git a/www/src/ts/utils.ts b/www/src/ts/utils.ts index 386fe4c..50a176f 100644 --- a/www/src/ts/utils.ts +++ b/www/src/ts/utils.ts @@ -328,9 +328,23 @@ interface TypedEventTargetInterface extends EventTarget { options?: boolean | AddEventListenerOptions, ): void; + removeEventListener( + type: K, + callback: ( + event: EventMap[K] extends Event ? EventMap[K] : never, + ) => EventMap[K] extends Event ? void : never, + options?: boolean | AddEventListenerOptions, + ): void; + addEventListener( type: string, callback: EventListenerOrEventListenerObject | null, options?: EventListenerOptions | boolean, ): void; + + removeEventListener( + type: string, + callback: EventListenerOrEventListenerObject | null, + options?: EventListenerOptions | boolean, + ): void; } diff --git a/www/src/ts/virtual_machine/base_device.ts b/www/src/ts/virtual_machine/base_device.ts index 230da86..27c57ed 100644 --- a/www/src/ts/virtual_machine/base_device.ts +++ b/www/src/ts/virtual_machine/base_device.ts @@ -10,6 +10,10 @@ import type { ObjectID, TemplateDatabase, FrozenObjectFull, + Class, + LogicSlotType, + SlotOccupantInfo, + ICState, } from "ic10emu_wasm"; import { crc32, structuralEqual } from "utils"; import { LitElement, PropertyValueMap } from "lit"; @@ -24,20 +28,22 @@ export declare class VMObjectMixinInterface { nameHash: number | null; prefabName: string | null; prefabHash: number | null; - fields: Map; - slots: Slot[]; - reagents: Map; - connections: Connection[]; - icIP: number; - icOpCount: number; - icState: string; - errors: ICError[]; + logicFields: Map | null; + slots: VmObjectSlotInfo[] | null; + slotsCount: number | null; + reagents: Map | null; + connections: Connection[] | null; + icIP: number | null; + icOpCount: number | null; + icState: string | null; + errors: ICError[] | null; registers: number[] | null; memory: number[] | null; aliases: Map | null; - defines: Map | null; + defines: Map | null; numPins: number | null; pins: Map | null; + visibleDevices: ObjectID[] | null; _handleDeviceModified(e: CustomEvent): void; updateDevice(): void; updateIC(): void; @@ -54,23 +60,34 @@ export type VMObjectMixinSubscription = | "slots-count" | "reagents" | "connections" + | "memory" | "ic" | "active-ic" | { field: LogicType } | { slot: number } | "visible-devices"; +export interface VmObjectSlotInfo { + parent: ObjectID; + index: number; + name: string; + typ: Class; + logicFields: Map; + quantity: number; + occupant: FrozenObjectFull | undefined; +} + export const VMObjectMixin = >( superClass: T, ) => { class VMObjectMixinClass extends superClass { - private _deviceID: number; - get deviceID() { - return this._deviceID; + private _objectID: number; + get objectID() { + return this._objectID; } @property({ type: Number }) - set deviceID(val: number) { - this._deviceID = val; + set objectID(val: number) { + this._objectID = val; this.updateDevice(); } @@ -93,40 +110,42 @@ export const VMObjectMixin = >( @state() name: string | null = null; @state() nameHash: number | null = null; - @state() prefabName: string | null; - @state() prefabHash: number | null; - @state() fields: Map; - @state() slots: Slot[]; - @state() reagents: Map; - @state() connections: Connection[]; - @state() icIP: number; - @state() icOpCount: number; - @state() icState: string; - @state() errors: ICError[]; - @state() registers: number[] | null; - @state() memory: number[] | null; - @state() aliases: Map | null; - @state() defines: Map | null; - @state() numPins: number | null; - @state() pins: Map | null; + @state() prefabName: string | null = null; + @state() prefabHash: number | null = null; + @state() logicFields: Map | null = null; + @state() slots: VmObjectSlotInfo[] | null = null; + @state() slotsCount: number | null = null; + @state() reagents: Map | null = null; + @state() connections: Connection[] | null = null; + @state() icIP: number | null = null; + @state() icOpCount: number | null = null; + @state() icState: ICState | null = null; + @state() errors: ICError[] | null = null; + @state() registers: number[] | null = null; + @state() memory: number[] | null = null; + @state() aliases: Map | null = null; + @state() defines: Map | null = null; + @state() numPins: number | null = null; + @state() pins: Map | null = null; + @state() visibleDevices: ObjectID[] | null = null; connectedCallback(): void { const root = super.connectedCallback(); window.VM.get().then((vm) => { vm.addEventListener( - "vm-device-modified", + "vm-objects-modified", this._handleDeviceModified.bind(this), ); vm.addEventListener( - "vm-devices-update", + "vm-objects-update", this._handleDevicesModified.bind(this), ); vm.addEventListener( - "vm-device-id-change", + "vm-object-id-change", this._handleDeviceIdChange.bind(this), ); vm.addEventListener( - "vm-devices-removed", + "vm-objects-removed", this._handleDevicesRemoved.bind(this), ); }); @@ -137,19 +156,19 @@ export const VMObjectMixin = >( disconnectedCallback(): void { window.VM.get().then((vm) => { vm.removeEventListener( - "vm-device-modified", + "vm-objects-modified", this._handleDeviceModified.bind(this), ); vm.removeEventListener( - "vm-devices-update", + "vm-objects-update", this._handleDevicesModified.bind(this), ); vm.removeEventListener( - "vm-device-id-change", + "vm-object-id-change", this._handleDeviceIdChange.bind(this), ); vm.removeEventListener( - "vm-devices-removed", + "vm-objects-removed", this._handleDevicesRemoved.bind(this), ); }); @@ -158,7 +177,7 @@ export const VMObjectMixin = >( async _handleDeviceModified(e: CustomEvent) { const id = e.detail; const activeIcId = window.App.app.session.activeIC; - if (this.deviceID === id) { + if (this.objectID === id) { this.updateDevice(); } else if ( id === activeIcId && @@ -168,7 +187,7 @@ export const VMObjectMixin = >( this.requestUpdate(); } else if (this.objectSubscriptions.includes("visible-devices")) { const visibleDevices = await window.VM.vm.visibleDeviceIds( - this.deviceID, + this.objectID, ); if (visibleDevices.includes(id)) { this.updateDevice(); @@ -180,7 +199,7 @@ export const VMObjectMixin = >( async _handleDevicesModified(e: CustomEvent) { const activeIcId = window.App.app.session.activeIC; const ids = e.detail; - if (ids.includes(this.deviceID)) { + if (ids.includes(this.objectID)) { this.updateDevice(); if (this.objectSubscriptions.includes("visible-devices")) { this.requestUpdate(); @@ -193,7 +212,7 @@ export const VMObjectMixin = >( this.requestUpdate(); } else if (this.objectSubscriptions.includes("visible-devices")) { const visibleDevices = await window.VM.vm.visibleDeviceIds( - this.deviceID, + this.objectID, ); if (ids.some((id) => visibleDevices.includes(id))) { this.updateDevice(); @@ -203,11 +222,11 @@ export const VMObjectMixin = >( } async _handleDeviceIdChange(e: CustomEvent<{ old: number; new: number }>) { - if (this.deviceID === e.detail.old) { - this.deviceID = e.detail.new; + if (this.objectID === e.detail.old) { + this.objectID = e.detail.new; } else if (this.objectSubscriptions.includes("visible-devices")) { const visibleDevices = await window.VM.vm.visibleDeviceIds( - this.deviceID, + this.objectID, ); if ( visibleDevices.some( @@ -227,48 +246,86 @@ export const VMObjectMixin = >( } updateDevice() { - this.obj = window.VM.vm.objects.get(this.deviceID)!; + this.obj = window.VM.vm.objects.get(this.objectID)!; if (typeof this.obj === "undefined") { return; } + let newFields: Map | null = null; if ( - this.objectSubscriptions.includes("slots") || - this.objectSubscriptions.includes("slots-count") + this.objectSubscriptions.some( + (sub) => + sub === "fields" || (typeof sub === "object" && "field" in sub), + ) ) { - const slotsOccupantInfo = this.obj.obj_info.slots; + const logicValues = + this.obj.obj_info.logic_values ?? new Map(); + const logicTemplate = + "logic" in this.obj.template ? this.obj.template.logic : null; + newFields = new Map( + Array.from(logicTemplate?.logic_types.entries() ?? []).map( + ([lt, access]) => { + let field: LogicField = { + field_type: access, + value: logicValues.get(lt) ?? 0, + }; + return [lt, field]; + }, + ), + ); + } + + const visibleDevices = this.obj.obj_info.visible_devices ?? []; + if (!structuralEqual(this.visibleDevices, visibleDevices)) { + this.visibleDevices = visibleDevices; + } + + let newSlots: VmObjectSlotInfo[] | null = null; + if ( + this.objectSubscriptions.some( + (sub) => + sub === "slots" || (typeof sub === "object" && "slot" in sub), + ) + ) { + const slotsOccupantInfo = + this.obj.obj_info.slots ?? new Map(); + const slotsLogicValues = + this.obj.obj_info.slot_logic_values ?? + new Map>(); const logicTemplate = "logic" in this.obj.template ? this.obj.template.logic : null; const slotsTemplate = "slots" in this.obj.template ? this.obj.template.slots : []; - let slots: Slot[] | null = null; - if (slotsOccupantInfo.size !== 0) { - slots = slotsTemplate.map((template, index) => { - let slot = { - parent: this.obj.obj_info.id, - index: index, - name: template.name, - typ: template.typ, - readable_logic: Array.from( - logicTemplate?.logic_slot_types.get(index)?.entries() ?? [], - ) - .filter(([_, val]) => val === "Read" || val === "ReadWrite") - .map(([key, _]) => key), - writeable_logic: Array.from( - logicTemplate?.logic_slot_types.get(index)?.entries() ?? [], - ) - .filter(([_, val]) => val === "Write" || val === "ReadWrite") - .map(([key, _]) => key), - occupant: slotsOccupantInfo.get(index), - }; - return slot; - }); - } - - if (!structuralEqual(this.slots, slots)) { - this.slots = slots; - } + newSlots = slotsTemplate.map((template, index) => { + const fieldEntryInfos = Array.from( + logicTemplate?.logic_slot_types.get(index).entries() ?? [], + ); + const logicFields = new Map( + fieldEntryInfos.map(([slt, access]) => { + let field: LogicField = { + field_type: access, + value: slotsLogicValues.get(index)?.get(slt) ?? 0, + }; + return [slt, field]; + }), + ); + let occupantInfo = slotsOccupantInfo.get(index); + let occupant = + typeof occupantInfo !== "undefined" + ? window.VM.vm.objects.get(occupantInfo.id) + : null; + let slot: VmObjectSlotInfo = { + parent: this.obj.obj_info.id, + index: index, + name: template.name, + typ: template.typ, + logicFields: logicFields, + occupant: occupant, + quantity: occupantInfo?.quantity ?? 0, + }; + return slot; + }); } for (const sub of this.objectSubscriptions) { @@ -293,22 +350,20 @@ export const VMObjectMixin = >( this.prefabHash = crc32(prefabName); } } else if (sub === "fields") { - const fields = this.obj.obj_info.logic_values ?? null; - const logicTemplate = - "logic" in this.obj.template ? this.obj.template.logic : null; - let logic_fields: Map | null = null; - if (fields !== null) { - logic_fields = new Map(); - for (const [lt, val] of fields) { - const access = logicTemplate?.logic_types.get(lt) ?? "Read"; - logic_fields.set(lt, { - value: val, - field_type: access, - }); - } + if (!structuralEqual(this.logicFields, newFields)) { + this.logicFields = newFields; } - if (!structuralEqual(this.fields, logic_fields)) { - this.fields = logic_fields; + } else if (sub === "slots") { + if (!structuralEqual(this.slots, newSlots)) { + this.slots = newSlots; + this.slotsCount = newSlots.length; + } + } else if (sub === "slots-count") { + const slotsTemplate = + "slots" in this.obj.template ? this.obj.template.slots : []; + const slotsCount = slotsTemplate.length; + if (this.slotsCount !== slotsCount) { + this.slotsCount = slotsCount; } } else if (sub === "reagents") { const reagents = this.obj.obj_info.reagents; @@ -367,10 +422,15 @@ export const VMObjectMixin = >( if (!structuralEqual(this.connections, connections)) { this.connections = connections; } + } else if (sub === "memory") { + const stack = this.obj.obj_info.memory ?? null; + if (!structuralEqual(this.memory, stack)) { + this.memory = stack; + } } else if (sub === "ic") { if ( typeof this.obj.obj_info.circuit !== "undefined" || - this.obj.obj_info.socketed_ic !== "undefined" + typeof this.obj.obj_info.socketed_ic !== "undefined" ) { this.updateIC(); } @@ -382,21 +442,19 @@ export const VMObjectMixin = >( } } else { if ("field" in sub) { - const fields = this.obj.obj_info.logic_values; - if (this.fields.get(sub.field) !== fields.get(sub.field)) { - this.fields = fields; + if (this.logicFields.get(sub.field) !== newFields.get(sub.field)) { + this.logicFields = newFields; } } else if ("slot" in sub) { - const slots = this.obj.slots; if ( typeof this.slots === "undefined" || this.slots.length < sub.slot ) { - this.slots = slots; + this.slots = newSlots; } else if ( - !structuralEqual(this.slots[sub.slot], slots[sub.slot]) + !structuralEqual(this.slots[sub.slot], newSlots[sub.slot]) ) { - this.slots = slots; + this.slots = newSlots; } } } @@ -404,41 +462,42 @@ export const VMObjectMixin = >( } updateIC() { - const ip = this.obj.ip!; + const ip = this.obj.obj_info.circuit?.instruction_pointer ?? null; if (this.icIP !== ip) { this.icIP = ip; } - const opCount = this.obj.instructionCount!; + const opCount = + this.obj.obj_info.circuit?.yield_instruciton_count ?? null; if (this.icOpCount !== opCount) { this.icOpCount = opCount; } - const state = this.obj.state!; + const state = this.obj.obj_info.circuit?.state ?? null; if (this.icState !== state) { this.icState = state; } - const errors = this.obj.program?.errors ?? null; + const errors = this.obj.obj_info.compile_errors ?? null; if (!structuralEqual(this.errors, errors)) { this.errors = errors; } - const registers = this.obj.registers ?? null; + const registers = this.obj.obj_info.circuit?.registers ?? null; if (!structuralEqual(this.registers, registers)) { this.registers = registers; } - const stack = this.obj.stack ?? null; - if (!structuralEqual(this.memory, stack)) { - this.memory = stack; - } - const aliases = this.obj.aliases ?? null; + const aliases = this.obj.obj_info.circuit?.aliases ?? null; if (!structuralEqual(this.aliases, aliases)) { this.aliases = aliases; } - const defines = this.obj.defines ?? null; + const defines = this.obj.obj_info.circuit?.defines ?? null; if (!structuralEqual(this.defines, defines)) { this.defines = defines; } - const pins = this.obj.pins ?? null; + const pins = this.obj.obj_info.device_pins ?? new Map(); if (!structuralEqual(this.pins, pins)) { this.pins = pins; + this.numPins = + "device" in this.obj.template + ? this.obj.template.device.device_pins_length + : Math.max(...Array.from(this.pins?.keys() ?? [0])); } } } @@ -492,16 +551,16 @@ export const VMActiveICMixin = >( return VMActiveICMixinClass as Constructor & T; }; -export declare class VMDeviceDBMixinInterface { +export declare class VMTemplateDBMixinInterface { templateDB: TemplateDatabase; _handleDeviceDBLoad(e: CustomEvent): void; postDBSetUpdate(): void; } -export const VMDeviceDBMixin = >( +export const VMTemplateDBMixin = >( superClass: T, ) => { - class VMDeviceDBMixinClass extends superClass { + class VMTemplateDBMixinClass extends superClass { connectedCallback(): void { const root = super.connectedCallback(); window.VM.vm.addEventListener( @@ -540,5 +599,5 @@ export const VMDeviceDBMixin = >( } } - return VMDeviceDBMixinClass as Constructor & T; + return VMTemplateDBMixinClass as Constructor & T; }; diff --git a/www/src/ts/virtual_machine/device/add_device.ts b/www/src/ts/virtual_machine/device/add_device.ts index 96f76c1..56499ef 100644 --- a/www/src/ts/virtual_machine/device/add_device.ts +++ b/www/src/ts/virtual_machine/device/add_device.ts @@ -12,11 +12,11 @@ import { cache } from "lit/directives/cache.js"; import { default as uFuzzy } from "@leeoniya/ufuzzy"; import { when } from "lit/directives/when.js"; import { unsafeHTML } from "lit/directives/unsafe-html.js"; -import { VMDeviceDBMixin } from "virtual_machine/base_device"; +import { VMTemplateDBMixin } from "virtual_machine/base_device"; @customElement("vm-add-device-button") -export class VMAddDeviceButton extends VMDeviceDBMixin(BaseElement) { +export class VMAddDeviceButton extends VMTemplateDBMixin(BaseElement) { static styles = [ ...defaultCss, css` diff --git a/www/src/ts/virtual_machine/device/card.ts b/www/src/ts/virtual_machine/device/card.ts index 91465dd..77c21c5 100644 --- a/www/src/ts/virtual_machine/device/card.ts +++ b/www/src/ts/virtual_machine/device/card.ts @@ -1,7 +1,7 @@ import { html, css, HTMLTemplateResult } from "lit"; import { customElement, property, query, state } from "lit/decorators.js"; import { BaseElement, defaultCss } from "components"; -import { VMDeviceDBMixin, VMObjectMixin } from "virtual_machine/base_device"; +import { VMTemplateDBMixin, VMObjectMixin } from "virtual_machine/base_device"; import SlSelect from "@shoelace-style/shoelace/dist/components/select/select.component.js"; import { parseIntWithHexOrBinary, parseNumber } from "utils"; import SlInput from "@shoelace-style/shoelace/dist/components/input/input.component.js"; @@ -15,7 +15,9 @@ import { repeat } from "lit/directives/repeat.js"; export type CardTab = "fields" | "slots" | "reagents" | "networks" | "pins"; @customElement("vm-device-card") -export class VMDeviceCard extends VMDeviceDBMixin(VMObjectMixin(BaseElement)) { +export class VMDeviceCard extends VMTemplateDBMixin( + VMObjectMixin(BaseElement), +) { image_err: boolean; @property({ type: Boolean }) open: boolean; @@ -141,7 +143,17 @@ export class VMDeviceCard extends VMDeviceDBMixin(VMObjectMixin(BaseElement)) { badges.push(html`db`); } const activeIc = window.VM.vm.activeIC; - activeIc?.pins?.forEach((id, index) => { + + const numPins = + "device" in activeIc?.template + ? activeIc.template.device.device_pins_length + : Math.max( + ...Array.from(activeIc?.obj_info.device_pins?.keys() ?? [0]), + ); + const pins = new Array(numPins) + .fill(true) + .map((_, index) => this.pins.get(index)); + pins.forEach((id, index) => { if (this.objectID == id) { badges.push( html`d${index}`, @@ -150,31 +162,71 @@ export class VMDeviceCard extends VMDeviceDBMixin(VMObjectMixin(BaseElement)) { }, this); return html` - +
- + Id - + - + Name - + - + Hash - + ${badges.map((badge) => badge)}
- - + +
`; @@ -199,13 +251,14 @@ export class VMDeviceCard extends VMDeviceDBMixin(VMObjectMixin(BaseElement)) { "slots", html`
- ${repeat(this.slots, - (slot, index) => slot.typ + index.toString(), - (_slot, index) => html` + ${repeat( + this.slots, + (slot, index) => slot.typ + index.toString(), + (_slot, index) => html` `, - )} + )}
`, ); @@ -219,15 +272,26 @@ export class VMDeviceCard extends VMDeviceDBMixin(VMObjectMixin(BaseElement)) { const vmNetworks = window.VM.vm.networks; const networks = this.connections.map((connection, index, _conns) => { const conn = - typeof connection === "object" ? connection.CableNetwork : null; + typeof connection === "object" && "CableNetwork" in connection + ? connection.CableNetwork + : null; return html` - + Connection:${index} ${vmNetworks.map( - (net) => - html`Network ${net}`, - )} + (net) => + html`Network ${net}`, + )} ${conn?.typ} `; @@ -243,7 +307,7 @@ export class VMDeviceCard extends VMDeviceDBMixin(VMObjectMixin(BaseElement)) { "pins", html`
-
` + `, ); } @@ -295,7 +359,9 @@ export class VMDeviceCard extends VMDeviceDBMixin(VMObjectMixin(BaseElement)) { Slots Reagents Networks - Pins + Pins ${until(this.renderFields(), html``)} @@ -309,21 +375,37 @@ export class VMDeviceCard extends VMDeviceDBMixin(VMObjectMixin(BaseElement)) { ${until(this.renderNetworks(), html``)} - ${until(this.renderPins(), html``)} + ${until(this.renderPins(), html``)} + - +
- +

Are you sure you want to remove this device?

Id ${this.objectID} : ${this.name ?? this.prefabName}
- Close - Remove + Close + Remove
`; @@ -387,5 +469,4 @@ export class VMDeviceCard extends VMDeviceDBMixin(VMObjectMixin(BaseElement)) { ); this.updateDevice(); } - } diff --git a/www/src/ts/virtual_machine/device/device_list.ts b/www/src/ts/virtual_machine/device/device_list.ts index 871710f..bac5259 100644 --- a/www/src/ts/virtual_machine/device/device_list.ts +++ b/www/src/ts/virtual_machine/device/device_list.ts @@ -151,11 +151,11 @@ export class VMDeviceList extends BaseElement { for (const device_id of this.devices) { const device = window.VM.vm.objects.get(device_id); if (device) { - if (typeof device.name !== "undefined") { - datapoints.push([device.name, device.id]); + if (typeof device.obj_info.name !== "undefined") { + datapoints.push([device.obj_info.name, device.obj_info.id]); } - if (typeof device.prefabName !== "undefined") { - datapoints.push([device.prefabName, device.id]); + if (typeof device.obj_info.prefab !== "undefined") { + datapoints.push([device.obj_info.prefab, device.obj_info.id]); } } } diff --git a/www/src/ts/virtual_machine/device/fields.ts b/www/src/ts/virtual_machine/device/fields.ts index 9592330..a1afdf9 100644 --- a/www/src/ts/virtual_machine/device/fields.ts +++ b/www/src/ts/virtual_machine/device/fields.ts @@ -1,20 +1,20 @@ import { html, css } from "lit"; import { customElement, property } from "lit/decorators.js"; import { BaseElement, defaultCss } from "components"; -import { VMDeviceDBMixin, VMObjectMixin } from "virtual_machine/base_device"; +import { VMTemplateDBMixin, VMObjectMixin } from "virtual_machine/base_device"; import { displayNumber, parseNumber } from "utils"; import type { LogicType } from "ic10emu_wasm"; import SlInput from "@shoelace-style/shoelace/dist/components/input/input.component.js"; @customElement("vm-device-fields") -export class VMDeviceSlot extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { +export class VMDeviceSlot extends VMObjectMixin(VMTemplateDBMixin(BaseElement)) { constructor() { super(); this.subscribe("fields"); } render() { - const fields = Array.from(this.fields.entries()); + const fields = Array.from(this.logicFields.entries()); const inputIdBase = `vmDeviceCard${this.objectID}Field`; return html` ${fields.map(([name, field], _index, _fields) => { @@ -34,7 +34,7 @@ export class VMDeviceSlot extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { const val = parseNumber(input.value); window.VM.get().then((vm) => { if (!vm.setObjectField(this.objectID, field, val, true)) { - input.value = this.fields.get(field).value.toString(); + input.value = this.logicFields.get(field).value.toString(); } this.updateDevice(); }); diff --git a/www/src/ts/virtual_machine/device/index.ts b/www/src/ts/virtual_machine/device/index.ts index ef53140..4b1d15a 100644 --- a/www/src/ts/virtual_machine/device/index.ts +++ b/www/src/ts/virtual_machine/device/index.ts @@ -5,11 +5,11 @@ import "./add_device" import "./slot_add_dialog" import "./slot" -import { VmDeviceTemplate } from "./template"; +import { VmObjectTemplate } from "./template"; import { VMDeviceCard } from "./card"; import { VMDeviceList } from "./device_list"; import { VMAddDeviceButton } from "./add_device"; import { VMSlotAddDialog } from "./slot_add_dialog"; -export { VMDeviceCard, VmDeviceTemplate, VMDeviceList, VMAddDeviceButton, VMSlotAddDialog }; +export { VMDeviceCard, VmObjectTemplate as VmDeviceTemplate, VMDeviceList, VMAddDeviceButton, VMSlotAddDialog }; diff --git a/www/src/ts/virtual_machine/device/pins.ts b/www/src/ts/virtual_machine/device/pins.ts index 12b4e04..f4e5f42 100644 --- a/www/src/ts/virtual_machine/device/pins.ts +++ b/www/src/ts/virtual_machine/device/pins.ts @@ -1,34 +1,42 @@ - import { html, css } from "lit"; import { customElement, property } from "lit/decorators.js"; import { BaseElement, defaultCss } from "components"; -import { VMDeviceDBMixin, VMObjectMixin } from "virtual_machine/base_device"; +import { VMTemplateDBMixin, VMObjectMixin } from "virtual_machine/base_device"; import SlSelect from "@shoelace-style/shoelace/dist/components/select/select.component.js"; +import { ObjectID } from "ic10emu_wasm"; @customElement("vm-device-pins") -export class VMDevicePins extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { +export class VMDevicePins extends VMObjectMixin(VMTemplateDBMixin(BaseElement)) { constructor() { super(); this.subscribe("ic", "visible-devices"); } render() { - const pins = this.pins; - const visibleDevices = window.VM.vm.visibleDevices(this.objectID); + const pins = new Array(this.numPins ?? 0) + .fill(true) + .map((_, index) => this.pins.get(index)); + const visibleDevices = (this.visibleDevices ?? []).map((id) => window.VM.vm.objects.get(id)); const pinsHtml = pins?.map( (pin, index) => - html` - - d${index} - ${visibleDevices.map( - (device, _index) => - html` - - Device ${device.id} : ${device.name ?? device.prefabName} - - `, + html` + d${index} + ${visibleDevices.map( + (device, _index) => html` + + Device ${device.obj_info.id} : + ${device.obj_info.name ?? device.obj_info.prefab} + + `, )} - `, + `, ); return pinsHtml; } @@ -40,5 +48,4 @@ export class VMDevicePins extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { window.VM.get().then((vm) => vm.setDevicePin(this.objectID, pin, val)); this.updateDevice(); } - } diff --git a/www/src/ts/virtual_machine/device/slot.ts b/www/src/ts/virtual_machine/device/slot.ts index 473223f..eae273c 100644 --- a/www/src/ts/virtual_machine/device/slot.ts +++ b/www/src/ts/virtual_machine/device/slot.ts @@ -1,15 +1,19 @@ import { html, css } from "lit"; import { customElement, property} from "lit/decorators.js"; import { BaseElement, defaultCss } from "components"; -import { VMDeviceDBMixin, VMObjectMixin } from "virtual_machine/base_device"; +import { VMTemplateDBMixin, VMObjectMixin } from "virtual_machine/base_device"; import { clamp, + crc32, displayNumber, parseNumber, } from "utils"; import { + LogicField, LogicSlotType, - SlotType, + SlotInfo, + Class as SlotType, + TemplateDatabase, } from "ic10emu_wasm"; import SlInput from "@shoelace-style/shoelace/dist/components/input/input.component.js"; import { VMDeviceCard } from "./card"; @@ -21,7 +25,7 @@ export interface SlotModifyEvent { } @customElement("vm-device-slot") -export class VMDeviceSlot extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { +export class VMDeviceSlot extends VMObjectMixin(VMTemplateDBMixin(BaseElement)) { private _slotIndex: number; get slotIndex() { @@ -72,8 +76,7 @@ export class VMDeviceSlot extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { slotOccupantImg(): string { const slot = this.slots[this.slotIndex]; if (typeof slot.occupant !== "undefined") { - const hashLookup = (this.templateDB ?? {}).names_by_hash ?? {}; - const prefabName = hashLookup[slot.occupant.prefab_hash] ?? "UnknownHash"; + const prefabName = slot.occupant.obj_info.prefab; return `img/stationpedia/${prefabName}.png`; } else { return `img/stationpedia/SlotIcon_${slot.typ}.png`; @@ -83,18 +86,16 @@ export class VMDeviceSlot extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { slotOccupantPrefabName(): string { const slot = this.slots[this.slotIndex]; if (typeof slot.occupant !== "undefined") { - const hashLookup = (this.templateDB ?? {}).names_by_hash ?? {}; - const prefabName = hashLookup[slot.occupant.prefab_hash] ?? "UnknownHash"; + const prefabName = slot.occupant.obj_info.prefab; return prefabName; } else { return undefined; } } - slotOcccupantTemplate(): { name: string; typ: SlotType } | undefined { - if (this.templateDB) { - const entry = this.templateDB.db[this.prefabName]; - return entry?.slots[this.slotIndex]; + slotOcccupantTemplate(): SlotInfo | undefined { + if ("slots" in this.obj.template) { + return this.obj.template.slots[this.slotIndex]; } else { return undefined; } @@ -139,10 +140,11 @@ export class VMDeviceSlot extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { class="absolute bottom-0 right-0 mr-1 mb-1 text-xs text-neutral-200/90 font-mono bg-neutral-500/40 rounded pl-1 pr-1" > - ${slot.occupant.quantity}/${slot.occupant - .max_quantity} + + ${slot.quantity}/${"item" in slot.occupant.template + ? slot.occupant.template.item.max_quantity + : 1} + `, )}
@@ -170,13 +172,20 @@ export class VMDeviceSlot extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { ? html`
- Max Quantity: ${slot.occupant.max_quantity} + + Max Quantity: + ${"item" in slot.occupant.template + ? slot.occupant.template.item.max_quantity + : 1} +
` : ""} @@ -218,7 +227,13 @@ export class VMDeviceSlot extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { _handleSlotQuantityChange(e: Event) { const input = e.currentTarget as SlInput; const slot = this.slots[this.slotIndex]; - const val = clamp(input.valueAsNumber, 1, slot.occupant.max_quantity); + const val = clamp( + input.valueAsNumber, + 1, + "item" in slot.occupant.template + ? slot.occupant.template.item.max_quantity + : 1, + ); if ( !window.VM.vm.setObjectSlotField( this.objectID, @@ -228,15 +243,15 @@ export class VMDeviceSlot extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { true, ) ) { - input.value = this.obj - .getSlotField(this.slotIndex, "Quantity") - .toString(); + input.value = this.slots[this.slotIndex].quantity.toString(); } } renderFields() { const inputIdBase = `vmDeviceSlot${this.objectID}Slot${this.slotIndex}Field`; - const _fields = this.obj.getSlotFields(this.slotIndex); + const _fields = + this.slots[this.slotIndex].logicFields ?? + new Map(); const fields = Array.from(_fields.entries()); return html` @@ -269,14 +284,23 @@ export class VMDeviceSlot extends VMObjectMixin(VMDeviceDBMixin(BaseElement)) { let val = parseNumber(input.value); if (field === "Quantity") { const slot = this.slots[this.slotIndex]; - val = clamp(input.valueAsNumber, 1, slot.occupant.max_quantity); + val = clamp( + input.valueAsNumber, + 1, + "item" in slot.occupant.template + ? slot.occupant.template.item.max_quantity + : 1, + ); } window.VM.get().then((vm) => { if ( !vm.setObjectSlotField(this.objectID, this.slotIndex, field, val, true) ) { - input.value = this.obj - .getSlotField(this.slotIndex, field) + input.value = ( + this.slots[this.slotIndex].logicFields ?? + new Map() + ) + .get(field) .toString(); } this.updateDevice(); diff --git a/www/src/ts/virtual_machine/device/slot_add_dialog.ts b/www/src/ts/virtual_machine/device/slot_add_dialog.ts index 1fa3dca..0946397 100644 --- a/www/src/ts/virtual_machine/device/slot_add_dialog.ts +++ b/www/src/ts/virtual_machine/device/slot_add_dialog.ts @@ -1,7 +1,7 @@ import { html, css } from "lit"; import { customElement, property, query, state } from "lit/decorators.js"; import { BaseElement, defaultCss } from "components"; -import { VMDeviceDBMixin } from "virtual_machine/base_device"; +import { VMTemplateDBMixin } from "virtual_machine/base_device"; import type { DeviceDB, DeviceDBEntry } from "virtual_machine/device_db"; import SlInput from "@shoelace-style/shoelace/dist/components/input/input.component.js"; import SlDialog from "@shoelace-style/shoelace/dist/components/dialog/dialog.component.js"; @@ -11,7 +11,7 @@ import uFuzzy from "@leeoniya/ufuzzy"; import { LogicField, LogicSlotType, SlotOccupantTemplate } from "ic10emu_wasm"; @customElement("vm-slot-add-dialog") -export class VMSlotAddDialog extends VMDeviceDBMixin(BaseElement) { +export class VMSlotAddDialog extends VMTemplateDBMixin(BaseElement) { static styles = [ ...defaultCss, css` diff --git a/www/src/ts/virtual_machine/device/template.ts b/www/src/ts/virtual_machine/device/template.ts index bd759ae..b71eee4 100644 --- a/www/src/ts/virtual_machine/device/template.ts +++ b/www/src/ts/virtual_machine/device/template.ts @@ -1,26 +1,23 @@ import type { Connection, - DeviceTemplate, + ObjectTemplate, LogicField, LogicType, Slot, - SlotTemplate, - ConnectionCableNetwork, } from "ic10emu_wasm"; import { html, css, HTMLTemplateResult } from "lit"; import { customElement, property, query, state } from "lit/decorators.js"; import { BaseElement, defaultCss } from "components"; -import type { DeviceDB, DeviceDBEntry } from "virtual_machine/device_db"; import { connectionFromDeviceDBConnection } from "./dbutils"; -import { displayNumber, parseNumber } from "utils"; +import { crc32, displayNumber, parseNumber } from "utils"; import SlInput from "@shoelace-style/shoelace/dist/components/input/input.component.js"; import SlSelect from "@shoelace-style/shoelace/dist/components/select/select.component.js"; import { VMDeviceCard } from "./card"; -import { VMDeviceDBMixin } from "virtual_machine/base_device"; +import { VMTemplateDBMixin } from "virtual_machine/base_device"; @customElement("vm-device-template") -export class VmDeviceTemplate extends VMDeviceDBMixin(BaseElement) { +export class VmObjectTemplate extends VMTemplateDBMixin(BaseElement) { static styles = [ ...defaultCss, @@ -56,14 +53,14 @@ export class VmDeviceTemplate extends VMDeviceDBMixin(BaseElement) { @state() fields: { [key in LogicType]?: LogicField }; @state() slots: SlotTemplate[]; - @state() template: DeviceTemplate; + @state() template: ObjectTemplate; @state() device_id: number | undefined; @state() device_name: string | undefined; @state() connections: Connection[]; constructor() { super(); - this.templateDB = window.VM.vm.db; + this.templateDB = window.VM.vm.templateDB; } private _prefab_name: string; @@ -78,27 +75,27 @@ export class VmDeviceTemplate extends VMDeviceDBMixin(BaseElement) { this.setupState(); } - get dbDevice(): DeviceDBEntry { - return this.templateDB.db[this.prefab_name]; + get dbTemplate(): ObjectTemplate { + return this.templateDB.get( crc32(this.prefab_name)); } setupState() { this.fields = Object.fromEntries( - Object.entries(this.dbDevice?.logic ?? {}).map(([lt, ft]) => { - const value = lt === "PrefabHash" ? this.dbDevice.hash : 0.0; + Object.entries(this.dbTemplate?.logic ?? {}).map(([lt, ft]) => { + const value = lt === "PrefabHash" ? this.dbTemplate.prefab.prefab_hash : 0.0; return [lt, { field_type: ft, value } as LogicField]; }), ); - this.slots = (this.dbDevice?.slots ?? []).map( + this.slots = (this.dbTemplate?.slots ?? []).map( (slot, _index) => ({ typ: slot.typ, }) as SlotTemplate, ); - const connections = Object.entries(this.dbDevice?.conn ?? {}).map( + const connections = Object.entries(this.dbTemplate?.conn ?? {}).map( ([index, conn]) => [index, connectionFromDeviceDBConnection(conn)] as const, ); @@ -203,7 +200,7 @@ export class VmDeviceTemplate extends VMDeviceDBMixin(BaseElement) { } render() { - const device = this.dbDevice; + const device = this.dbTemplate; return html`
diff --git a/www/src/ts/virtual_machine/index.ts b/www/src/ts/virtual_machine/index.ts index 5143235..f2ed99b 100644 --- a/www/src/ts/virtual_machine/index.ts +++ b/www/src/ts/virtual_machine/index.ts @@ -116,8 +116,15 @@ class VirtualMachine extends (EventTarget as TypedEventTarget [id, ic.obj_info.source_code]); diff --git a/xtask/src/generate/database.rs b/xtask/src/generate/database.rs index 83bfb0c..c169811 100644 --- a/xtask/src/generate/database.rs +++ b/xtask/src/generate/database.rs @@ -15,14 +15,15 @@ use crate::{ }; use stationeers_data::templates::{ - ConnectionInfo, ConsumerInfo, DeviceInfo, FabricatorInfo, Instruction, InternalAtmoInfo, - ItemCircuitHolderTemplate, ItemConsumerTemplate, ItemInfo, ItemLogicMemoryTemplate, - ItemLogicTemplate, ItemSlotsTemplate, ItemSuitCircuitHolderTemplate, ItemSuitLogicTemplate, - ItemSuitTemplate, ItemTemplate, LogicInfo, MemoryInfo, ObjectTemplate, PrefabInfo, Recipe, - RecipeGasMix, RecipeRange, SlotInfo, StructureCircuitHolderTemplate, StructureInfo, - StructureLogicDeviceConsumerMemoryTemplate, StructureLogicDeviceConsumerTemplate, - StructureLogicDeviceMemoryTemplate, StructureLogicDeviceTemplate, StructureLogicTemplate, - StructureSlotsTemplate, StructureTemplate, SuitInfo, ThermalInfo, + ConnectionInfo, ConsumerInfo, DeviceInfo, FabricatorInfo, Instruction, InstructionPart, + InstructionPartType, InternalAtmoInfo, ItemCircuitHolderTemplate, ItemConsumerTemplate, + ItemInfo, ItemLogicMemoryTemplate, ItemLogicTemplate, ItemSlotsTemplate, + ItemSuitCircuitHolderTemplate, ItemSuitLogicTemplate, ItemSuitTemplate, ItemTemplate, + LogicInfo, MemoryInfo, ObjectTemplate, PrefabInfo, Recipe, RecipeGasMix, RecipeRange, SlotInfo, + StructureCircuitHolderTemplate, StructureInfo, StructureLogicDeviceConsumerMemoryTemplate, + StructureLogicDeviceConsumerTemplate, StructureLogicDeviceMemoryTemplate, + StructureLogicDeviceTemplate, StructureLogicTemplate, StructureSlotsTemplate, + StructureTemplate, SuitInfo, ThermalInfo, }; #[allow(clippy::too_many_lines)] @@ -202,9 +203,9 @@ pub fn generate_database( // remove preceding comma if it exists, leave trailing comma intact if it exists, capture // repeating groups of null fields // - // https://regex101.com/r/V2tXIa/1 + // https://regex101.com/r/WFpjHV/1 // - let null_matcher = regex::Regex::new(r#"(?:(?:,\n)\s*"\w+":\snull)+(,?)"#).unwrap(); + let null_matcher = regex::Regex::new(r#"(?:(?:,?\n)\s*"\w+":\snull)+(,?)"#).unwrap(); let json = null_matcher.replace_all(&json, "$1"); write!(&mut database_file, "{json}")?; database_file.flush()?; @@ -1017,10 +1018,66 @@ impl From<&stationpedia::Structure> for StructureInfo { impl From<&stationpedia::Instruction> for Instruction { fn from(value: &stationpedia::Instruction) -> Self { + let color_re = regex::Regex::new(r"|").unwrap(); + let description_stripped = color_re.replace_all(&value.description, "").to_string(); + // https://regex101.com/r/GVNgq3/1 + let valid_range_re = + regex::Regex::new(r"VALID ONLY AT ADDRESS(?:ES)? (?\d+) (?:TO (?\d+))?") + .unwrap(); + // https://regex101.com/r/jwbISO/1 + let part_re = + regex::Regex::new(r"[ \|]+(?\d+)-(?\d+)[ \|]+(?[A-Z_]+)[ \|]+(?:(?[A-Z]+_[0-9]+)|(?\d+))") + .unwrap(); + let valid = { + if let Some(caps) = valid_range_re.captures(&description_stripped) { + ( + caps.name("start").unwrap().as_str().parse().unwrap(), + caps.name("end").map(|cap| cap.as_str().parse().unwrap()), + ) + } else { + (0, None) + } + }; + let parts = { + part_re + .captures_iter(&description_stripped) + .map(|caps| { + let typ = caps + .name("type") + .map(|cap| match cap.as_str() { + "BOOL_8" => InstructionPartType::Bool8, + "BYTE_8" => InstructionPartType::Byte8, + "INT_32" => InstructionPartType::Int32, + "UINT_32" => InstructionPartType::UInt32, + "SHORT_16" => InstructionPartType::Short16, + "USHORT_16" => InstructionPartType::UShort16, + s => InstructionPartType::Unknown(s.to_string()), + }) + .unwrap_or_else(|| { + let len = caps + .name("unused_len") + .and_then(|cap| cap.as_str().parse().ok()) + .unwrap_or(0); + InstructionPartType::Unused(len) + }); + InstructionPart { + range: ( + caps.name("start").unwrap().as_str().parse().unwrap(), + caps.name("end").unwrap().as_str().parse().unwrap(), + ), + name: caps.name("name").unwrap().as_str().to_string(), + typ, + } + }) + .collect() + }; Instruction { description: value.description.clone(), + description_stripped, typ: value.type_.clone(), value: value.value, + valid, + parts, } } }