GunChleoc has proposed merging 
lp:~widelands-dev/widelands/lenient_allowed_buildings into lp:widelands.

Commit message:
When loading a game, simply skip buildings in the allowed list if they no 
longer exist

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/lenient_allowed_buildings/+merge/351749

Removing the market made savegames incompatible, even if they didn't have any 
market buildings in it. This will fix it - a warning is enough. The change 
should also make tribe prototyping a bit easier.
-- 
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/lenient_allowed_buildings into lp:widelands.
=== modified file 'src/map_io/map_allowed_building_types_packet.cc'
--- src/map_io/map_allowed_building_types_packet.cc	2018-07-08 15:16:16 +0000
+++ src/map_io/map_allowed_building_types_packet.cc	2018-07-30 08:27:27 +0000
@@ -78,7 +78,7 @@
 						if (tribe.has_building(index)) {
 							player->allow_building_type(index, allowed);
 						} else {
-							throw GameDataError("tribe %s does not define building type \"%s\"",
+							log("WARNING: MapAllowedBuildingTypesPacket - tribe %s does not define building type \"%s\"\n",
 							                    tribe.name().c_str(), name);
 						}
 					}

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to