|
13 | 13 |
|
14 | 14 | import typing |
15 | 15 |
|
| 16 | +from .....nyan.nyan_structs import MemberOperator |
16 | 17 | from ....entity_object.conversion.aoc.genie_tech import GenieTechEffectBundleGroup |
17 | 18 | from ....entity_object.conversion.aoc.genie_unit import GenieBuildingLineGroup |
18 | 19 | from ....entity_object.conversion.converter_object import RawAPIObject |
|
22 | 23 | if typing.TYPE_CHECKING: |
23 | 24 | from openage.convert.entity_object.conversion.aoc.genie_unit import GenieGameEntityGroup |
24 | 25 | from openage.convert.entity_object.conversion.converter_object import ConverterObjectGroup |
25 | | - from openage.nyan.nyan_structs import MemberOperator |
26 | 26 |
|
27 | 27 |
|
28 | 28 | class AoCUpgradeAttributeSubprocessor: |
@@ -414,7 +414,7 @@ def ballistics_upgrade( |
414 | 414 | nyan_patch_raw_api_object.set_patch_target(patch_target_forward_ref) |
415 | 415 |
|
416 | 416 | nyan_patch_raw_api_object.add_raw_patch_member( |
417 | | - "target_mode", target_mode, "engine.ability.type.Projectile", operator |
| 417 | + "target_mode", target_mode, "engine.ability.type.Projectile", MemberOperator.ASSIGN |
418 | 418 | ) |
419 | 419 |
|
420 | 420 | patch_forward_ref = ForwardRef(converter_group, nyan_patch_ref) |
@@ -459,7 +459,7 @@ def ballistics_upgrade( |
459 | 459 | nyan_patch_raw_api_object.set_patch_target(patch_target_forward_ref) |
460 | 460 |
|
461 | 461 | nyan_patch_raw_api_object.add_raw_patch_member( |
462 | | - "target_mode", target_mode, "engine.ability.type.Projectile", operator |
| 462 | + "target_mode", target_mode, "engine.ability.type.Projectile", MemberOperator.ASSIGN |
463 | 463 | ) |
464 | 464 |
|
465 | 465 | patch_forward_ref = ForwardRef(converter_group, nyan_patch_ref) |
@@ -1489,6 +1489,9 @@ def max_projectiles_upgrade( |
1489 | 1489 |
|
1490 | 1490 | patches = [] |
1491 | 1491 |
|
| 1492 | + if not line.is_projectile_shooter(): |
| 1493 | + return patches |
| 1494 | + |
1492 | 1495 | obj_id = converter_group.get_id() |
1493 | 1496 | if isinstance(converter_group, GenieTechEffectBundleGroup): |
1494 | 1497 | tech_lookup_dict = internal_name_lookups.get_tech_lookups(dataset.game_version) |
@@ -1573,6 +1576,9 @@ def min_projectiles_upgrade( |
1573 | 1576 |
|
1574 | 1577 | patches = [] |
1575 | 1578 |
|
| 1579 | + if not line.is_projectile_shooter(): |
| 1580 | + return patches |
| 1581 | + |
1576 | 1582 | obj_id = converter_group.get_id() |
1577 | 1583 | if isinstance(converter_group, GenieTechEffectBundleGroup): |
1578 | 1584 | tech_lookup_dict = internal_name_lookups.get_tech_lookups(dataset.game_version) |
|
0 commit comments