Author: sveinung Date: Tue Oct 4 13:09:27 2016 New Revision: 33989 URL: http://svn.gna.org/viewcvs/freeciv?rev=33989&view=rev Log: Action not enabled explain disembark and Trireme.
Explain when an action can't be performed because it includes a move and movement is illegal because the actor can't disembark (unload) from its transport or because the target is too far from safe terrain. Reuse the explanation text from when a move fails. No detection included. See patch #7752 Modified: trunk/server/unithand.c trunk/server/unithand.h Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=33989&r1=33988&r2=33989&view=diff ============================================================================== --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Tue Oct 4 13:09:27 2016 @@ -1216,6 +1216,19 @@ _("%s can't do anything to an unknown target tile."), unit_name_translation(punit)); break; + case ANEK_TRIREME_MOVE: + notify_player(pplayer, target_tile, E_BAD_COMMAND, ftc_server, + _("%s cannot move that far from the coast line."), + unit_link(punit)); + break; + case ANEK_DISEMBARK_ACT: + notify_player(pplayer, unit_tile(punit), E_BAD_COMMAND, ftc_server, + _("%s cannot disembark outside of a city or a native base " + "for %s."), + unit_link(punit), + utype_name_translation( + unit_type_get(unit_transport_get(punit)))); + break; case ANEK_TGT_UNREACHABLE: notify_player(pplayer, target_tile, E_BAD_COMMAND, ftc_server, _("%s can't do anything since there is an unreachable " @@ -1661,6 +1674,19 @@ _("%s can't do %s to an unknown tile."), unit_name_translation(actor), action_get_ui_name(stopped_action)); + break; + case ANEK_TRIREME_MOVE: + notify_player(pplayer, target_tile, event, ftc_server, + _("%s cannot move that far from the coast line."), + unit_link(actor)); + break; + case ANEK_DISEMBARK_ACT: + notify_player(pplayer, unit_tile(actor), event, ftc_server, + _("%s cannot disembark outside of a city or a native base " + "for %s."), + unit_link(actor), + utype_name_translation( + unit_type_get(unit_transport_get(actor)))); break; case ANEK_TGT_UNREACHABLE: notify_player(pplayer, target_tile, Modified: trunk/server/unithand.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.h?rev=33989&r1=33988&r2=33989&view=diff ============================================================================== --- trunk/server/unithand.h (original) +++ trunk/server/unithand.h Tue Oct 4 13:09:27 2016 @@ -63,6 +63,11 @@ ANEK_DISTANCE_NEAR, /* Explanation: can't be done because target is too far away. */ ANEK_DISTANCE_FAR, + /* Explanation: can't be done to targets that far from the coast line. */ + ANEK_TRIREME_MOVE, + /* Explanation: can't be done because the actor can't exit its + * transport. */ + ANEK_DISEMBARK_ACT, /* Explanation: actor can't reach unit at target. */ ANEK_TGT_UNREACHABLE, /* Explanation: the action is disabled in this scenario. */ _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits