[Freeciv-Dev] [bug #22243] City with more than max trade routes can't change them
Update of bug #22243 (project freeciv): Status: Ready For Test = Fixed Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/bugs/?22243 ___ Message posté via/par Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #22243] City with more than max trade routes can't change them
Update of bug #22243 (project freeciv): Assigned to:None = pepeto ___ Follow-up Comment #3: Updated against svn HEAD. Additionally, make the string The city of XXX already has YYY better trade routes! only visible if YYY 0 and with plural form translations. Now, I just need to make a savegame able to test the feature correctly... (file #22867, file #22868) ___ Additional Item Attachment: File name: trunk_allow_displace_trade_over_max2.patch Size:16 KB File name: S2_5_allow_displace_trade_over_max2.patch Size:16 KB ___ Reply to this item at: http://gna.org/bugs/?22243 ___ Message posté via/par Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #22243] City with more than max trade routes can't change them
Update of bug #22243 (project freeciv): Category:None = general Status:None = Ready For Test ___ Follow-up Comment #2: Attached patch applies trunk and S2_5. (establish_trade_route() also checks ==max, but in that case assertions rather than graceful handling are appropriate.) I have replaced there also by =max, because the function potentially can be called by another part. However, I also added assertions to ensure there is still a free slot. Additionally, I have removed the test in remove_smallest_trade_route() which looked incorrect (the trade value may be 0, even if a trade route is established). In base_handle_unit_establish_trade(), removed the city info from pcity_out_of_home to pcity_out_of_dest and its reverse. I don't understand it, it looks like enabling cheating... (file #21483) ___ Additional Item Attachment: File name: allow_displace_trade_over_max.patch Size:15 KB ___ Reply to this item at: http://gna.org/bugs/?22243 ___ Message posté via/par Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #22243] City with more than max trade routes can't change them
URL: http://gna.org/bugs/?22243 Summary: City with more than max trade routes can't change them Project: Freeciv Submitted by: jtn Submitted on: Sat 28 Jun 2014 22:16:11 BST Category: None Severity: 2 - Minor Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Release: Discussion Lock: Any Operating System: Any Planned Release: 2.5.0, 2.6.0 ___ Details: After the fix for bug #21141 (as modified by bug #21152), if a city ends up with more trade routes than the current maximum, I think the routes become frozen; it's impossible for the player to influence them by establishing new routes, and if they try they'll get a potentially inaccurate message The city of Linz already has current max better trade routes!, even if the new route would have had better trade than any of the existing ones. (Not tested this.) The reduction in max traderoutes might not be something they can easily reverse (wonder loss, tech loss, ...). Depending on the ruleset, players might be forced to resort to giving away their city and retaking it (causing routes to be cancelled) to regain control of its trade routes. This may limit the practical use of the Max_Trade_Routes effects in rulesets to requirements likely to survive indefinitely. I think a sensible solution would be to allow establishing a new route in this case iff the new one would yield more than the *sum* of the weakest N routes where N = excess+1, and have the new route cancel *all* of those routes, bringing the total within the current max. (This will be slightly fiddly to implement since it involves sorting/ranking the routes.) * (If we're going to add the ability to sort the routes, I wonder about an alternative behaviour for excess traderoutes where the routes that would yield least in a given turn become inactive, yielding nothing. Establishing a new route in this case would have the same behaviour, bringing the number of routes down to the current max, treating the excess routes as having value 0.) Alternatively, the minimal code change would be to disable the N better trade routes message, leaving just the bare infuriating Sorry, your Caravan cannot establish a trade route here! (but that doesn't improve gameplay, of course). ___ Reply to this item at: http://gna.org/bugs/?22243 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #22243] City with more than max trade routes can't change them
Follow-up Comment #1, bug #22243 (project freeciv): Also, can_establish_trade_route() checks for ==max, so currently gives the wrong answer in the face of excess routes. It should be updated for whatever the conclusion of this is. (establish_trade_route() also checks ==max, but in that case assertions rather than graceful handling are appropriate.) ___ Reply to this item at: http://gna.org/bugs/?22243 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev