[Freeciv-commits] r25092 - /trunk/server/commands.c
Author: jtn Date: Mon Jun 9 10:46:14 2014 New Revision: 25092 URL: http://svn.gna.org/viewcvs/freeciv?rev=25092view=rev Log: Remove mention of /debug player command, which hasn't existed since 2005 (r9497). See gna bug #22150. Modified: trunk/server/commands.c Modified: trunk/server/commands.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/commands.c?rev=25092r1=25091r2=25092view=diff == --- trunk/server/commands.c (original) +++ trunk/server/commands.c Mon Jun 9 10:46:14 2014 @@ -199,7 +199,6 @@ /* TRANS: translate text between only */ N_(debug diplomacy player\n debug ferries\n - debug player player\n debug tech player\n debug city x y\n debug units x y\n ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25099 - /trunk/data/misc/small.png
Author: jtn Date: Mon Jun 9 10:46:43 2014 New Revision: 25099 URL: http://svn.gna.org/viewcvs/freeciv?rev=25099view=rev Log: Fix various small icons that were offset by one pixel in r23178. See gna bug #22157. Modified: trunk/data/misc/small.png Modified: trunk/data/misc/small.png URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/misc/small.png?rev=25099r1=25098r2=25099view=diff == Binary files - no diff available. ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25100 - in /trunk/data: hex2t/tiles.png isophex/darkness.png
Author: jtn Date: Mon Jun 9 10:46:47 2014 New Revision: 25100 URL: http://svn.gna.org/viewcvs/freeciv?rev=25100view=rev Log: Modify hex2t and isophex darkness sprites to cover whole tile, mainly as an example of how to do it. No visible effect (would have to set darkness_layer=1). See gna patch #4657. Modified: trunk/data/hex2t/tiles.png trunk/data/isophex/darkness.png Modified: trunk/data/hex2t/tiles.png URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/hex2t/tiles.png?rev=25100r1=25099r2=25100view=diff == Binary files - no diff available. Modified: trunk/data/isophex/darkness.png URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/isophex/darkness.png?rev=25100r1=25099r2=25100view=diff == Binary files - no diff available. ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25097 - in /trunk/data: civ2/ civ2civ3/ classic/ experimental/ multiplayer/
Author: jtn Date: Mon Jun 9 10:46:35 2014 New Revision: 25097 URL: http://svn.gna.org/viewcvs/freeciv?rev=25097view=rev Log: Rename AirUnit user flag to AirAttacker in supplied rulesets. Remove it from AWACS to avoid spurious comments in help. See gna bug #22155. Modified: trunk/data/civ2/units.ruleset trunk/data/civ2civ3/units.ruleset trunk/data/classic/units.ruleset trunk/data/experimental/units.ruleset trunk/data/multiplayer/units.ruleset Modified: trunk/data/civ2/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=25097r1=25096r2=25097view=diff == --- trunk/data/civ2/units.ruleset (original) +++ trunk/data/civ2/units.ruleset Mon Jun 9 10:46:35 2014 @@ -22,7 +22,7 @@ { name, helptxt Airbase, _(Can build Airbases.) Transform, _(Can transform terrain.) -AirUnit, _(Very bad at attacking AEGIS.) +AirAttacker, _(Very bad at attacking AEGIS.) Horse, _(Attack value halved when attacking Pikemen.) Helicopter, _(Defends very badly against Fighters.) } @@ -1197,7 +1197,7 @@ Helicopter, DefenseDivider, 1 Helicopter, Firepower1, 1 } -flags = AirUnit +flags = AirAttacker roles = helptext = _(\ Fighters are your first airborne units. They can\ @@ -1229,7 +1229,7 @@ uk_shield = 1 uk_food = 0 uk_gold = 0 -flags = FieldUnit, OneAttack, AirUnit +flags = FieldUnit, OneAttack, AirAttacker roles = helptext = _(\ Bombers are specialized airborne units that may\ @@ -1263,7 +1263,7 @@ uk_shield = 1 uk_food = 0 uk_gold = 0 -flags = FieldUnit, OneAttack, Helicopter, AirUnit +flags = FieldUnit, OneAttack, Helicopter, AirAttacker roles = helptext = _(\ The Helicopter is a very powerful unit, as it can both fly and\ @@ -1304,7 +1304,7 @@ Helicopter, DefenseDivider, 1 Helicopter, Firepower1, 1 } -flags = AirUnit +flags = AirAttacker roles = helptext = _(\ An improved Fighter, with improved attack and a higher movement\ @@ -1336,7 +1336,7 @@ uk_shield = 1 uk_food = 0 uk_gold = 0 -flags = FieldUnit, OneAttack, AirUnit +flags = FieldUnit, OneAttack, AirAttacker roles = helptext = _(\ An improved Bomber, with improved attack and a higher movement\ @@ -1604,7 +1604,7 @@ uk_gold = 0 bonuses = { flag, type, value - AirUnit, DefenseMultiplier, 4 + AirAttacker, DefenseMultiplier, 4 } flags = BadCityDefender roles = @@ -1774,7 +1774,7 @@ uk_shield = 1 uk_food = 0 uk_gold = 0 -flags = FieldUnit, OneAttack, AirUnit +flags = FieldUnit, OneAttack, AirAttacker roles = helptext = _(\ The Cruise Missile is a long-distance missile\ @@ -1809,7 +1809,7 @@ uk_shield = 1 uk_food = 0 uk_gold = 0 -flags = FieldUnit, OneAttack, Nuclear, AirUnit +flags = FieldUnit, OneAttack, Nuclear, AirAttacker roles = helptext = _(\ You can build Nuclear units when you have the required advance, and\ Modified: trunk/data/civ2civ3/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=25097r1=25096r2=25097view=diff == --- trunk/data/civ2civ3/units.ruleset (original) +++ trunk/data/civ2civ3/units.ruleset Mon Jun 9 10:46:35 2014 @@ -27,7 +27,7 @@ { name, helptxt Airbase, _(Can build Airbases.) Transform, _(Can transform terrain.) -AirUnit, _(Very bad at attacking AEGIS.) +AirAttacker, _(Very bad at attacking AEGIS.) Submarine, _(Attack value halved when attacking Destroyer) Unbribable, _(May not be bribed.) } @@ -1387,7 +1387,7 @@ uk_food = 1 uk_gold = 1 targets = Air, Missile, Helicopter -flags = AirUnit +flags = AirAttacker roles = DefendOk helptext = _(\ Fighters are your first airborne units. They can\ @@ -1419,7 +1419,7 @@ uk_shield = 1 uk_food = 1 uk_gold = 1 -flags = FieldUnit, OneAttack, AirUnit, Bombarder +flags = FieldUnit, OneAttack, AirAttacker, Bombarder roles = helptext = _(\ Bombers are specialized airborne units that may\ @@ -1454,7 +1454,7 @@ uk_food = 1 uk_gold = 1 cargo = Land -flags = OneAttack, AirUnit, Bombarder +flags = OneAttack, AirAttacker, Bombarder roles = helptext = _(\ The Helicopter can transport one unit of infantry, and it can bombard\ @@ -1490,7 +1490,7 @@ uk_food = 1 uk_gold = 1 targets = Air, Missile, Helicopter -flags = Partial_Invis, AirUnit +flags = Partial_Invis, AirAttacker roles = DefendGood
[Freeciv-commits] r25094 - in /trunk/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/
Author: jtn Date: Mon Jun 9 10:46:25 2014 New Revision: 25094 URL: http://svn.gna.org/viewcvs/freeciv?rev=25094view=rev Log: Update ruleset comments for move_fragments, plus generally clarify which items use whole / fractional MP. See gna bug #22151. Modified: trunk/data/alien/game.ruleset trunk/data/alien/terrain.ruleset trunk/data/alien/units.ruleset trunk/data/civ1/game.ruleset trunk/data/civ1/terrain.ruleset trunk/data/civ1/units.ruleset trunk/data/civ2/game.ruleset trunk/data/civ2/terrain.ruleset trunk/data/civ2/units.ruleset trunk/data/civ2civ3/game.ruleset trunk/data/civ2civ3/terrain.ruleset trunk/data/civ2civ3/units.ruleset trunk/data/classic/game.ruleset trunk/data/classic/terrain.ruleset trunk/data/classic/units.ruleset trunk/data/experimental/game.ruleset trunk/data/experimental/terrain.ruleset trunk/data/experimental/units.ruleset trunk/data/multiplayer/game.ruleset trunk/data/multiplayer/terrain.ruleset trunk/data/multiplayer/units.ruleset [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/data/alien/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/game.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/alien/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/terrain.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/alien/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/civ1/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/game.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/civ1/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/terrain.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/civ1/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/civ2/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/game.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/civ2/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/terrain.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/civ2/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/civ2civ3/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/game.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/civ2civ3/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/terrain.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/civ2civ3/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/classic/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/game.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/classic/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/terrain.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/classic/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/experimental/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/game.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/experimental/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/terrain.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/experimental/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/multiplayer/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/game.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/multiplayer/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/terrain.ruleset?rev=25094r1=25093r2=25094view=diff Modified: trunk/data/multiplayer/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/units.ruleset?rev=25094r1=25093r2=25094view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25096 - in /trunk: client/helpdata.c common/unit.c common/unittype.c common/unittype.h
Author: jtn Date: Mon Jun 9 10:46:32 2014 New Revision: 25096 URL: http://svn.gna.org/viewcvs/freeciv?rev=25096view=rev Log: Document embark/disembark restrictions and exceptions in autogenerated unit help. See gna bug #22143. Modified: trunk/client/helpdata.c trunk/common/unit.c trunk/common/unittype.c trunk/common/unittype.h Modified: trunk/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=25096r1=25095r2=25096view=diff == --- trunk/client/helpdata.c (original) +++ trunk/client/helpdata.c Mon Jun 9 10:46:32 2014 @@ -2895,9 +2895,143 @@ utype-transport_capacity), utype-transport_capacity, astr_str(list)); astr_free(list); +if (uclass_has_flag(utype_class(utype), UCF_UNREACHABLE)) { + /* Document restrictions on when units can load/unload */ + bool has_restricted_load = FALSE, has_unrestricted_load = FALSE, + has_restricted_unload = FALSE, has_unrestricted_unload = FALSE; + unit_type_iterate(pcargo) { +if (can_unit_type_transport(utype, utype_class(pcargo))) { + if (utype_can_freely_load(pcargo, utype)) { +has_unrestricted_load = TRUE; + } else { +has_restricted_load = TRUE; + } + if (utype_can_freely_unload(pcargo, utype)) { +has_unrestricted_unload = TRUE; + } else { +has_restricted_unload = TRUE; + } +} + } unit_type_iterate_end; + if (has_restricted_load) { +if (has_unrestricted_load) { + /* At least one type of cargo can load onto us freely. + * The specific exceptions will be documented in cargo help. */ + CATLSTR(buf, bufsz, + _( * Some cargo cannot be loaded except in a city or a +base native to this transport.\n)); +} else { + /* No exceptions */ + CATLSTR(buf, bufsz, + _( * Cargo cannot be loaded except in a city or a +base native to this transport.\n)); +} + } /* else, no restricted cargo exists; keep quiet */ + if (has_restricted_unload) { +if (has_unrestricted_unload) { + /* At least one type of cargo can unload from us freely. */ + CATLSTR(buf, bufsz, + _( * Some cargo cannot be unloaded except in a city or a +base native to this transport.\n)); +} else { + /* No exceptions */ + CATLSTR(buf, bufsz, + _( * Cargo cannot be unloaded except in a city or a +base native to this transport.\n)); +} + } /* else, no restricted cargo exists; keep quiet */ +} } if (utype_has_flag(utype, UTYF_TRIREME)) { CATLSTR(buf, bufsz, _(* Must stay next to coast.\n)); + } + { +/* Document exceptions to embark/disembark restrictions that we + * have as cargo. */ +bv_unit_classes embarks, disembarks; +BV_CLR_ALL(embarks); +BV_CLR_ALL(disembarks); +/* Determine which of our transport classes have restrictions in the first + * place (that is, contain at least one transport which carries at least + * one type of cargo which is restricted). + * We'll suppress output for classes not in this set, since this cargo + * type is not behaving exceptionally in such cases. */ +unit_type_iterate(utrans) { + const Unit_Class_id trans_class = uclass_index(utype_class(utrans)); + /* Don't waste time repeating checks on classes we've already checked, + * or weren't under consideration in the first place */ + if (!BV_ISSET(embarks, trans_class) + BV_ISSET(utype-embarks, trans_class)) { +unit_type_iterate(other_cargo) { + if (can_unit_type_transport(utrans, utype_class(other_cargo)) + !utype_can_freely_load(other_cargo, utrans)) { +/* At least one load restriction in transport class, which + * we aren't subject to */ +BV_SET(embarks, trans_class); + } +} unit_type_iterate_end; /* cargo */ + } + if (!BV_ISSET(disembarks, trans_class) + BV_ISSET(utype-disembarks, trans_class)) { +unit_type_iterate(other_cargo) { + if (can_unit_type_transport(utrans, utype_class(other_cargo)) + !utype_can_freely_unload(other_cargo, utrans)) { +/* At least one load restriction in transport class, which + * we aren't subject to */ +BV_SET(disembarks, trans_class); + } +} unit_type_iterate_end; /* cargo */ + } +} unit_class_iterate_end; /* transports */ + +if (BV_ISSET_ANY(embarks)) { + /* Build list of embark exceptions */ + const char *eclasses[uclass_count()]; + int i = 0; + struct astring elist = ASTRING_INIT; + +
[Freeciv-commits] r25093 - in /trunk/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/
Author: jtn Date: Mon Jun 9 10:46:20 2014 New Revision: 25093 URL: http://svn.gna.org/viewcvs/freeciv?rev=25093view=rev Log: Adding missing item comments to units.ruleset, plus general cleanup. See gna bug #22153. Modified: trunk/data/alien/units.ruleset trunk/data/civ1/units.ruleset trunk/data/civ2/units.ruleset trunk/data/civ2civ3/units.ruleset trunk/data/classic/units.ruleset trunk/data/experimental/units.ruleset trunk/data/multiplayer/units.ruleset [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/data/alien/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=25093r1=25092r2=25093view=diff Modified: trunk/data/civ1/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=25093r1=25092r2=25093view=diff Modified: trunk/data/civ2/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=25093r1=25092r2=25093view=diff Modified: trunk/data/civ2civ3/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=25093r1=25092r2=25093view=diff Modified: trunk/data/classic/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=25093r1=25092r2=25093view=diff Modified: trunk/data/experimental/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=25093r1=25092r2=25093view=diff Modified: trunk/data/multiplayer/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/units.ruleset?rev=25093r1=25092r2=25093view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25095 - in /trunk: client/helpdata.c data/alien/units.ruleset
Author: jtn Date: Mon Jun 9 10:46:28 2014 New Revision: 25095 URL: http://svn.gna.org/viewcvs/freeciv?rev=25095view=rev Log: Document initial population of cities built by units. See gna bug #22152. Modified: trunk/client/helpdata.c trunk/data/alien/units.ruleset Modified: trunk/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/helpdata.c?rev=25095r1=25094r2=25095view=diff == --- trunk/client/helpdata.c (original) +++ trunk/client/helpdata.c Mon Jun 9 10:46:28 2014 @@ -2922,7 +2922,11 @@ production cost.\n)); } if (utype_has_flag(utype, UTYF_CITIES)) { -CATLSTR(buf, bufsz, _(* Can build new cities.\n)); +cat_snprintf(buf, bufsz, + PL_(* Can build new cities (initial population %d).\n, + * Can build new cities (initial population %d).\n, + utype-city_size), + utype-city_size); } if (utype_has_flag(utype, UTYF_ADD_TO_CITY)) { cat_snprintf(buf, bufsz, Modified: trunk/data/alien/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=25095r1=25094r2=25095view=diff == --- trunk/data/alien/units.ruleset (original) +++ trunk/data/alien/units.ruleset Mon Jun 9 10:46:28 2014 @@ -511,7 +511,7 @@ roles = Cities, Settlers helptext = _(\ Amphibious Engineer that can also establish new cities on Ocean.\ -Cities it builds, start at size 2.) +) [unit_star_marines] name = _(Star Marines) ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25102 - in /branches/S2_5/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/
Author: jtn Date: Mon Jun 9 10:49:09 2014 New Revision: 25102 URL: http://svn.gna.org/viewcvs/freeciv?rev=25102view=rev Log: Adding missing item comments to units.ruleset, plus general cleanup. See gna bug #22153. Modified: branches/S2_5/data/alien/units.ruleset branches/S2_5/data/civ1/units.ruleset branches/S2_5/data/civ2/units.ruleset branches/S2_5/data/civ2civ3/units.ruleset branches/S2_5/data/classic/units.ruleset branches/S2_5/data/experimental/units.ruleset branches/S2_5/data/multiplayer/units.ruleset [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/S2_5/data/alien/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25102r1=25101r2=25102view=diff Modified: branches/S2_5/data/civ1/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/units.ruleset?rev=25102r1=25101r2=25102view=diff Modified: branches/S2_5/data/civ2/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/units.ruleset?rev=25102r1=25101r2=25102view=diff Modified: branches/S2_5/data/civ2civ3/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/units.ruleset?rev=25102r1=25101r2=25102view=diff Modified: branches/S2_5/data/classic/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/units.ruleset?rev=25102r1=25101r2=25102view=diff Modified: branches/S2_5/data/experimental/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/units.ruleset?rev=25102r1=25101r2=25102view=diff Modified: branches/S2_5/data/multiplayer/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/units.ruleset?rev=25102r1=25101r2=25102view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25101 - /branches/S2_5/server/commands.c
Author: jtn Date: Mon Jun 9 10:49:06 2014 New Revision: 25101 URL: http://svn.gna.org/viewcvs/freeciv?rev=25101view=rev Log: Remove mention of /debug player command, which hasn't existed since 2005 (r9497). See gna bug #22150. Modified: branches/S2_5/server/commands.c Modified: branches/S2_5/server/commands.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/commands.c?rev=25101r1=25100r2=25101view=diff == --- branches/S2_5/server/commands.c (original) +++ branches/S2_5/server/commands.c Mon Jun 9 10:49:06 2014 @@ -199,7 +199,6 @@ /* TRANS: translate text between only */ N_(debug diplomacy player\n debug ferries\n - debug player player\n debug tech player\n debug city x y\n debug units x y\n ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25103 - in /branches/S2_5/data: alien/ civ1/ civ2/ civ2civ3/ classic/ experimental/ multiplayer/
Author: jtn Date: Mon Jun 9 10:49:13 2014 New Revision: 25103 URL: http://svn.gna.org/viewcvs/freeciv?rev=25103view=rev Log: Update ruleset comments for move_fragments, plus generally clarify which items use whole / fractional MP. See gna bug #22151. Modified: branches/S2_5/data/alien/game.ruleset branches/S2_5/data/alien/terrain.ruleset branches/S2_5/data/alien/units.ruleset branches/S2_5/data/civ1/game.ruleset branches/S2_5/data/civ1/terrain.ruleset branches/S2_5/data/civ1/units.ruleset branches/S2_5/data/civ2/game.ruleset branches/S2_5/data/civ2/terrain.ruleset branches/S2_5/data/civ2/units.ruleset branches/S2_5/data/civ2civ3/game.ruleset branches/S2_5/data/civ2civ3/terrain.ruleset branches/S2_5/data/civ2civ3/units.ruleset branches/S2_5/data/classic/game.ruleset branches/S2_5/data/classic/terrain.ruleset branches/S2_5/data/classic/units.ruleset branches/S2_5/data/experimental/game.ruleset branches/S2_5/data/experimental/terrain.ruleset branches/S2_5/data/experimental/units.ruleset branches/S2_5/data/multiplayer/game.ruleset branches/S2_5/data/multiplayer/terrain.ruleset branches/S2_5/data/multiplayer/units.ruleset [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/S2_5/data/alien/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/game.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/alien/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/terrain.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/alien/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/civ1/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/game.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/civ1/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/terrain.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/civ1/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ1/units.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/civ2/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/game.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/civ2/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/terrain.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/civ2/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/units.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/civ2civ3/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/game.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/civ2civ3/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/terrain.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/civ2civ3/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/units.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/classic/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/game.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/classic/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/terrain.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/classic/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/classic/units.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/experimental/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/game.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/experimental/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/terrain.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/experimental/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/experimental/units.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/multiplayer/game.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/game.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/multiplayer/terrain.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/terrain.ruleset?rev=25103r1=25102r2=25103view=diff Modified: branches/S2_5/data/multiplayer/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/multiplayer/units.ruleset?rev=25103r1=25102r2=25103view=diff ___ Freeciv-commits mailing list Freeciv-commits@gna.org
[Freeciv-commits] r25107 - /branches/S2_5/server/settings.c
Author: jtn Date: Mon Jun 9 10:49:28 2014 New Revision: 25107 URL: http://svn.gna.org/viewcvs/freeciv?rev=25107view=rev Log: Rework 'techlossforgiveness' and 'techlossrestore' help. They no longer contradict each other. See gna bug #22098. Modified: branches/S2_5/server/settings.c Modified: branches/S2_5/server/settings.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/settings.c?rev=25107r1=25106r2=25107view=diff == --- branches/S2_5/server/settings.c (original) +++ branches/S2_5/server/settings.c Mon Jun 9 10:49:28 2014 @@ -1513,21 +1513,25 @@ GEN_INT(techlossforgiveness, game.server.techloss_forgiveness, SSET_RULES, SSET_SCIENCE, SSET_RARE, SSET_TO_CLIENT, - N_(Negative bulbs allowed before losing tech), - N_(When your number of bulbs gets negative value lower than - this percentage of current research cost, you lose one - tech and number of bulbs is restored to 0. Special value -1 - disables tech loss completely.), + N_(Research point debt threshold for losing tech), + N_(When you have negative research points, and your shortfall is + greater than this percentage of the cost of your current + research, you forget a technology you already knew.\n + The special value -1 prevents loss of technology regardless of + research points.), NULL, NULL, GAME_MIN_TECHLOSSFG, GAME_MAX_TECHLOSSFG, GAME_DEFAULT_TECHLOSSFG) GEN_INT(techlossrestore, game.server.techloss_restore, SSET_RULES, SSET_SCIENCE, SSET_RARE, SSET_TO_CLIENT, - N_(Bulbs restored when one loses a tech), - N_(When you lose a tech, this percentage of its research - cost gets restored. Special value -1 means that - bulb count is always restored to zero.), + N_(Research points restored after losing a tech), + N_(When you lose a technology due to a negative research balance + (see 'techlossforgiveness'), this percentage of its research + cost is credited to your research balance (this may not be + sufficient to make it positive).\n + The special value -1 means that your research balance is always + restored to zero, regardless of your previous shortfall.), NULL, NULL, GAME_MIN_TECHLOSSREST, GAME_MAX_TECHLOSSREST, GAME_DEFAULT_TECHLOSSREST) ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25106 - in /branches/S2_5/data: civ2/ civ2civ3/ classic/ experimental/ multiplayer/
Author: jtn Date: Mon Jun 9 10:49:24 2014 New Revision: 25106 URL: http://svn.gna.org/viewcvs/freeciv?rev=25106view=rev Log: Rename AirUnit user flag to AirAttacker in supplied rulesets. Remove it from AWACS to avoid spurious comments in help. See gna bug #22155. Modified: branches/S2_5/data/civ2/units.ruleset branches/S2_5/data/civ2civ3/units.ruleset branches/S2_5/data/classic/units.ruleset branches/S2_5/data/experimental/units.ruleset branches/S2_5/data/multiplayer/units.ruleset Modified: branches/S2_5/data/civ2/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2/units.ruleset?rev=25106r1=25105r2=25106view=diff == --- branches/S2_5/data/civ2/units.ruleset (original) +++ branches/S2_5/data/civ2/units.ruleset Mon Jun 9 10:49:24 2014 @@ -22,7 +22,7 @@ { name, helptxt Airbase, _(Can build Airbases.) Transform, _(Can transform terrain.) -AirUnit, _(Very bad at attacking AEGIS.) +AirAttacker, _(Very bad at attacking AEGIS.) Horse, _(Attack value halved when attacking Pikemen.) Helicopter, _(Defends very badly against Fighters.) } @@ -1196,7 +1196,7 @@ Helicopter, DefenseDivider, 1 Helicopter, Firepower1, 1 } -flags = AirUnit +flags = AirAttacker roles = helptext = _(\ Fighters are your first airborne units. They can\ @@ -1228,7 +1228,7 @@ uk_shield = 1 uk_food = 0 uk_gold = 0 -flags = FieldUnit, OneAttack, AirUnit +flags = FieldUnit, OneAttack, AirAttacker roles = helptext = _(\ Bombers are specialized airborne units that may\ @@ -1262,7 +1262,7 @@ uk_shield = 1 uk_food = 0 uk_gold = 0 -flags = FieldUnit, OneAttack, Helicopter, AirUnit +flags = FieldUnit, OneAttack, Helicopter, AirAttacker roles = helptext = _(\ The Helicopter is a very powerful unit, as it can both fly and\ @@ -1303,7 +1303,7 @@ Helicopter, DefenseDivider, 1 Helicopter, Firepower1, 1 } -flags = AirUnit +flags = AirAttacker roles = helptext = _(\ An improved Fighter, with improved attack and a higher movement\ @@ -1335,7 +1335,7 @@ uk_shield = 1 uk_food = 0 uk_gold = 0 -flags = FieldUnit, OneAttack, AirUnit +flags = FieldUnit, OneAttack, AirAttacker roles = helptext = _(\ An improved Bomber, with improved attack and a higher movement\ @@ -1603,7 +1603,7 @@ uk_gold = 0 bonuses = { flag, type, value - AirUnit, DefenseMultiplier, 4 + AirAttacker, DefenseMultiplier, 4 } flags = BadCityDefender roles = @@ -1773,7 +1773,7 @@ uk_shield = 1 uk_food = 0 uk_gold = 0 -flags = FieldUnit, OneAttack, AirUnit +flags = FieldUnit, OneAttack, AirAttacker roles = helptext = _(\ The Cruise Missile is a long-distance missile\ @@ -1808,7 +1808,7 @@ uk_shield = 1 uk_food = 0 uk_gold = 0 -flags = FieldUnit, OneAttack, Nuclear, AirUnit +flags = FieldUnit, OneAttack, Nuclear, AirAttacker roles = helptext = _(\ You can build Nuclear units when you have the required advance, and\ Modified: branches/S2_5/data/civ2civ3/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/civ2civ3/units.ruleset?rev=25106r1=25105r2=25106view=diff == --- branches/S2_5/data/civ2civ3/units.ruleset (original) +++ branches/S2_5/data/civ2civ3/units.ruleset Mon Jun 9 10:49:24 2014 @@ -27,7 +27,7 @@ { name, helptxt Airbase, _(Can build Airbases.) Transform, _(Can transform terrain.) -AirUnit, _(Very bad at attacking AEGIS.) +AirAttacker, _(Very bad at attacking AEGIS.) Submarine, _(Attack value halved when attacking Destroyer) } @@ -1384,7 +1384,7 @@ uk_food = 1 uk_gold = 1 targets = Air, Missile, Helicopter -flags = AirUnit +flags = AirAttacker roles = DefendOk helptext = _(\ Fighters are your first airborne units. They can\ @@ -1416,7 +1416,7 @@ uk_shield = 1 uk_food = 1 uk_gold = 1 -flags = FieldUnit, OneAttack, AirUnit, Bombarder +flags = FieldUnit, OneAttack, AirAttacker, Bombarder roles = helptext = _(\ Bombers are specialized airborne units that may\ @@ -1451,7 +1451,7 @@ uk_food = 1 uk_gold = 1 cargo = Land -flags = OneAttack, AirUnit, Bombarder +flags = OneAttack, AirAttacker, Bombarder roles = helptext = _(\ The Helicopter can transport one unit of infantry, and it can bombard\ @@ -1487,7 +1487,7 @@ uk_food = 1 uk_gold = 1 targets = Air, Missile, Helicopter -flags = Partial_Invis, AirUnit +flags
[Freeciv-commits] r25108 - /branches/S2_5/data/misc/small.png
Author: jtn Date: Mon Jun 9 10:49:32 2014 New Revision: 25108 URL: http://svn.gna.org/viewcvs/freeciv?rev=25108view=rev Log: Fix various small icons that were offset by one pixel in r23179. See gna bug #22157. Modified: branches/S2_5/data/misc/small.png Modified: branches/S2_5/data/misc/small.png URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/misc/small.png?rev=25108r1=25107r2=25108view=diff == Binary files - no diff available. ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25104 - in /branches/S2_5: client/helpdata.c data/alien/units.ruleset
Author: jtn Date: Mon Jun 9 10:49:17 2014 New Revision: 25104 URL: http://svn.gna.org/viewcvs/freeciv?rev=25104view=rev Log: Document initial population of cities built by units. See gna bug #22152. Modified: branches/S2_5/client/helpdata.c branches/S2_5/data/alien/units.ruleset Modified: branches/S2_5/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=25104r1=25103r2=25104view=diff == --- branches/S2_5/client/helpdata.c (original) +++ branches/S2_5/client/helpdata.c Mon Jun 9 10:49:17 2014 @@ -2308,7 +2308,11 @@ production cost.\n)); } if (utype_has_flag(utype, UTYF_CITIES)) { -CATLSTR(buf, bufsz, _(* Can build new cities.\n)); +cat_snprintf(buf, bufsz, + PL_(* Can build new cities (initial population %d).\n, + * Can build new cities (initial population %d).\n, + utype-city_size), + utype-city_size); } if (utype_has_flag(utype, UTYF_ADD_TO_CITY)) { cat_snprintf(buf, bufsz, Modified: branches/S2_5/data/alien/units.ruleset URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/alien/units.ruleset?rev=25104r1=25103r2=25104view=diff == --- branches/S2_5/data/alien/units.ruleset (original) +++ branches/S2_5/data/alien/units.ruleset Mon Jun 9 10:49:17 2014 @@ -509,7 +509,7 @@ roles = Cities, Settlers helptext = _(\ Amphibious Engineer that can also establish new cities on Ocean.\ -Cities it builds, start at size 2.) +) [unit_star_marines] name = _(Star Marines) ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25109 - in /branches/S2_5/data: hex2t/tiles.png isophex/darkness.png
Author: jtn Date: Mon Jun 9 10:49:35 2014 New Revision: 25109 URL: http://svn.gna.org/viewcvs/freeciv?rev=25109view=rev Log: Modify hex2t and isophex darkness sprites to cover whole tile, mainly as an example of how to do it. No visible effect (would have to set darkness_layer=1). See gna patch #4657. Modified: branches/S2_5/data/hex2t/tiles.png branches/S2_5/data/isophex/darkness.png Modified: branches/S2_5/data/hex2t/tiles.png URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/hex2t/tiles.png?rev=25109r1=25108r2=25109view=diff == Binary files - no diff available. Modified: branches/S2_5/data/isophex/darkness.png URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/data/isophex/darkness.png?rev=25109r1=25108r2=25109view=diff == Binary files - no diff available. ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25105 - in /branches/S2_5: client/helpdata.c common/unit.c common/unittype.c common/unittype.h
Author: jtn Date: Mon Jun 9 10:49:20 2014 New Revision: 25105 URL: http://svn.gna.org/viewcvs/freeciv?rev=25105view=rev Log: Document embark/disembark restrictions and exceptions in autogenerated unit help. See gna bug #22143. Modified: branches/S2_5/client/helpdata.c branches/S2_5/common/unit.c branches/S2_5/common/unittype.c branches/S2_5/common/unittype.h Modified: branches/S2_5/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/helpdata.c?rev=25105r1=25104r2=25105view=diff == --- branches/S2_5/client/helpdata.c (original) +++ branches/S2_5/client/helpdata.c Mon Jun 9 10:49:20 2014 @@ -2281,9 +2281,143 @@ utype-transport_capacity), utype-transport_capacity, astr_str(list)); astr_free(list); +if (uclass_has_flag(utype_class(utype), UCF_UNREACHABLE)) { + /* Document restrictions on when units can load/unload */ + bool has_restricted_load = FALSE, has_unrestricted_load = FALSE, + has_restricted_unload = FALSE, has_unrestricted_unload = FALSE; + unit_type_iterate(pcargo) { +if (can_unit_type_transport(utype, utype_class(pcargo))) { + if (utype_can_freely_load(pcargo, utype)) { +has_unrestricted_load = TRUE; + } else { +has_restricted_load = TRUE; + } + if (utype_can_freely_unload(pcargo, utype)) { +has_unrestricted_unload = TRUE; + } else { +has_restricted_unload = TRUE; + } +} + } unit_type_iterate_end; + if (has_restricted_load) { +if (has_unrestricted_load) { + /* At least one type of cargo can load onto us freely. + * The specific exceptions will be documented in cargo help. */ + CATLSTR(buf, bufsz, + _( * Some cargo cannot be loaded except in a city or a +base native to this transport.\n)); +} else { + /* No exceptions */ + CATLSTR(buf, bufsz, + _( * Cargo cannot be loaded except in a city or a +base native to this transport.\n)); +} + } /* else, no restricted cargo exists; keep quiet */ + if (has_restricted_unload) { +if (has_unrestricted_unload) { + /* At least one type of cargo can unload from us freely. */ + CATLSTR(buf, bufsz, + _( * Some cargo cannot be unloaded except in a city or a +base native to this transport.\n)); +} else { + /* No exceptions */ + CATLSTR(buf, bufsz, + _( * Cargo cannot be unloaded except in a city or a +base native to this transport.\n)); +} + } /* else, no restricted cargo exists; keep quiet */ +} } if (utype_has_flag(utype, UTYF_TRIREME)) { CATLSTR(buf, bufsz, _(* Must stay next to coast.\n)); + } + { +/* Document exceptions to embark/disembark restrictions that we + * have as cargo. */ +bv_unit_classes embarks, disembarks; +BV_CLR_ALL(embarks); +BV_CLR_ALL(disembarks); +/* Determine which of our transport classes have restrictions in the first + * place (that is, contain at least one transport which carries at least + * one type of cargo which is restricted). + * We'll suppress output for classes not in this set, since this cargo + * type is not behaving exceptionally in such cases. */ +unit_type_iterate(utrans) { + const Unit_Class_id trans_class = uclass_index(utype_class(utrans)); + /* Don't waste time repeating checks on classes we've already checked, + * or weren't under consideration in the first place */ + if (!BV_ISSET(embarks, trans_class) + BV_ISSET(utype-embarks, trans_class)) { +unit_type_iterate(other_cargo) { + if (can_unit_type_transport(utrans, utype_class(other_cargo)) + !utype_can_freely_load(other_cargo, utrans)) { +/* At least one load restriction in transport class, which + * we aren't subject to */ +BV_SET(embarks, trans_class); + } +} unit_type_iterate_end; /* cargo */ + } + if (!BV_ISSET(disembarks, trans_class) + BV_ISSET(utype-disembarks, trans_class)) { +unit_type_iterate(other_cargo) { + if (can_unit_type_transport(utrans, utype_class(other_cargo)) + !utype_can_freely_unload(other_cargo, utrans)) { +/* At least one load restriction in transport class, which + * we aren't subject to */ +BV_SET(disembarks, trans_class); + } +} unit_type_iterate_end; /* cargo */ + } +} unit_class_iterate_end; /* transports */ + +if (BV_ISSET_ANY(embarks)) { + /* Build list of embark exceptions */ + const char *eclasses[uclass_count()]; +
[Freeciv-commits] r25110 - /branches/S2_4/server/commands.c
Author: jtn Date: Mon Jun 9 10:57:07 2014 New Revision: 25110 URL: http://svn.gna.org/viewcvs/freeciv?rev=25110view=rev Log: Remove mention of /debug player command, which hasn't existed since 2005 (r9497). See gna bug #22150. Modified: branches/S2_4/server/commands.c Modified: branches/S2_4/server/commands.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_4/server/commands.c?rev=25110r1=25109r2=25110view=diff == --- branches/S2_4/server/commands.c (original) +++ branches/S2_4/server/commands.c Mon Jun 9 10:57:07 2014 @@ -197,7 +197,6 @@ /* TRANS: translate text between only */ N_(debug diplomacy player\n debug ferries\n - debug player player\n debug tech player\n debug city x y\n debug units x y\n ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25111 - /branches/S2_4/client/helpdata.c
Author: jtn Date: Mon Jun 9 10:57:10 2014 New Revision: 25111 URL: http://svn.gna.org/viewcvs/freeciv?rev=25111view=rev Log: Document initial population of cities built by units. See gna bug #22152. Modified: branches/S2_4/client/helpdata.c Modified: branches/S2_4/client/helpdata.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_4/client/helpdata.c?rev=25111r1=25110r2=25111view=diff == --- branches/S2_4/client/helpdata.c (original) +++ branches/S2_4/client/helpdata.c Mon Jun 9 10:57:10 2014 @@ -1996,7 +1996,11 @@ production cost.\n)); } if (utype_has_flag(utype, F_CITIES)) { -CATLSTR(buf, bufsz, _(* Can build new cities.\n)); +cat_snprintf(buf, bufsz, + PL_(* Can build new cities (initial population %d).\n, + * Can build new cities (initial population %d).\n, + utype-city_size), + utype-city_size); } if (utype_has_flag(utype, F_ADD_TO_CITY)) { cat_snprintf(buf, bufsz, ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25112 - in /trunk: ./ data/default/ data/misc/ data/override/
Author: cazfi Date: Mon Jun 9 22:23:43 2014 New Revision: 25112 URL: http://svn.gna.org/viewcvs/freeciv?rev=25112view=rev Log: Added data directory override containing empty files of the types needed for creating custom nations. They are included from respective main files, and user can simply place their own files with real nations earlier in the data path, overriding the empty ones. Requested by Jacob Nevins jtn See patch #3926 Added: trunk/data/override/ trunk/data/override/Makefile.am trunk/data/override/flags-large.spec trunk/data/override/flags.spec trunk/data/override/nation.ruleset trunk/data/override/shields-large.spec trunk/data/override/shields.spec Modified: trunk/configure.ac trunk/data/default/nationlist.ruleset trunk/data/misc/flags-large.spec trunk/data/misc/flags.spec trunk/data/misc/shields-large.spec trunk/data/misc/shields.spec Modified: trunk/configure.ac URL: http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=25112r1=25111r2=25112view=diff == --- trunk/configure.ac (original) +++ trunk/configure.ac Mon Jun 9 22:23:43 2014 @@ -1493,6 +1493,7 @@ data/isotrident/Makefile data/stdsounds/Makefile data/stdmusic/Makefile + data/override/Makefile data/default/Makefile data/classic/Makefile data/multiplayer/Makefile Modified: trunk/data/default/nationlist.ruleset URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/default/nationlist.ruleset?rev=25112r1=25111r2=25112view=diff == --- trunk/data/default/nationlist.ruleset (original) +++ trunk/data/default/nationlist.ruleset Mon Jun 9 22:23:43 2014 @@ -107,7 +107,8 @@ ; Below: nations data loaded from ruleset files for ; all nations available. If you want to have more -; nations, just add the path to your ruleset to this list. +; nations, just add the path to your ruleset to this list or +; add them to local override/nation.ruleset included in the end. ; ; See doc/README.nations for information on how to ; create nation rulesets, including style guidelines. @@ -669,3 +670,5 @@ *include nation/zhuang.ruleset *include nation/zimbabwean.ruleset *include nation/zulu.ruleset + +*include override/nation.ruleset Modified: trunk/data/misc/flags-large.spec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/misc/flags-large.spec?rev=25112r1=25111r2=25112view=diff == --- trunk/data/misc/flags-large.spec(original) +++ trunk/data/misc/flags-large.specMon Jun 9 22:23:43 2014 @@ -580,3 +580,5 @@ f.zimbabwe, flags/zimbabwe-large f.zulu, flags/zulu-large } + +*include override/flags-large.spec Modified: trunk/data/misc/flags.spec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/misc/flags.spec?rev=25112r1=25111r2=25112view=diff == --- trunk/data/misc/flags.spec (original) +++ trunk/data/misc/flags.spec Mon Jun 9 22:23:43 2014 @@ -1149,3 +1149,5 @@ f.zimbabwe, flags/zimbabwe f.zulu, flags/zulu } + +*include override/flags.spec Modified: trunk/data/misc/shields-large.spec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/misc/shields-large.spec?rev=25112r1=25111r2=25112view=diff == --- trunk/data/misc/shields-large.spec (original) +++ trunk/data/misc/shields-large.spec Mon Jun 9 22:23:43 2014 @@ -580,3 +580,5 @@ f.shield.zimbabwe, flags/zimbabwe-shield-large f.shield.zulu, flags/zulu-shield-large } + +*include override/shields-large.spec Modified: trunk/data/misc/shields.spec URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/misc/shields.spec?rev=25112r1=25111r2=25112view=diff == --- trunk/data/misc/shields.spec(original) +++ trunk/data/misc/shields.specMon Jun 9 22:23:43 2014 @@ -579,3 +579,5 @@ f.shield.zimbabwe, flags/zimbabwe-shield f.shield.zulu, flags/zulu-shield } + +*include override/shields.spec Added: trunk/data/override/Makefile.am URL: http://svn.gna.org/viewcvs/freeciv/trunk/data/override/Makefile.am?rev=25112view=auto == --- trunk/data/override/Makefile.am (added) +++ trunk/data/override/Makefile.am Mon Jun 9 22:23:43 2014 @@ -0,0 +1,13 @@ +## Process this file with automake to produce Makefile.in + +## Override automake so that make install puts these in proper place: +pkgdatadir = $(datadir)/$(PACKAGE)/override + +pkgdata_DATA = \ +
[Freeciv-commits] r25113 - in /trunk: client/servers.c server/meta.c utility/netfile.c utility/netfile.h
Author: cazfi Date: Mon Jun 9 23:43:04 2014 New Revision: 25113 URL: http://svn.gna.org/viewcvs/freeciv?rev=25113view=rev Log: Handle metaserver reply to client in memory instead of writing it to temporary file. See patch #4779 Modified: trunk/client/servers.c trunk/server/meta.c trunk/utility/netfile.c trunk/utility/netfile.h Modified: trunk/client/servers.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/servers.c?rev=25113r1=25112r2=25113view=diff == --- trunk/client/servers.c (original) +++ trunk/client/servers.c Mon Jun 9 23:43:04 2014 @@ -96,7 +96,7 @@ fc_mutex mutex; const char *urlpath; -FILE *fp; /* temp file */ +struct netfile_write_cb_data mem; } meta; }; @@ -220,7 +220,7 @@ char str[4096]; struct server_list *srvrs; - f = fz_from_stream(scan-meta.fp); + f = fz_from_memory(scan-meta.mem.mem, scan-meta.mem.size, TRUE); if (NULL == f) { fc_snprintf(str, sizeof(str), _(Failed to read the metaserver data from %s.), @@ -236,8 +236,8 @@ scan-srvrs.servers = srvrs; fc_release_mutex(scan-srvrs.mutex); - /* 'f' (hence 'meta.fp') was closed in parse_metaserver_data(). */ - scan-meta.fp = NULL; + /* 'f' (hence 'meta.mem.mem') was closed in parse_metaserver_data(). */ + scan-meta.mem.mem = NULL; if (NULL == srvrs) { fc_snprintf(str, sizeof(str), @@ -259,45 +259,22 @@ { struct server_scan *scan = arg; - if (!scan-meta.fp) { -#ifdef WIN32_NATIVE -char filename[MAX_PATH]; - -GetTempPath(sizeof(filename), filename); -cat_snprintf(filename, sizeof(filename), fctmp%d, fc_rand(1000)); - -scan-meta.fp = fc_fopen(filename, w+b); -#else -scan-meta.fp = tmpfile(); -#endif /* WIN32_NATIVE */ - -if (!scan-meta.fp) { - scan-error_func(scan, _(Could not open temp file.)); -} - } - - if (scan-meta.fp) { - -if (!begin_metaserver_scan(scan)) { + if (!begin_metaserver_scan(scan)) { +fc_allocate_mutex(scan-meta.mutex); +scan-meta.status = SCAN_STATUS_ERROR; + } else { +if (!meta_read_response(scan)) { fc_allocate_mutex(scan-meta.mutex); scan-meta.status = SCAN_STATUS_ERROR; } else { - - rewind(scan-meta.fp); - - if (!meta_read_response(scan)) { -fc_allocate_mutex(scan-meta.mutex); -scan-meta.status = SCAN_STATUS_ERROR; - } else { -fc_allocate_mutex(scan-meta.mutex); -if (scan-meta.status == SCAN_STATUS_WAITING) { - scan-meta.status = SCAN_STATUS_DONE; -} + fc_allocate_mutex(scan-meta.mutex); + if (scan-meta.status == SCAN_STATUS_WAITING) { +scan-meta.status = SCAN_STATUS_DONE; } } - -fc_release_mutex(scan-meta.mutex); - } + } + + fc_release_mutex(scan-meta.mutex); } / @@ -314,7 +291,7 @@ post = netfile_start_post(); netfile_add_form_str(post, client_cap, our_capability); - if (!netfile_send_post(metaserver, post, scan-meta.fp, NULL)) { + if (!netfile_send_post(metaserver, post, NULL, scan-meta.mem, NULL)) { scan-error_func(scan, _(Error connecting to metaserver)); retval = FALSE; } @@ -835,9 +812,9 @@ fc_release_mutex(scan-srvrs.mutex); } -if (scan-meta.fp) { - fclose(scan-meta.fp); - scan-meta.fp = NULL; +if (scan-meta.mem.mem) { + FC_FREE(scan-meta.mem.mem); + scan-meta.mem.mem = NULL; } } else { if (scan-sock = 0) { Modified: trunk/server/meta.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/server/meta.c?rev=25113r1=25112r2=25113view=diff == --- trunk/server/meta.c (original) +++ trunk/server/meta.c Mon Jun 9 23:43:04 2014 @@ -230,7 +230,7 @@ addr = srvarg.bind_addr; } - if (!netfile_send_post(srvarg.metaserver_addr, post, NULL, addr)) { + if (!netfile_send_post(srvarg.metaserver_addr, post, NULL, NULL, addr)) { con_puts(C_METAERROR, _(Error connecting to metaserver)); metaserver_failed(); } Modified: trunk/utility/netfile.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/netfile.c?rev=25113r1=25112r2=25113view=diff == --- trunk/utility/netfile.c (original) +++ trunk/utility/netfile.c Mon Jun 9 23:43:04 2014 @@ -49,12 +49,6 @@ return handle; } - -struct netfile_write_cb_data -{ - char *mem; - int size; -}; /** curl write callback to store received file to memory. @@ -223,7 +217,8 @@ Send HTTP POST ***/ bool netfile_send_post(const char *URL, struct netfile_post *post, - FILE *reply_fp, const char *addr) +
[Freeciv-commits] r25114 - in /trunk/client: gui-sdl/dialogs.c gui-sdl2/dialogs.c
Author: cazfi Date: Mon Jun 9 23:58:46 2014 New Revision: 25114 URL: http://svn.gna.org/viewcvs/freeciv?rev=25114view=rev Log: Iterate over city styles only once when constructing sdl(2)-client nation selection dialog, fixing a bug that first of the styles appeared twice. See bug #22148 Modified: trunk/client/gui-sdl/dialogs.c trunk/client/gui-sdl2/dialogs.c Modified: trunk/client/gui-sdl/dialogs.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl/dialogs.c?rev=25114r1=25113r2=25114view=diff == --- trunk/client/gui-sdl/dialogs.c (original) +++ trunk/client/gui-sdl/dialogs.c Mon Jun 9 23:58:46 2014 @@ -3137,6 +3137,7 @@ struct NAT *pSetup; SDL_Rect area; int i; + struct nation_type *pnat; #define TARGETS_ROW 5 #define TARGETS_COL 1 @@ -3254,15 +3255,16 @@ /* nation name */ pSetup-nation = fc_rand(get_playable_nation_count()); - pSetup-nation_style = style_number(style_of_nation(nation_by_number(pSetup-nation))); - - copy_chars_to_string16(pStr, nation_plural_translation(nation_by_number(pSetup-nation))); + pnat = nation_by_number(pSetup-nation); + pSetup-nation_style = style_number(style_of_nation(pnat)); + + copy_chars_to_string16(pStr, nation_plural_translation(pnat)); change_ptsize16(pStr, adj_font(24)); pStr-render = 2; pStr-fgcol = *get_theme_color(COLOR_THEME_NATIONDLG_TEXT); - - pTmp_Surf_zoomed = adj_surf(get_nation_flag_surface(nation_by_number(pSetup-nation))); - + + pTmp_Surf_zoomed = adj_surf(get_nation_flag_surface(pnat)); + pWidget = create_iconlabel(pTmp_Surf_zoomed, pWindow-dst, pStr, (WF_ICON_ABOVE_TEXT|WF_ICON_CENTER|WF_FREE_GFX)); pBuf = pWidget; @@ -3310,52 +3312,25 @@ i = 0; zoom = DEFAULT_ZOOM * 1.0; + len = 0; styles_iterate(pstyle) { i = basic_city_style_for_style(pstyle); -if (i = 0) { - pTmp_Surf = get_sample_city_surface(i); - - if (pTmp_Surf-w 48) { -zoom = DEFAULT_ZOOM * (48.0 / pTmp_Surf-w); - } - - pTmp_Surf_zoomed = zoomSurface(get_sample_city_surface(i), zoom, zoom, 0); - - pWidget = create_icon2(pTmp_Surf_zoomed, pWindow-dst, WF_RESTORE_BACKGROUND); - pWidget-action = style_callback; - if (i != pSetup-nation_style) { -set_wstate(pWidget, FC_WS_NORMAL); - } - len = pWidget-size.w; - add_to_gui_list(MAX_ID - 1000 - i, pWidget); - break; -} - } styles_iterate_end; - - len += adj_size(3); - zoom = DEFAULT_ZOOM * 1.0; - - styles_iterate(pstyle) { -i = basic_city_style_for_style(pstyle); - -if (i = 0) { - pTmp_Surf = get_sample_city_surface(i); - - if (pTmp_Surf-w 48) { -zoom = DEFAULT_ZOOM * (48.0 / pTmp_Surf-w); - } - - pTmp_Surf_zoomed = zoomSurface(get_sample_city_surface(i), zoom, zoom, 0); - - pWidget = create_icon2(pTmp_Surf_zoomed, pWindow-dst, WF_RESTORE_BACKGROUND); - pWidget-action = style_callback; - if (i != pSetup-nation_style) { -set_wstate(pWidget, FC_WS_NORMAL); - } - len += (pWidget-size.w + adj_size(3)); - add_to_gui_list(MAX_ID - 1000 - i, pWidget); -} +pTmp_Surf = get_sample_city_surface(i); + +if (pTmp_Surf-w 48) { + zoom = DEFAULT_ZOOM * (48.0 / pTmp_Surf-w); +} + +pTmp_Surf_zoomed = zoomSurface(get_sample_city_surface(i), zoom, zoom, 0); + +pWidget = create_icon2(pTmp_Surf_zoomed, pWindow-dst, WF_RESTORE_BACKGROUND); +pWidget-action = style_callback; +if (i != pSetup-nation_style) { + set_wstate(pWidget, FC_WS_NORMAL); +} +len += pWidget-size.w; +add_to_gui_list(MAX_ID - 1000 - i, pWidget); } styles_iterate_end; pLast_City_Style = pWidget; @@ -3452,12 +3427,10 @@ pBuf-size.y = pBuf-next-size.y + pBuf-next-size.h + adj_size(20); /* Rest Style Buttons */ - if (pBuf != pLast_City_Style) { -do { - pBuf = pBuf-prev; - pBuf-size.x = pBuf-next-size.x + pBuf-next-size.w + adj_size(3); - pBuf-size.y = pBuf-next-size.y; -} while (pLast_City_Style != pBuf); + while (pBuf != pLast_City_Style) { +pBuf = pBuf-prev; +pBuf-size.x = pBuf-next-size.x + pBuf-next-size.w + adj_size(3); +pBuf-size.y = pBuf-next-size.y; } putline(pWindow-theme, Modified: trunk/client/gui-sdl2/dialogs.c URL: http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/dialogs.c?rev=25114r1=25113r2=25114view=diff == --- trunk/client/gui-sdl2/dialogs.c (original) +++ trunk/client/gui-sdl2/dialogs.c Mon Jun 9 23:58:46 2014 @@ -3132,6 +3132,7 @@ struct NAT *pSetup; SDL_Rect area; int i; + struct nation_type *pnat; #define TARGETS_ROW 5 #define TARGETS_COL 1 @@ -3249,14 +3250,15 @@ /* nation name */ pSetup-nation = fc_rand(get_playable_nation_count()); - pSetup-nation_style =
[Freeciv-commits] r25115 - /trunk/doc/README.packaging
Author: cazfi Date: Tue Jun 10 00:13:29 2014 New Revision: 25115 URL: http://svn.gna.org/viewcvs/freeciv?rev=25115view=rev Log: Added note about freeciv-ruledit to README.packaging list of changes in 2.6. See patch #4780 Modified: trunk/doc/README.packaging Modified: trunk/doc/README.packaging URL: http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.packaging?rev=25115r1=25114r2=25115view=diff == --- trunk/doc/README.packaging (original) +++ trunk/doc/README.packaging Tue Jun 10 00:13:29 2014 @@ -19,6 +19,10 @@ * Minimum gtk3 requirement for building gtk3-client is now 3.6. * There's new experimental sdl2-client. It can be built with --enable-client=sdl2 +* Development of ruleset editor, freeciv-ruledit, has begun. You can + include current version of it to the build with configure option + --enable-ruledit. It has same Qt5 dependencies as other Qt programs + in Freeciv distribution. * System lua library is now used by default. Copy of lua distributed with freeciv is used only if system lua is not found, or it's explicitly requested with configure option --disable-sys-lua ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits
[Freeciv-commits] r25116 - /branches/S2_4/server/unithand.c
Author: jtn Date: Tue Jun 10 01:25:11 2014 New Revision: 25116 URL: http://svn.gna.org/viewcvs/freeciv?rev=25116view=rev Log: Fix that a unit which is transporting other units can conquer a city. Reported by Marko Lindqvist (cazfi@gna), patch by pepeto@gna. See gna bug #20789 Modified: branches/S2_4/server/unithand.c Modified: branches/S2_4/server/unithand.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_4/server/unithand.c?rev=25116r1=25115r2=25116view=diff == --- branches/S2_4/server/unithand.c (original) +++ branches/S2_4/server/unithand.c Tue Jun 10 01:25:11 2014 @@ -1339,6 +1339,7 @@ { struct player *pplayer = unit_owner(punit); struct city *pcity = tile_city(pdesttile); + bool taking_over_city = FALSE; /*** Phase 1: Basic checks ***/ @@ -1568,6 +1569,7 @@ return TRUE; } + taking_over_city = TRUE; /* Taking over a city is considered a move, so fall through */ } } @@ -1580,7 +1582,9 @@ unit_list_iterate(unit_tile(punit)-units, pcargo) { if (unit_contained_in(pcargo, punit) (is_non_allied_unit_tile(pdesttile, unit_owner(pcargo)) - || is_non_allied_city_tile(pdesttile, unit_owner(pcargo { + || (!taking_over_city + is_non_allied_city_tile(pdesttile, + unit_owner(pcargo) { notify_player(pplayer, unit_tile(punit), E_BAD_COMMAND, ftc_server, _(A transported unit is not allied to all units or city on target tile.)); ___ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits