From f372a2bb350f31abb2abccbde40903c9609cabb6 Mon Sep 17 00:00:00 2001 From: heinezen Date: Mon, 25 Nov 2024 22:08:07 +0100 Subject: [PATCH] convert Change type of 'effect_apply_type' to 'uint8_t'. --- .../value_object/read/media/datfile/lookup_dicts.py | 9 +++++---- openage/convert/value_object/read/media/datfile/tech.py | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/openage/convert/value_object/read/media/datfile/lookup_dicts.py b/openage/convert/value_object/read/media/datfile/lookup_dicts.py index 2fd46f118d..dfd2206612 100644 --- a/openage/convert/value_object/read/media/datfile/lookup_dicts.py +++ b/openage/convert/value_object/read/media/datfile/lookup_dicts.py @@ -285,7 +285,7 @@ EFFECT_APPLY_TYPE = { # unused assignage: a = -1, b = -1, c = -1, d = 0 - -1: "DISABLED", + 255: "DISABLED", # if a != -1: a == unit_id, else b == unit_class_id; c = # attribute_id, d = new_value 0: "ATTRIBUTE_ABSSET", @@ -340,9 +340,10 @@ 102: "TECH_TOGGLE", # d == research_id 103: "TECH_TIME_MODIFY", # a == research_id, if c == 0: d==absval else d==relval - -54: "UNKNOWN", # 199: "UNKNOWN", - -55: "UNKNOWN", # 200: "UNKNOWN", - -56: "UNKNOWN", # 201: "UNKNOWN", + # unknown; used in DE2 BfG + 199: "UNKNOWN", + 200: "UNKNOWN", + 201: "UNKNOWN", # attribute_id: # 0: hit points diff --git a/openage/convert/value_object/read/media/datfile/tech.py b/openage/convert/value_object/read/media/datfile/tech.py index a6720d3c25..54c350dadd 100644 --- a/openage/convert/value_object/read/media/datfile/tech.py +++ b/openage/convert/value_object/read/media/datfile/tech.py @@ -1,4 +1,4 @@ -# Copyright 2013-2023 the openage authors. See copying.md for legal info. +# Copyright 2013-2024 the openage authors. See copying.md for legal info. # TODO pylint: disable=C,R from __future__ import annotations @@ -31,7 +31,7 @@ def get_data_format_members( """ data_format = [ (READ_GEN, "type_id", StorageType.ID_MEMBER, EnumLookupMember( - raw_type="int8_t", + raw_type="uint8_t", type_name="effect_apply_type", lookup_dict=EFFECT_APPLY_TYPE )),