@@ -33,19 +33,21 @@ def _read(self):
3333 self .len_data = self ._io .read_u2le ()
3434 _on = self .magic
3535 if _on == 0 :
36- self .data = LithtechDat .StrWithLen2 (self ._io , self , self ._root )
36+ self .data = LithtechDat .WopString (self ._io , self , self ._root )
37+ elif _on == 4 :
38+ self .data = LithtechDat .WopFlag (self ._io , self , self ._root )
3739 elif _on == 6 :
38- self .data = self ._io . read_s4le ( )
40+ self .data = LithtechDat . WopInt ( self ._io , self , self . _root )
3941 elif _on == 7 :
40- self .data = LithtechDat .Quaternion (self ._io , self , self ._root )
42+ self .data = LithtechDat .WopQuaternion (self ._io , self , self ._root )
4143 elif _on == 1 :
42- self .data = LithtechDat .Vec3 (self ._io , self , self ._root )
44+ self .data = LithtechDat .WopVec3 (self ._io , self , self ._root )
4345 elif _on == 3 :
44- self .data = self ._io . read_f4le ( )
46+ self .data = LithtechDat . WopF4 ( self ._io , self , self . _root )
4547 elif _on == 5 :
46- self .data = self ._io . read_u1 ( )
48+ self .data = LithtechDat . WopBool ( self ._io , self , self . _root )
4749 elif _on == 2 :
48- self .data = LithtechDat .Color (self ._io , self , self ._root )
50+ self .data = LithtechDat .WopColor (self ._io , self , self ._root )
4951
5052
5153 class WorldObject (KaitaiStruct ):
@@ -218,6 +220,17 @@ def _read(self):
218220
219221
220222
223+ class WopF4 (KaitaiStruct ):
224+ def __init__ (self , _io , _parent = None , _root = None ):
225+ self ._io = _io
226+ self ._parent = _parent
227+ self ._root = _root if _root else self
228+ self ._read ()
229+
230+ def _read (self ):
231+ self .value = self ._io .read_f4le ()
232+
233+
221234 class RenderSection (KaitaiStruct ):
222235 def __init__ (self , _io , _parent = None , _root = None ):
223236 self ._io = _io
@@ -253,6 +266,28 @@ def _read(self):
253266 self .world_offset = LithtechDat .Vec3 (self ._io , self , self ._root )
254267
255268
269+ class WopInt (KaitaiStruct ):
270+ def __init__ (self , _io , _parent = None , _root = None ):
271+ self ._io = _io
272+ self ._parent = _parent
273+ self ._root = _root if _root else self
274+ self ._read ()
275+
276+ def _read (self ):
277+ self .value = self ._io .read_s4le ()
278+
279+
280+ class WopColor (KaitaiStruct ):
281+ def __init__ (self , _io , _parent = None , _root = None ):
282+ self ._io = _io
283+ self ._parent = _parent
284+ self ._root = _root if _root else self
285+ self ._read ()
286+
287+ def _read (self ):
288+ self .value = LithtechDat .Color (self ._io , self , self ._root )
289+
290+
256291 class WorldModel (KaitaiStruct ):
257292 def __init__ (self , _io , _parent = None , _root = None ):
258293 self ._io = _io
@@ -311,6 +346,17 @@ def _read(self):
311346 self .sections = self ._io .read_u4le ()
312347
313348
349+ class WopFlag (KaitaiStruct ):
350+ def __init__ (self , _io , _parent = None , _root = None ):
351+ self ._io = _io
352+ self ._parent = _parent
353+ self ._root = _root if _root else self
354+ self ._read ()
355+
356+ def _read (self ):
357+ self .value = self ._io .read_u4le ()
358+
359+
314360 class SkyPortal (KaitaiStruct ):
315361 def __init__ (self , _io , _parent = None , _root = None ):
316362 self ._io = _io
@@ -425,6 +471,17 @@ def _read(self):
425471 self .name = self ._io .read_u4le ()
426472
427473
474+ class WopVec3 (KaitaiStruct ):
475+ def __init__ (self , _io , _parent = None , _root = None ):
476+ self ._io = _io
477+ self ._parent = _parent
478+ self ._root = _root if _root else self
479+ self ._read ()
480+
481+ def _read (self ):
482+ self .value = LithtechDat .Vec3 (self ._io , self , self ._root )
483+
484+
428485 class WorldModelRenderNode (KaitaiStruct ):
429486 def __init__ (self , _io , _parent = None , _root = None ):
430487 self ._io = _io
@@ -499,6 +556,17 @@ def _read(self):
499556
500557
501558
559+ class WopBool (KaitaiStruct ):
560+ def __init__ (self , _io , _parent = None , _root = None ):
561+ self ._io = _io
562+ self ._parent = _parent
563+ self ._root = _root if _root else self
564+ self ._read ()
565+
566+ def _read (self ):
567+ self .value = self ._io .read_u1 ()
568+
569+
502570 class WorldModelPolygon (KaitaiStruct ):
503571 def __init__ (self , num_vertices_indices , _io , _parent = None , _root = None ):
504572 self ._io = _io
@@ -553,6 +621,17 @@ def _read(self):
553621
554622
555623
624+ class WopQuaternion (KaitaiStruct ):
625+ def __init__ (self , _io , _parent = None , _root = None ):
626+ self ._io = _io
627+ self ._parent = _parent
628+ self ._root = _root if _root else self
629+ self ._read ()
630+
631+ def _read (self ):
632+ self .value = LithtechDat .Quaternion (self ._io , self , self ._root )
633+
634+
556635 class Vec3 (KaitaiStruct ):
557636 def __init__ (self , _io , _parent = None , _root = None ):
558637 self ._io = _io
@@ -566,6 +645,17 @@ def _read(self):
566645 self .z = self ._io .read_f4le ()
567646
568647
648+ class WopString (KaitaiStruct ):
649+ def __init__ (self , _io , _parent = None , _root = None ):
650+ self ._io = _io
651+ self ._parent = _parent
652+ self ._root = _root if _root else self
653+ self ._read ()
654+
655+ def _read (self ):
656+ self .value = LithtechDat .StrWithLen2 (self ._io , self , self ._root )
657+
658+
569659 class RenderData (KaitaiStruct ):
570660 def __init__ (self , _io , _parent = None , _root = None ):
571661 self ._io = _io
0 commit comments