Skip to content

Commit

Permalink
fix move unit action
Browse files Browse the repository at this point in the history
  • Loading branch information
sethmachine committed Nov 24, 2024
1 parent 98060c5 commit 52956a1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def _decode(
assert decoded_action.action_id == MoveUnitAction.action_id().id
assert rich_chk_decode_context.rich_mrgn_lookup is not None
# Location - source location in "Order" and "Move Unit", dest location in "Move Location"
maybe_destination_location = (
maybe_source_location = (
rich_chk_decode_context.rich_mrgn_lookup.get_location_by_id(
decoded_action.location_id
)
)
maybe_source_location = (
maybe_destination_location = (
rich_chk_decode_context.rich_mrgn_lookup.get_location_by_id(
decoded_action.second_group
)
Expand Down Expand Up @@ -74,12 +74,12 @@ def _encode(
assert maybe_destination_loc_id is not None
assert maybe_source_loc_id is not None
return DecodedTriggerAction(
_location_id=maybe_destination_loc_id,
_location_id=maybe_source_loc_id,
_text_string_id=0,
_wav_string_id=0,
_time=0,
_first_group=RichChkEnumTranscoder.encode_enum(rich_action.group),
_second_group=maybe_source_loc_id,
_second_group=maybe_destination_loc_id,
_action_argument_type=RichChkEnumTranscoder.encode_enum(rich_action.unit),
_action_id=rich_action.action_id().id,
_quantifier_or_switch_or_order=rich_action.amount,
Expand Down

0 comments on commit 52956a1

Please sign in to comment.