From 8747458e311e09abe308062c3f121b5574e4c880 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Mon, 19 Jul 2021 08:44:55 +0200 Subject: [PATCH] Make more complex transport entry rules possible. By having more than one action that results in a unit entering another unit it becomes possible to have more complex rules. An example I have been talking about since 2019 is to use one fake generalized variant to detect transport to transport transfers and then charge a higher move cost. Fake generalize the actions "Transport Load" and "Transport Board" so there are three of each. Add the new fake generalized "Transport Embark 4" as a new variant of embark. 3.2 only for now as only Lexxie has requested support for detecting transport to transport transference when asked. See osdn #42645 --- ai/default/aitools.c | 13 ++++++++ client/gui-qt/dialogs.cpp | 65 +++++++++++++++++++++++++++++++++++++++ client/packhand.c | 5 +++ common/actions.c | 65 +++++++++++++++++++++++++++++++++++++++ common/actions.h | 10 ++++++ doc/README.actions | 25 +++++++++++++++ server/advisors/advgoto.c | 6 ++++ server/barbarian.c | 5 +++ server/unithand.c | 8 +++++ 9 files changed, 202 insertions(+) diff --git a/ai/default/aitools.c b/ai/default/aitools.c index 72b306110c..61c99be540 100644 --- a/ai/default/aitools.c +++ b/ai/default/aitools.c @@ -955,6 +955,13 @@ bool dai_unit_attack(struct ai_type *ait, struct unit *punit, struct tile *ptile /* "Transport Embark 3". */ unit_do_action(unit_owner(punit), punit->id, ptrans->id, 0, "", ACTION_TRANSPORT_EMBARK3); + } else if (!can_unit_survive_at_tile(&(wld.map), punit, ptile) + && ((ptrans = transporter_for_unit_at(punit, ptile))) + && is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK4, + punit, ptrans)) { + /* "Transport Embark 4". */ + unit_do_action(unit_owner(punit), punit->id, ptrans->id, + 0, "", ACTION_TRANSPORT_EMBARK4); } else if (is_action_enabled_unit_on_tile(ACTION_TRANSPORT_DISEMBARK1, punit, ptile, NULL)) { /* "Transport Disembark". */ @@ -1146,6 +1153,12 @@ bool dai_unit_move(struct ai_type *ait, struct unit *punit, struct tile *ptile) punit, ptrans)) { /* "Transport Embark 3". */ paction = action_by_number(ACTION_TRANSPORT_EMBARK3); + } else if (!can_unit_survive_at_tile(&(wld.map), punit, ptile) + && ptrans != NULL + && is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK4, + punit, ptrans)) { + /* "Transport Embark 4". */ + paction = action_by_number(ACTION_TRANSPORT_EMBARK4); } else if (is_action_enabled_unit_on_tile(ACTION_TRANSPORT_DISEMBARK1, punit, ptile, NULL)) { /* "Transport Disembark". */ diff --git a/client/gui-qt/dialogs.cpp b/client/gui-qt/dialogs.cpp index 65751fcead..a3ceb58c92 100644 --- a/client/gui-qt/dialogs.cpp +++ b/client/gui-qt/dialogs.cpp @@ -160,12 +160,17 @@ static void conquer_extras2(QVariant data1, QVariant data2); static void heal_unit(QVariant data1, QVariant data2); static void heal_unit2(QVariant data1, QVariant data2); static void transport_board(QVariant data1, QVariant data2); +static void transport_board2(QVariant data1, QVariant data2); +static void transport_board3(QVariant data1, QVariant data2); static void transport_embark(QVariant data1, QVariant data2); static void transport_embark2(QVariant data1, QVariant data2); static void transport_embark3(QVariant data1, QVariant data2); +static void transport_embark4(QVariant data1, QVariant data2); static void transport_alight(QVariant data1, QVariant data2); static void transport_unload(QVariant data1, QVariant data2); static void transport_load(QVariant data1, QVariant data2); +static void transport_load2(QVariant data1, QVariant data2); +static void transport_load3(QVariant data1, QVariant data2); static void keep_moving(QVariant data1, QVariant data2); static void pillage_something(QVariant data1, QVariant data2); static void action_entry(choice_dialog *cd, @@ -249,10 +254,15 @@ static const QHash af_map_init(void) action_function[ACTION_TRANSPORT_ALIGHT] = transport_alight; action_function[ACTION_TRANSPORT_UNLOAD] = transport_unload; action_function[ACTION_TRANSPORT_LOAD] = transport_load; + action_function[ACTION_TRANSPORT_LOAD2] = transport_load2; + action_function[ACTION_TRANSPORT_LOAD3] = transport_load3; action_function[ACTION_TRANSPORT_BOARD] = transport_board; + action_function[ACTION_TRANSPORT_BOARD2] = transport_board2; + action_function[ACTION_TRANSPORT_BOARD3] = transport_board3; action_function[ACTION_TRANSPORT_EMBARK] = transport_embark; action_function[ACTION_TRANSPORT_EMBARK2] = transport_embark2; action_function[ACTION_TRANSPORT_EMBARK3] = transport_embark3; + action_function[ACTION_TRANSPORT_EMBARK4] = transport_embark4; /* Unit acting against all units at a tile. */ action_function[ACTION_CAPTURE_UNITS] = capture_units; @@ -2469,6 +2479,28 @@ static void transport_board(QVariant data1, QVariant data2) request_do_action(ACTION_TRANSPORT_BOARD, actor_id, target_id, 0, ""); } +/***********************************************************************//** + Action "Transport Board 2" for choice dialog +***************************************************************************/ +static void transport_board2(QVariant data1, QVariant data2) +{ + int actor_id = data1.toInt(); + int target_id = data2.toInt(); + + request_do_action(ACTION_TRANSPORT_BOARD2, actor_id, target_id, 0, ""); +} + +/***********************************************************************//** + Action "Transport Board 3" for choice dialog +***************************************************************************/ +static void transport_board3(QVariant data1, QVariant data2) +{ + int actor_id = data1.toInt(); + int target_id = data2.toInt(); + + request_do_action(ACTION_TRANSPORT_BOARD3, actor_id, target_id, 0, ""); +} + /***********************************************************************//** Action "Transport Embark" for choice dialog ***************************************************************************/ @@ -2502,6 +2534,17 @@ static void transport_embark3(QVariant data1, QVariant data2) request_do_action(ACTION_TRANSPORT_EMBARK3, actor_id, target_id, 0, ""); } +/***********************************************************************//** + Action "Transport Embark 4" for choice dialog +***************************************************************************/ +static void transport_embark4(QVariant data1, QVariant data2) +{ + int actor_id = data1.toInt(); + int target_id = data2.toInt(); + + request_do_action(ACTION_TRANSPORT_EMBARK4, actor_id, target_id, 0, ""); +} + /***********************************************************************//** Action "Transport Unload" for choice dialog ***************************************************************************/ @@ -2524,6 +2567,28 @@ static void transport_load(QVariant data1, QVariant data2) request_do_action(ACTION_TRANSPORT_LOAD, actor_id, target_id, 0, ""); } +/***********************************************************************//** + Action "Transport Load 2" for choice dialog +***************************************************************************/ +static void transport_load2(QVariant data1, QVariant data2) +{ + int actor_id = data1.toInt(); + int target_id = data2.toInt(); + + request_do_action(ACTION_TRANSPORT_LOAD2, actor_id, target_id, 0, ""); +} + +/***********************************************************************//** + Action "Transport Load 3" for choice dialog +***************************************************************************/ +static void transport_load3(QVariant data1, QVariant data2) +{ + int actor_id = data1.toInt(); + int target_id = data2.toInt(); + + request_do_action(ACTION_TRANSPORT_LOAD3, actor_id, target_id, 0, ""); +} + /***********************************************************************//** Action "Transport Alight" for choice dialog ***************************************************************************/ diff --git a/client/packhand.c b/client/packhand.c index 8271713aee..024d02d419 100644 --- a/client/packhand.c +++ b/client/packhand.c @@ -4781,11 +4781,16 @@ static action_id auto_attack_act(const struct act_prob *act_probs) case ACTION_CONVERT: case ACTION_TRANSPORT_ALIGHT: case ACTION_TRANSPORT_BOARD: + case ACTION_TRANSPORT_BOARD2: + case ACTION_TRANSPORT_BOARD3: case ACTION_TRANSPORT_EMBARK: case ACTION_TRANSPORT_EMBARK2: case ACTION_TRANSPORT_EMBARK3: + case ACTION_TRANSPORT_EMBARK4: case ACTION_TRANSPORT_UNLOAD: case ACTION_TRANSPORT_LOAD: + case ACTION_TRANSPORT_LOAD2: + case ACTION_TRANSPORT_LOAD3: case ACTION_TRANSPORT_DISEMBARK1: case ACTION_TRANSPORT_DISEMBARK2: case ACTION_TRANSPORT_DISEMBARK3: diff --git a/common/actions.c b/common/actions.c index 0738bd05c3..d6e46737cc 100644 --- a/common/actions.c +++ b/common/actions.c @@ -1386,6 +1386,14 @@ static void hard_code_actions(void) unit_action_new(ACTION_TRANSPORT_BOARD, ACTRES_TRANSPORT_BOARD, TRUE, FALSE, MAK_STAYS, 0, 0, FALSE); + actions[ACTION_TRANSPORT_BOARD2] = + unit_action_new(ACTION_TRANSPORT_BOARD2, ACTRES_TRANSPORT_BOARD, + TRUE, FALSE, + MAK_STAYS, 0, 0, FALSE); + actions[ACTION_TRANSPORT_BOARD3] = + unit_action_new(ACTION_TRANSPORT_BOARD3, ACTRES_TRANSPORT_BOARD, + TRUE, FALSE, + MAK_STAYS, 0, 0, FALSE); actions[ACTION_TRANSPORT_UNLOAD] = unit_action_new(ACTION_TRANSPORT_UNLOAD, ACTRES_TRANSPORT_UNLOAD, TRUE, FALSE, @@ -1394,6 +1402,14 @@ static void hard_code_actions(void) unit_action_new(ACTION_TRANSPORT_LOAD, ACTRES_TRANSPORT_LOAD, TRUE, FALSE, MAK_STAYS, 0, 0, FALSE); + actions[ACTION_TRANSPORT_LOAD2] = + unit_action_new(ACTION_TRANSPORT_LOAD2, ACTRES_TRANSPORT_LOAD, + TRUE, FALSE, + MAK_STAYS, 0, 0, FALSE); + actions[ACTION_TRANSPORT_LOAD3] = + unit_action_new(ACTION_TRANSPORT_LOAD3, ACTRES_TRANSPORT_LOAD, + TRUE, FALSE, + MAK_STAYS, 0, 0, FALSE); actions[ACTION_TRANSPORT_DISEMBARK1] = unit_action_new(ACTION_TRANSPORT_DISEMBARK1, ACTRES_TRANSPORT_DISEMBARK, @@ -1426,6 +1442,10 @@ static void hard_code_actions(void) unit_action_new(ACTION_TRANSPORT_EMBARK3, ACTRES_TRANSPORT_EMBARK, TRUE, TRUE, MAK_REGULAR, 1, 1, FALSE); + actions[ACTION_TRANSPORT_EMBARK4] = + unit_action_new(ACTION_TRANSPORT_EMBARK4, ACTRES_TRANSPORT_EMBARK, + TRUE, TRUE, + MAK_REGULAR, 1, 1, FALSE); actions[ACTION_SPY_ATTACK] = unit_action_new(ACTION_SPY_ATTACK, ACTRES_SPY_ATTACK, FALSE, TRUE, @@ -7630,16 +7650,26 @@ const char *action_ui_name_ruleset_var_name(int act) return "ui_name_transport_alight"; case ACTION_TRANSPORT_BOARD: return "ui_name_transport_board"; + case ACTION_TRANSPORT_BOARD2: + return "ui_name_transport_board_2"; + case ACTION_TRANSPORT_BOARD3: + return "ui_name_transport_board_3"; case ACTION_TRANSPORT_EMBARK: return "ui_name_transport_embark"; case ACTION_TRANSPORT_EMBARK2: return "ui_name_transport_embark_2"; case ACTION_TRANSPORT_EMBARK3: return "ui_name_transport_embark_3"; + case ACTION_TRANSPORT_EMBARK4: + return "ui_name_transport_embark_4"; case ACTION_TRANSPORT_UNLOAD: return "ui_name_transport_unload"; case ACTION_TRANSPORT_LOAD: return "ui_name_transport_load"; + case ACTION_TRANSPORT_LOAD2: + return "ui_name_transport_load_2"; + case ACTION_TRANSPORT_LOAD3: + return "ui_name_transport_load_3"; case ACTION_TRANSPORT_DISEMBARK1: return "ui_name_transport_disembark"; case ACTION_TRANSPORT_DISEMBARK2: @@ -7935,17 +7965,22 @@ const char *action_ui_name_default(int act) /* TRANS: _Alight (100% chance of success). */ return N_("%sAlight%s"); case ACTION_TRANSPORT_BOARD: + case ACTION_TRANSPORT_BOARD2: + case ACTION_TRANSPORT_BOARD3: /* TRANS: _Board (100% chance of success). */ return N_("%sBoard%s"); case ACTION_TRANSPORT_EMBARK: case ACTION_TRANSPORT_EMBARK2: case ACTION_TRANSPORT_EMBARK3: + case ACTION_TRANSPORT_EMBARK4: /* TRANS: _Embark (100% chance of success). */ return N_("%sEmbark%s"); case ACTION_TRANSPORT_UNLOAD: /* TRANS: _Unload (100% chance of success). */ return N_("%sUnload%s"); case ACTION_TRANSPORT_LOAD: + case ACTION_TRANSPORT_LOAD2: + case ACTION_TRANSPORT_LOAD3: /* TRANS: _Load (100% chance of success). */ return N_("%sLoad%s"); case ACTION_TRANSPORT_DISEMBARK1: @@ -8075,11 +8110,16 @@ const char *action_min_range_ruleset_var_name(int act) case ACTION_IRRIGATE: case ACTION_TRANSPORT_ALIGHT: case ACTION_TRANSPORT_BOARD: + case ACTION_TRANSPORT_BOARD2: + case ACTION_TRANSPORT_BOARD3: case ACTION_TRANSPORT_EMBARK: case ACTION_TRANSPORT_EMBARK2: case ACTION_TRANSPORT_EMBARK3: + case ACTION_TRANSPORT_EMBARK4: case ACTION_TRANSPORT_UNLOAD: case ACTION_TRANSPORT_LOAD: + case ACTION_TRANSPORT_LOAD2: + case ACTION_TRANSPORT_LOAD3: case ACTION_TRANSPORT_DISEMBARK1: case ACTION_TRANSPORT_DISEMBARK2: case ACTION_TRANSPORT_DISEMBARK3: @@ -8288,11 +8328,16 @@ const char *action_max_range_ruleset_var_name(int act) case ACTION_IRRIGATE: case ACTION_TRANSPORT_ALIGHT: case ACTION_TRANSPORT_BOARD: + case ACTION_TRANSPORT_BOARD2: + case ACTION_TRANSPORT_BOARD3: case ACTION_TRANSPORT_EMBARK: case ACTION_TRANSPORT_EMBARK2: case ACTION_TRANSPORT_EMBARK3: + case ACTION_TRANSPORT_EMBARK4: case ACTION_TRANSPORT_UNLOAD: case ACTION_TRANSPORT_LOAD: + case ACTION_TRANSPORT_LOAD2: + case ACTION_TRANSPORT_LOAD3: case ACTION_TRANSPORT_DISEMBARK1: case ACTION_TRANSPORT_DISEMBARK2: case ACTION_TRANSPORT_DISEMBARK3: @@ -8518,11 +8563,16 @@ const char *action_target_kind_ruleset_var_name(int act) case ACTION_IRRIGATE: case ACTION_TRANSPORT_ALIGHT: case ACTION_TRANSPORT_BOARD: + case ACTION_TRANSPORT_BOARD2: + case ACTION_TRANSPORT_BOARD3: case ACTION_TRANSPORT_EMBARK: case ACTION_TRANSPORT_EMBARK2: case ACTION_TRANSPORT_EMBARK3: + case ACTION_TRANSPORT_EMBARK4: case ACTION_TRANSPORT_UNLOAD: case ACTION_TRANSPORT_LOAD: + case ACTION_TRANSPORT_LOAD2: + case ACTION_TRANSPORT_LOAD3: case ACTION_TRANSPORT_DISEMBARK1: case ACTION_TRANSPORT_DISEMBARK2: case ACTION_TRANSPORT_DISEMBARK3: @@ -9032,11 +9082,16 @@ const char *action_actor_consuming_always_ruleset_var_name(action_id act) case ACTION_IRRIGATE: case ACTION_TRANSPORT_ALIGHT: case ACTION_TRANSPORT_BOARD: + case ACTION_TRANSPORT_BOARD2: + case ACTION_TRANSPORT_BOARD3: case ACTION_TRANSPORT_EMBARK: case ACTION_TRANSPORT_EMBARK2: case ACTION_TRANSPORT_EMBARK3: + case ACTION_TRANSPORT_EMBARK4: case ACTION_TRANSPORT_UNLOAD: case ACTION_TRANSPORT_LOAD: + case ACTION_TRANSPORT_LOAD2: + case ACTION_TRANSPORT_LOAD3: case ACTION_TRANSPORT_DISEMBARK1: case ACTION_TRANSPORT_DISEMBARK2: case ACTION_TRANSPORT_DISEMBARK3: @@ -9199,11 +9254,16 @@ const char *action_blocked_by_ruleset_var_name(const struct action *act) case ACTION_IRRIGATE: case ACTION_TRANSPORT_ALIGHT: case ACTION_TRANSPORT_BOARD: + case ACTION_TRANSPORT_BOARD2: + case ACTION_TRANSPORT_BOARD3: case ACTION_TRANSPORT_EMBARK: case ACTION_TRANSPORT_EMBARK2: case ACTION_TRANSPORT_EMBARK3: + case ACTION_TRANSPORT_EMBARK4: case ACTION_TRANSPORT_UNLOAD: case ACTION_TRANSPORT_LOAD: + case ACTION_TRANSPORT_LOAD2: + case ACTION_TRANSPORT_LOAD3: case ACTION_TRANSPORT_DISEMBARK1: case ACTION_TRANSPORT_DISEMBARK2: case ACTION_TRANSPORT_DISEMBARK3: @@ -9334,11 +9394,16 @@ action_post_success_forced_ruleset_var_name(const struct action *act) case ACTION_IRRIGATE: case ACTION_TRANSPORT_ALIGHT: case ACTION_TRANSPORT_BOARD: + case ACTION_TRANSPORT_BOARD2: + case ACTION_TRANSPORT_BOARD3: case ACTION_TRANSPORT_EMBARK: case ACTION_TRANSPORT_EMBARK2: case ACTION_TRANSPORT_EMBARK3: + case ACTION_TRANSPORT_EMBARK4: case ACTION_TRANSPORT_UNLOAD: case ACTION_TRANSPORT_LOAD: + case ACTION_TRANSPORT_LOAD2: + case ACTION_TRANSPORT_LOAD3: case ACTION_TRANSPORT_DISEMBARK1: case ACTION_TRANSPORT_DISEMBARK2: case ACTION_TRANSPORT_DISEMBARK3: diff --git a/common/actions.h b/common/actions.h index cad3c947b3..80876f14fe 100644 --- a/common/actions.h +++ b/common/actions.h @@ -282,6 +282,16 @@ extern "C" { #define SPECENUM_VALUE107NAME "Spy Escape" #define SPECENUM_VALUE108 ACTION_TRANSPORT_LOAD #define SPECENUM_VALUE108NAME "Transport Load" +#define SPECENUM_VALUE109 ACTION_TRANSPORT_LOAD2 +#define SPECENUM_VALUE109NAME "Transport Load 2" +#define SPECENUM_VALUE110 ACTION_TRANSPORT_LOAD3 +#define SPECENUM_VALUE110NAME "Transport Load 3" +#define SPECENUM_VALUE111 ACTION_TRANSPORT_BOARD2 +#define SPECENUM_VALUE111NAME "Transport Board 2" +#define SPECENUM_VALUE112 ACTION_TRANSPORT_BOARD3 +#define SPECENUM_VALUE112NAME "Transport Board_3" +#define SPECENUM_VALUE113 ACTION_TRANSPORT_EMBARK4 +#define SPECENUM_VALUE113NAME "Transport Embark 4" #define SPECENUM_BITVECTOR bv_actions #define SPECENUM_COUNT ACTION_COUNT #include "specenum_gen.h" diff --git a/doc/README.actions b/doc/README.actions index 6903a107c8..d723f65554 100644 --- a/doc/README.actions +++ b/doc/README.actions @@ -660,6 +660,16 @@ Actions done by a unit against another unit * loading won't cause a situation with more than 5 recursive transports * target must be visible to the actor. +"Transport Load 2" - Load the target unit into the actor unit. + * UI name can be set using ui_name_transport_load_2 + * A copy of "Transport Load". + * See "Transport Load" for everything else. + +"Transport Load 3" - Load the target unit into the actor unit. + * UI name can be set using ui_name_transport_load_3 + * A copy of "Transport Load". + * See "Transport Load" for everything else. + "Transport Board" - Enter target transport on the same tile. * UI name can be set using ui_name_transport_board * the actor unit can't currently be transported by the target unit. @@ -683,6 +693,16 @@ Actions done by a unit against another unit transport_cap field. * target must be visible to the actor. +"Transport Board 2" - Enter target transport on the same tile. + * UI name can be set using ui_name_transport_board_2 + * A copy of "Transport Board". + * See "Transport Board" for everything else. + +"Transport Board 3" - Enter target transport on the same tile. + * UI name can be set using ui_name_transport_board_3 + * A copy of "Transport Board". + * See "Transport Board" for everything else. + "Transport Embark" - Enter target transport on a different tile. * UI name can be set using ui_name_transport_embark * the actor unit must be on a tile next to the target. @@ -728,6 +748,11 @@ Actions done by a unit against another unit * A copy of "Transport Embark". * See "Transport Embark" for everything else. +"Transport Embark 4" - Enter target transport on a different tile. + * UI name can be set using ui_name_transport_embark_4 + * A copy of "Transport Embark". + * See "Transport Embark" for everything else. + Actions done by a unit against all units at a tile ================================================== "Capture Units" - steal the target units. diff --git a/server/advisors/advgoto.c b/server/advisors/advgoto.c index c1db96d00f..f336d84101 100644 --- a/server/advisors/advgoto.c +++ b/server/advisors/advgoto.c @@ -182,6 +182,12 @@ static bool adv_unit_move(struct unit *punit, struct tile *ptile) punit, ptrans)) { /* "Transport Embark 3". */ paction = action_by_number(ACTION_TRANSPORT_EMBARK3); + } else if (!can_unit_survive_at_tile(&(wld.map), punit, ptile) + && ptrans != NULL + && is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK4, + punit, ptrans)) { + /* "Transport Embark 4". */ + paction = action_by_number(ACTION_TRANSPORT_EMBARK4); } else if (is_action_enabled_unit_on_tile(ACTION_TRANSPORT_DISEMBARK1, punit, ptile, NULL)) { /* "Transport Disembark". */ diff --git a/server/barbarian.c b/server/barbarian.c index 7f0e878a1f..040846e161 100644 --- a/server/barbarian.c +++ b/server/barbarian.c @@ -418,6 +418,11 @@ bool unleash_barbarians(struct tile *ptile) /* Load */ unit_do_action(unit_owner(punit2), punit2->id, boat->id, 0, "", ACTION_TRANSPORT_EMBARK3); + } else if (is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK4, + punit2, boat)) { + /* Load */ + unit_do_action(unit_owner(punit2), punit2->id, boat->id, + 0, "", ACTION_TRANSPORT_EMBARK4); } } } unit_list_iterate_safe_end; diff --git a/server/unithand.c b/server/unithand.c index 392aa6a331..25f8665a5b 100644 --- a/server/unithand.c +++ b/server/unithand.c @@ -5351,6 +5351,14 @@ bool unit_move_handling(struct unit *punit, struct tile *pdesttile, return unit_perform_action(pplayer, punit->id, ptrans->id, NO_TARGET, "", ACTION_TRANSPORT_EMBARK3, ACT_REQ_PLAYER); + } else if (!can_unit_survive_at_tile(&(wld.map), punit, pdesttile) + && ((ptrans = transporter_for_unit_at(punit, pdesttile))) + && is_action_enabled_unit_on_unit(ACTION_TRANSPORT_EMBARK4, + punit, ptrans)) { + /* "Transport Embark 4". */ + return unit_perform_action(pplayer, punit->id, ptrans->id, + NO_TARGET, "", ACTION_TRANSPORT_EMBARK4, + ACT_REQ_PLAYER); } else if (is_action_enabled_unit_on_tile(ACTION_TRANSPORT_DISEMBARK1, punit, pdesttile, NULL)) { /* "Transport Disembark". */ -- 2.30.2