Author: sveinung Date: Wed Apr 1 13:52:58 2015 New Revision: 28683 URL: http://svn.gna.org/viewcvs/freeciv?rev=28683&view=rev Log: Bundled rulesets: Don't punish illegal city founding/joining.
The special case in handle_unit_do_action() is still needed to preserve error message detail level. See patch #5973 Modified: trunk/data/alien/effects.ruleset trunk/data/civ1/effects.ruleset trunk/data/civ2/effects.ruleset trunk/data/civ2civ3/effects.ruleset trunk/data/classic/effects.ruleset trunk/data/experimental/effects.ruleset trunk/data/multiplayer/effects.ruleset trunk/server/unithand.c Modified: trunk/data/alien/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/effects.ruleset?rev=28683&r1=28682&r2=28683&view=diff ============================================================================== --- trunk/data/alien/effects.ruleset (original) +++ trunk/data/alien/effects.ruleset Wed Apr 1 13:52:58 2015 @@ -1008,3 +1008,8 @@ [effect_illegal_action_move_cost_base] type = "Illegal_Action_Move_Cost" value = 1 +reqs = + { "type", "name", "range", "present" + "Action", "Found City", "Local", FALSE + "Action", "Join City", "Local", FALSE + } Modified: trunk/data/civ1/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/effects.ruleset?rev=28683&r1=28682&r2=28683&view=diff ============================================================================== --- trunk/data/civ1/effects.ruleset (original) +++ trunk/data/civ1/effects.ruleset Wed Apr 1 13:52:58 2015 @@ -1430,3 +1430,8 @@ [effect_illegal_action_move_cost_base] type = "Illegal_Action_Move_Cost" value = 1 +reqs = + { "type", "name", "range", "present" + "Action", "Found City", "Local", FALSE + "Action", "Join City", "Local", FALSE + } Modified: trunk/data/civ2/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/effects.ruleset?rev=28683&r1=28682&r2=28683&view=diff ============================================================================== --- trunk/data/civ2/effects.ruleset (original) +++ trunk/data/civ2/effects.ruleset Wed Apr 1 13:52:58 2015 @@ -2284,3 +2284,8 @@ [effect_illegal_action_move_cost_base] type = "Illegal_Action_Move_Cost" value = 1 +reqs = + { "type", "name", "range", "present" + "Action", "Found City", "Local", FALSE + "Action", "Join City", "Local", FALSE + } Modified: trunk/data/civ2civ3/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/effects.ruleset?rev=28683&r1=28682&r2=28683&view=diff ============================================================================== --- trunk/data/civ2civ3/effects.ruleset (original) +++ trunk/data/civ2civ3/effects.ruleset Wed Apr 1 13:52:58 2015 @@ -3735,3 +3735,8 @@ [effect_illegal_action_move_cost_base] type = "Illegal_Action_Move_Cost" value = 1 +reqs = + { "type", "name", "range", "present" + "Action", "Found City", "Local", FALSE + "Action", "Join City", "Local", FALSE + } Modified: trunk/data/classic/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/effects.ruleset?rev=28683&r1=28682&r2=28683&view=diff ============================================================================== --- trunk/data/classic/effects.ruleset (original) +++ trunk/data/classic/effects.ruleset Wed Apr 1 13:52:58 2015 @@ -2376,3 +2376,8 @@ [effect_illegal_action_move_cost_base] type = "Illegal_Action_Move_Cost" value = 1 +reqs = + { "type", "name", "range", "present" + "Action", "Found City", "Local", FALSE + "Action", "Join City", "Local", FALSE + } Modified: trunk/data/experimental/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/effects.ruleset?rev=28683&r1=28682&r2=28683&view=diff ============================================================================== --- trunk/data/experimental/effects.ruleset (original) +++ trunk/data/experimental/effects.ruleset Wed Apr 1 13:52:58 2015 @@ -2698,3 +2698,8 @@ [effect_illegal_action_move_cost_base] type = "Illegal_Action_Move_Cost" value = 1 +reqs = + { "type", "name", "range", "present" + "Action", "Found City", "Local", FALSE + "Action", "Join City", "Local", FALSE + } Modified: trunk/data/multiplayer/effects.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/effects.ruleset?rev=28683&r1=28682&r2=28683&view=diff ============================================================================== --- trunk/data/multiplayer/effects.ruleset (original) +++ trunk/data/multiplayer/effects.ruleset Wed Apr 1 13:52:58 2015 @@ -2419,3 +2419,8 @@ [effect_illegal_action_move_cost_base] type = "Illegal_Action_Move_Cost" value = 1 +reqs = + { "type", "name", "range", "present" + "Action", "Found City", "Local", FALSE + "Action", "Join City", "Local", FALSE + } Modified: trunk/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/unithand.c?rev=28683&r1=28682&r2=28683&view=diff ============================================================================== --- trunk/server/unithand.c (original) +++ trunk/server/unithand.c Wed Apr 1 13:52:58 2015 @@ -1143,10 +1143,7 @@ city_add_unit(pplayer, actor_unit); } else if (!unit_can_add_to_city(actor_unit)) { /* Keep the rules like they was before action enabler control: - * - !unit_can_add_to_city() won't punish the player. * - detailed explanation of why something is illegal. */ - /* TODO: make punishment pr action (possible solution: action type - * requirement + effect) and move to ruleset. */ /* TODO: improve explanation about why an action failed. */ city_add_or_build_error(pplayer, actor_unit, unit_add_or_build_city_test(actor_unit)); @@ -1178,10 +1175,7 @@ city_build(pplayer, actor_unit, name); } else if (!unit_can_build_city(actor_unit)) { /* Keep the rules like they was before action enabler control: - * - !unit_can_build_city() won't punish the player. * - detailed explanation of why something is illegal. */ - /* TODO: make punishment pr action (possible solution: action type - * requirement + effect) and move to ruleset. */ /* TODO: improve explanation about why an action failed. */ city_add_or_build_error(pplayer, actor_unit, unit_add_or_build_city_test(actor_unit)); _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits