From b959fb97c2db16ba7e04584868d4100cdff4795a Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sat, 7 Sep 2024 11:18:26 +0100 Subject: [PATCH] Add PropInt and PropBool --- project/code/LGS/Database/Chunks/Property.cs | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/project/code/LGS/Database/Chunks/Property.cs b/project/code/LGS/Database/Chunks/Property.cs index 001efeb..28804c8 100644 --- a/project/code/LGS/Database/Chunks/Property.cs +++ b/project/code/LGS/Database/Chunks/Property.cs @@ -54,6 +54,28 @@ public class PropGeneric : Property } } +public class PropBool : Property +{ + public bool value; + + public override void Read(BinaryReader reader) + { + base.Read(reader); + value = reader.ReadInt32() != 0; + } +} + +public class PropInt : Property +{ + public int value; + + public override void Read(BinaryReader reader) + { + base.Read(reader); + value = reader.ReadInt32(); + } +} + public class PropLabel : Property { public string value;