From 52956a15c7a9fd8b5a7862f23930035fc9ec9f7b Mon Sep 17 00:00:00 2001 From: sethmachine Date: Sun, 24 Nov 2024 18:52:26 -0500 Subject: [PATCH] fix move unit action --- .../transcoders/trig/actions/move_unit_transcoder.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/richchk/transcoder/richchk/transcoders/trig/actions/move_unit_transcoder.py b/src/richchk/transcoder/richchk/transcoders/trig/actions/move_unit_transcoder.py index 122977f..d8785fa 100644 --- a/src/richchk/transcoder/richchk/transcoders/trig/actions/move_unit_transcoder.py +++ b/src/richchk/transcoder/richchk/transcoders/trig/actions/move_unit_transcoder.py @@ -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 ) @@ -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,