From 0413cc8fbdcf70ac20ebe2dd0db46eca2fa9e3c6 Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Mon, 19 Jul 2021 08:36:58 +0200 Subject: [PATCH] Qt client: support Transport Embark 2 and 3. The Qt client still needs a function for each action in its action selection dialog. Add support for "Transport Embark 2" and "Transport Embark 3". See osdn #42644 --- client/gui-qt/dialogs.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/client/gui-qt/dialogs.cpp b/client/gui-qt/dialogs.cpp index b79ab88f30..65751fcead 100644 --- a/client/gui-qt/dialogs.cpp +++ b/client/gui-qt/dialogs.cpp @@ -161,6 +161,8 @@ 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_embark(QVariant data1, QVariant data2); +static void transport_embark2(QVariant data1, QVariant data2); +static void transport_embark3(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); @@ -249,6 +251,8 @@ static const QHash af_map_init(void) action_function[ACTION_TRANSPORT_LOAD] = transport_load; action_function[ACTION_TRANSPORT_BOARD] = transport_board; action_function[ACTION_TRANSPORT_EMBARK] = transport_embark; + action_function[ACTION_TRANSPORT_EMBARK2] = transport_embark2; + action_function[ACTION_TRANSPORT_EMBARK3] = transport_embark3; /* Unit acting against all units at a tile. */ action_function[ACTION_CAPTURE_UNITS] = capture_units; @@ -2476,6 +2480,28 @@ static void transport_embark(QVariant data1, QVariant data2) request_do_action(ACTION_TRANSPORT_EMBARK, actor_id, target_id, 0, ""); } +/***********************************************************************//** + Action "Transport Embark 2" for choice dialog +***************************************************************************/ +static void transport_embark2(QVariant data1, QVariant data2) +{ + int actor_id = data1.toInt(); + int target_id = data2.toInt(); + + request_do_action(ACTION_TRANSPORT_EMBARK2, actor_id, target_id, 0, ""); +} + +/***********************************************************************//** + Action "Transport Embark 3" for choice dialog +***************************************************************************/ +static void transport_embark3(QVariant data1, QVariant data2) +{ + int actor_id = data1.toInt(); + int target_id = data2.toInt(); + + request_do_action(ACTION_TRANSPORT_EMBARK3, actor_id, target_id, 0, ""); +} + /***********************************************************************//** Action "Transport Unload" for choice dialog ***************************************************************************/ -- 2.30.2