summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLed Mitz <smoothshifter@tuta.io>2023-04-14 17:02:36 +0000
committerLed Mitz <smoothshifter@tuta.io>2023-04-14 17:02:36 +0000
commit3efb70c0054856e2fd6558242b9d002df14cf3ac (patch)
tree471f0fdcb1eb9fd88cb23d60aa8c89797ee0bb23
parente35d9b80bb54a36d773c3dd5afad92968fcd4553 (diff)
parent34c8f9d0c646de4c71d8689f16849bf49635f6f0 (diff)
downloadtools-3efb70c0054856e2fd6558242b9d002df14cf3ac.tar.gz
tools-3efb70c0054856e2fd6558242b9d002df14cf3ac.tar.bz2
tools-3efb70c0054856e2fd6558242b9d002df14cf3ac.tar.xz
tools-3efb70c0054856e2fd6558242b9d002df14cf3ac.zip
Merge branch 'evolved_py_gender' into 'master'
Evolved.py gender support See merge request legacy/tools!31
-rwxr-xr-xevolved.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/evolved.py b/evolved.py
index cdee105..c3e6128 100755
--- a/evolved.py
+++ b/evolved.py
@@ -120,6 +120,12 @@ struct Item
ast::script::ScriptBody use_script;
ast::script::ScriptBody equip_script;
};
+
+# Gender
+ SEX_FEMALE: 0
+ SEX_MALE: 1
+ SEX_ANY: 2
+
enum class SEX : uint8_t
{
FEMALE = 0,
@@ -310,6 +316,14 @@ def newItemDB():
#x.sl=sti(a)
elif "\tGender:" in a: # allways 2 in tmwa atm
x.gender=sti(a)
+ if x.gender == "SEX_FEMALE" or x.gender == "0":
+ x.gender="0"
+ elif x.gender == "SEX_MALE" or x.gender == "1":
+ x.gender="1"
+ elif x.gender == "SEX_ANY" or x.gender == "2":
+ x.gender="2"
+ else:
+ x.gender="2"
elif "\tSubtype:" in a:
x.subtype=sti(a)
elif "\tDisabled: true" in a: