Author: sveinung Date: Tue Jan 6 13:06:04 2015 New Revision: 27553 URL: http://svn.gna.org/viewcvs/freeciv?rev=27553&view=rev Log: Be precise about plural form when talking about actor and target kind.
Up unit now all enabler controlled actions have had a single target. This is about to change. Capture unit will capture *all* units at a tile. This will require more precision when talking about target kind. See patch #5662 Modified: branches/S2_6/common/actions.c branches/S2_6/common/actions.h Modified: branches/S2_6/common/actions.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/actions.c?rev=27553&r1=27552&r2=27553&view=diff ============================================================================== --- branches/S2_6/common/actions.c (original) +++ branches/S2_6/common/actions.c Tue Jan 6 13:06:04 2015 @@ -618,16 +618,18 @@ } fc_assert_ret_val_msg(AAK_UNIT == action_get_actor_kind(wanted_action), - FALSE, "Action %s is performed by %s not units", + FALSE, "Action %s is performed by %s not %s", gen_action_name(wanted_action), action_actor_kind_name( - action_get_actor_kind(wanted_action))); + action_get_actor_kind(wanted_action)), + action_actor_kind_name(AAK_UNIT)); fc_assert_ret_val_msg(ATK_CITY == action_get_target_kind(wanted_action), - FALSE, "Action %s is against %s not cities", + FALSE, "Action %s is against %s not %s", gen_action_name(wanted_action), action_target_kind_name( - action_get_target_kind(wanted_action))); + action_get_target_kind(wanted_action)), + action_target_kind_name(ATK_CITY)); return is_action_enabled(wanted_action, unit_owner(actor_unit), NULL, NULL, @@ -654,16 +656,18 @@ } fc_assert_ret_val_msg(AAK_UNIT == action_get_actor_kind(wanted_action), - FALSE, "Action %s is performed by %s not units", + FALSE, "Action %s is performed by %s not %s", gen_action_name(wanted_action), action_actor_kind_name( - action_get_actor_kind(wanted_action))); + action_get_actor_kind(wanted_action)), + action_actor_kind_name(AAK_UNIT)); fc_assert_ret_val_msg(ATK_UNIT == action_get_target_kind(wanted_action), - FALSE, "Action %s is against %s not units", + FALSE, "Action %s is against %s not %s", gen_action_name(wanted_action), action_target_kind_name( - action_get_target_kind(wanted_action))); + action_get_target_kind(wanted_action)), + action_target_kind_name(ATK_UNIT)); return is_action_enabled(wanted_action, unit_owner(actor_unit), NULL, NULL, @@ -1036,16 +1040,18 @@ } fc_assert_ret_val_msg(AAK_UNIT == action_get_actor_kind(action_id), - FALSE, "Action %s is performed by %s not units", + FALSE, "Action %s is performed by %s not %s", gen_action_name(action_id), action_actor_kind_name( - action_get_actor_kind(action_id))); + action_get_actor_kind(action_id)), + action_actor_kind_name(AAK_UNIT)); fc_assert_ret_val_msg(ATK_CITY == action_get_target_kind(action_id), - FALSE, "Action %s is against %s not cities", + FALSE, "Action %s is against %s not %s", gen_action_name(action_id), action_target_kind_name( - action_get_target_kind(action_id))); + action_get_target_kind(action_id)), + action_target_kind_name(ATK_CITY)); return action_prob(action_id, unit_owner(actor_unit), NULL, NULL, @@ -1069,16 +1075,18 @@ } fc_assert_ret_val_msg(AAK_UNIT == action_get_actor_kind(action_id), - FALSE, "Action %s is performed by %s not units", + FALSE, "Action %s is performed by %s not %s", gen_action_name(action_id), action_actor_kind_name( - action_get_actor_kind(action_id))); + action_get_actor_kind(action_id)), + action_actor_kind_name(AAK_UNIT)); fc_assert_ret_val_msg(ATK_UNIT == action_get_target_kind(action_id), - FALSE, "Action %s is against %s not units", + FALSE, "Action %s is against %s not %s", gen_action_name(action_id), action_target_kind_name( - action_get_target_kind(action_id))); + action_get_target_kind(action_id)), + action_target_kind_name(ATK_UNIT)); return action_prob(action_id, unit_owner(actor_unit), NULL, NULL, Modified: branches/S2_6/common/actions.h URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/common/actions.h?rev=27553&r1=27552&r2=27553&view=diff ============================================================================== --- branches/S2_6/common/actions.h (original) +++ branches/S2_6/common/actions.h Tue Jan 6 13:06:04 2015 @@ -25,15 +25,15 @@ #define SPECENUM_NAME action_actor_kind #define SPECENUM_VALUE0 AAK_UNIT -#define SPECENUM_VALUE0NAME N_("units") +#define SPECENUM_VALUE0NAME N_("a unit") #define SPECENUM_COUNT AAK_COUNT #include "specenum_gen.h" #define SPECENUM_NAME action_target_kind #define SPECENUM_VALUE0 ATK_CITY -#define SPECENUM_VALUE0NAME N_("cities") +#define SPECENUM_VALUE0NAME N_("a city") #define SPECENUM_VALUE1 ATK_UNIT -#define SPECENUM_VALUE1NAME N_("units") +#define SPECENUM_VALUE1NAME N_("a unit") #define SPECENUM_COUNT ATK_COUNT #include "specenum_gen.h" _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits