assembly_data/xml/obj/store/
mod.rs

1pub mod sink;
2
3/// `obj`
4#[derive(Default, Debug, PartialEq)]
5pub struct Object {
6    /// Version
7    pub attr_v: u32,
8    /// Buffs
9    pub buff: Option<Buff>,
10    /// Destructible Component
11    pub dest: Option<Destructible>,
12    /// Inventory Component
13    pub inv: Option<Inventory>,
14    /// Minifigure Component
15    pub mf: Option<Minifig>,
16}
17
18/// Buff Component
19#[derive(Default, Debug, PartialEq)]
20pub struct Buff {}
21
22/// `dest`
23#[derive(Default, Debug, PartialEq)]
24pub struct Destructible {
25    /// Current Armor
26    pub attr_ac: Option<u32>,
27    /// Maximum Armor
28    pub attr_am: Option<u32>,
29    /// Object is Dead
30    pub attr_d: Option<bool>,
31    /// Health Current
32    pub attr_hc: Option<u32>,
33    /// Maximum Health
34    pub attr_hm: Option<u32>,
35    /// Current Imagination
36    pub attr_ic: Option<u32>,
37    /// Maximum Imagination
38    pub attr_im: Option<u32>,
39    /// Immunity
40    pub attr_imm: Option<u32>,
41    /// Respawn Health
42    pub attr_rsh: Option<u32>,
43    /// Respawn Imagination
44    pub attr_rsi: Option<u32>,
45}
46
47/// The inventory component
48#[derive(Default, Debug, PartialEq)]
49pub struct Inventory {
50    /// Consumable Slot LOT
51    pub attr_csl: Option<u32>,
52    /// Inventory 'Bags'
53    pub bag: Vec<Bag>,
54    /// Groups
55    pub grps: Vec<Group>,
56    /// Items
57    pub items: Items,
58}
59
60/// One compartment in the inventory
61#[derive(Default, Debug, PartialEq)]
62pub struct Bag {
63    /// Type
64    pub attr_t: u32,
65    /// Maximum
66    pub attr_m: u32,
67}
68
69/// One group
70#[derive(Default, Debug, PartialEq)]
71pub struct Group {
72    /// `user_group XXX`
73    pub attr_id: String,
74    /// Space-separated LOTs
75    pub attr_l: String,
76    /// Name
77    pub attr_n: String,
78    /// Type of the group
79    pub attr_t: u32,
80    /// Unknown
81    pub attr_u: String,
82}
83
84/// All items
85#[derive(Default, Debug, PartialEq)]
86pub struct Items {
87    pub attr_nn: String,
88    pub children: Vec<ItemBag>,
89}
90
91/// A list of items for a bag
92#[derive(Default, Debug, PartialEq)]
93pub struct ItemBag {
94    pub attr_t: u32,
95    pub children: Vec<Item>,
96}
97
98/// An item in an inventory
99#[derive(Default, Debug, PartialEq)]
100pub struct Item {
101    /// Is Bound
102    pub attr_b: bool,
103    /// Count
104    pub attr_c: u32,
105    /// Is Equipped
106    pub attr_eq: bool,
107    /// Object ID
108    pub attr_id: u64,
109    /// LOT
110    pub attr_l: u32,
111    /// Slot
112    pub attr_s: u32,
113    /// Subkey
114    pub attr_sk: u32,
115    /// Extra Info
116    pub x: Option<ItemExtra>,
117}
118
119#[derive(Default, Debug, PartialEq)]
120pub struct ItemExtra {
121    pub attr_b: String,
122    /// Module Assembly
123    pub attr_ma: String,
124    pub attr_ub: String,
125    pub attr_ud: String,
126    pub attr_ui: String,
127    pub attr_um: String,
128    /// UGC name?
129    pub attr_un: String,
130    pub attr_uo: String,
131    pub attr_up: String,
132}
133
134#[derive(Default, Debug, PartialEq)]
135/// Minifigure Component
136pub struct Minifig {
137    /// Chest Decal
138    pub attr_cd: u32,
139    /// Eyebrow Style
140    pub attr_es: u32,
141    /// Eye Style.
142    pub attr_ess: u32,
143    /// Hair Color
144    pub attr_hc: u32,
145    /// Head Style
146    pub attr_hd: u32,
147    /// Head Color
148    pub attr_hdc: u32,
149    /// Hair Style
150    pub attr_hs: u32,
151    /// Legs
152    pub attr_l: u32,
153    /// Left Hand
154    pub attr_lh: u32,
155    /// Mouth Style.
156    pub attr_ms: u32,
157    /// Right Hand
158    pub attr_rh: u32,
159    /// Chest
160    pub attr_t: u32,
161}