summaryrefslogtreecommitdiff
path: root/Thronefall_1_57/Decompile/I2.Loc/LanguageData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Thronefall_1_57/Decompile/I2.Loc/LanguageData.cs')
-rw-r--r--Thronefall_1_57/Decompile/I2.Loc/LanguageData.cs67
1 files changed, 67 insertions, 0 deletions
diff --git a/Thronefall_1_57/Decompile/I2.Loc/LanguageData.cs b/Thronefall_1_57/Decompile/I2.Loc/LanguageData.cs
new file mode 100644
index 0000000..566d28a
--- /dev/null
+++ b/Thronefall_1_57/Decompile/I2.Loc/LanguageData.cs
@@ -0,0 +1,67 @@
+using System;
+
+namespace I2.Loc;
+
+[Serializable]
+public class LanguageData
+{
+ public string Name;
+
+ public string Code;
+
+ public byte Flags;
+
+ [NonSerialized]
+ public bool Compressed;
+
+ public bool IsEnabled()
+ {
+ return (Flags & 1) == 0;
+ }
+
+ public void SetEnabled(bool bEnabled)
+ {
+ if (bEnabled)
+ {
+ Flags = (byte)(Flags & 0xFFFFFFFEu);
+ }
+ else
+ {
+ Flags |= 1;
+ }
+ }
+
+ public bool IsLoaded()
+ {
+ return (Flags & 4) == 0;
+ }
+
+ public bool CanBeUnloaded()
+ {
+ return (Flags & 2) == 0;
+ }
+
+ public void SetLoaded(bool loaded)
+ {
+ if (loaded)
+ {
+ Flags = (byte)(Flags & 0xFFFFFFFBu);
+ }
+ else
+ {
+ Flags |= 4;
+ }
+ }
+
+ public void SetCanBeUnLoaded(bool allowUnloading)
+ {
+ if (allowUnloading)
+ {
+ Flags = (byte)(Flags & 0xFFFFFFFDu);
+ }
+ else
+ {
+ Flags |= 2;
+ }
+ }
+}