Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions copying.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ _the openage authors_ are:
| Jason Lu | jasonlu, lugt | lu.gt à 163 dawt com |
| Luca Pizzagalli | lucapizzagalli | web à lucapizzagalli dawt com |
| Erwan Billard | iacker | 82095453+iacker à users dawt noreply dawt github dawt com |
| Deniz Kökden | denizkoekden | koekdendeniz à gmail dawt com |

If you're a first-time committer, add yourself to the above list. This is not
just for legal reasons, but also to keep an overview of all those nicknames.
Expand Down
4 changes: 2 additions & 2 deletions openage/convert/entity_object/export/texture.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(
self.best_packer_hints: tuple | None = None

self.image_data: TextureImage | None = None
self.image_metadata: list[dict[str, int]] = []
self.image_metadata: dict[str, typing.Any] = {}

spam("creating Texture from %s", repr(input_data))

Expand Down Expand Up @@ -149,7 +149,7 @@ def _to_subtextures(
else:
return [subtex]

def get_metadata(self) -> list[dict[str, int]]:
def get_metadata(self) -> dict[str, typing.Any]:
"""
Get the image metadata information.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import typing

from .....nyan.nyan_structs import MemberOperator
from ....entity_object.conversion.aoc.genie_tech import GenieTechEffectBundleGroup
from ....entity_object.conversion.aoc.genie_unit import GenieBuildingLineGroup
from ....entity_object.conversion.converter_object import RawAPIObject
Expand All @@ -22,7 +23,6 @@
if typing.TYPE_CHECKING:
from openage.convert.entity_object.conversion.aoc.genie_unit import GenieGameEntityGroup
from openage.convert.entity_object.conversion.converter_object import ConverterObjectGroup
from openage.nyan.nyan_structs import MemberOperator


class AoCUpgradeAttributeSubprocessor:
Expand Down Expand Up @@ -414,7 +414,7 @@ def ballistics_upgrade(
nyan_patch_raw_api_object.set_patch_target(patch_target_forward_ref)

nyan_patch_raw_api_object.add_raw_patch_member(
"target_mode", target_mode, "engine.ability.type.Projectile", operator
"target_mode", target_mode, "engine.ability.type.Projectile", MemberOperator.ASSIGN
)

patch_forward_ref = ForwardRef(converter_group, nyan_patch_ref)
Expand Down Expand Up @@ -459,7 +459,7 @@ def ballistics_upgrade(
nyan_patch_raw_api_object.set_patch_target(patch_target_forward_ref)

nyan_patch_raw_api_object.add_raw_patch_member(
"target_mode", target_mode, "engine.ability.type.Projectile", operator
"target_mode", target_mode, "engine.ability.type.Projectile", MemberOperator.ASSIGN
)

patch_forward_ref = ForwardRef(converter_group, nyan_patch_ref)
Expand Down Expand Up @@ -1489,6 +1489,9 @@ def max_projectiles_upgrade(

patches = []

if not line.is_projectile_shooter():
return patches

obj_id = converter_group.get_id()
if isinstance(converter_group, GenieTechEffectBundleGroup):
tech_lookup_dict = internal_name_lookups.get_tech_lookups(dataset.game_version)
Expand Down Expand Up @@ -1573,6 +1576,9 @@ def min_projectiles_upgrade(

patches = []

if not line.is_projectile_shooter():
return patches

obj_id = converter_group.get_id()
if isinstance(converter_group, GenieTechEffectBundleGroup):
tech_lookup_dict = internal_name_lookups.get_tech_lookups(dataset.game_version)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

import typing

from .....nyan.nyan_structs import MemberOperator
from ....entity_object.conversion.aoc.genie_tech import GenieTechEffectBundleGroup
from ....entity_object.conversion.converter_object import RawAPIObject
from ....service.conversion import internal_name_lookups
Expand All @@ -21,7 +22,6 @@
if typing.TYPE_CHECKING:
from openage.convert.entity_object.conversion.aoc.genie_unit import GenieGameEntityGroup
from openage.convert.entity_object.conversion.converter_object import ConverterObjectGroup
from openage.nyan.nyan_structs import MemberOperator


class RoRUpgradeAttributeSubprocessor:
Expand Down Expand Up @@ -105,7 +105,7 @@ def ballistics_upgrade(
nyan_patch_raw_api_object.set_patch_target(patch_target_forward_ref)

nyan_patch_raw_api_object.add_raw_patch_member(
"target_mode", target_mode, "engine.ability.type.Projectile", operator
"target_mode", target_mode, "engine.ability.type.Projectile", MemberOperator.ASSIGN
)

patch_forward_ref = ForwardRef(converter_group, nyan_patch_ref)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@
200: "UNKNOWN",
201: "UNKNOWN",
# unknown
31: "UNKNOWN",
36: "UNKNOWN",
40: "UNKNOWN",
202: "UNKNOWN",
204: "UNKNOWN",
Expand Down
5 changes: 1 addition & 4 deletions openage/nyan/nyan_structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,16 +597,13 @@ def get_type(self) -> MemberType | NyanObject:
"""
return self._member_type

def get_real_type(self) -> MemberType:
def get_real_type(self) -> MemberType | NyanObject:
"""
Returns the member type without wrapping modifiers.
"""
if self.is_modifier():
return self._element_types[0].get_real_type()

if not isinstance(self._member_type, MemberType):
raise TypeError(f"{self!r}: member type is not a primitive or collection type")

return self._member_type

def get_element_types(self) -> tuple[NyanMemberType, ...]:
Expand Down
Loading