URL: <http://gna.org/patch/?3169>
Summary: Fixed names for road referring specials Project: Freeciv Submitted by: cazfi Submitted on: Tue 28 Feb 2012 08:09:45 PM EET Category: general Priority: 5 - Normal Status: Ready For Test Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Planned Release: 2.5.0 _______________________________________________________ Details: I've been playing with several alternative ways to handle compatibility between gen-roads and old style saves with roads saved as two specials. Some parts of the code map between old specials and new roads by their name, some parts depend on order of roads in ruleset, newest parts depend on compatibility specials defined in ruleset. Last model is the way to go. For name based mapping between specials and roads special names saved to savegame were actually road names. Idea was that if new ruleset defined "Path" and "Maglev" instead of "Road" and "Railroad", future versions could determine which road type those special bits referred to by the names saved. Having compatibility specials defined in ruleset removes need for this, and actually allows more correct mappings in some cases. For one, loading old savegames for old ruleset that has been so far forced to have "Railroad" and which now would rename it as "Maglev" would fail to load old Railroads as Maglevs even if the name would be the only thing changed. Attached patch restores special_rule_name() for S_ROAD to be always "Road" regardless of road type it refers to, and similarly "Railroad" for S_RAILROAD. Thus freeciv internally, and in savegames, has naming consistent over versions for these bits. special_name_translation() that is supposed to tell user visible name for special still returns name of the road type special refers to. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Tue 28 Feb 2012 08:09:45 PM EET Name: FixedRoadSpecialNames.diff Size: 1kB By: cazfi <http://gna.org/patch/download.php?file_id=15238> _______________________________________________________ Reply to this item at: <http://gna.org/patch/?3169> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev