← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/productionsite-bugs into lp:widelands

 

1 nit for the saveloading, not tested yet.

We should also remember to add TODO comments when adding savegame compatibility code - this will make it easier to find and remove after Build 21.

Diff comments:

> 
> === modified file 'src/map_io/map_buildingdata_packet.cc'
> --- src/map_io/map_buildingdata_packet.cc	2019-04-09 17:16:11 +0000
> +++ src/map_io/map_buildingdata_packet.cc	2019-05-11 12:50:41 +0000
> @@ -710,6 +710,12 @@
>  				productionsite.statistics_[i] = fr.unsigned_8();
>  			productionsite.statistics_string_on_changed_statistics_ = fr.c_string();
>  			productionsite.production_result_ = fr.c_string();
> +
> +			if (kCurrentPacketVersionProductionsite >= 7) {

There is a line higher up that you will need to change too:

   if (packet_version == kCurrentPacketVersion)

> +				productionsite.main_worker_ = fr.signed_32();
> +			} else {
> +				productionsite.main_worker_ = productionsite.working_positions_[0].worker ? 0 : -1;
> +			}
>  		} else {
>  			throw UnhandledVersionError("MapBuildingdataPacket - Productionsite", packet_version,
>  			                            kCurrentPacketVersionProductionsite);


-- 
https://code.launchpad.net/~widelands-dev/widelands/productionsite-bugs/+merge/367306
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/productionsite-bugs.


References