Barracks can't be built with old savegames
Bug #1685331 reported by
GunChleoc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
When loading an old savegame (e.g. Build 19) in current trunk, the Barracks isn't added to the list of allowed buildings, turning the games unplayable.
Related branches
lp:~widelands-dev/widelands/bug-1685331-oldsaves
Rejected
for merging
into
lp:widelands
- GunChleoc: Needs Fixing
-
Diff: 105 lines (+33/-0)6 files modifieddata/tribes/atlanteans.lua (+1/-0)
data/tribes/barbarians.lua (+1/-0)
data/tribes/empire.lua (+1/-0)
src/logic/map_objects/tribes/tribe_descr.cc (+5/-0)
src/logic/map_objects/tribes/tribe_descr.h (+2/-0)
src/logic/map_objects/tribes/warehouse.cc (+23/-0)
lp:~widelands-dev/widelands/bug-1685331-barracks_old_saves
- Notabilis: Approve
-
Diff: 115 lines (+29/-2)7 files modifieddata/tribes/atlanteans.lua (+1/-0)
data/tribes/barbarians.lua (+1/-0)
data/tribes/empire.lua (+1/-0)
src/logic/map_objects/tribes/tribe_descr.cc (+5/-0)
src/logic/map_objects/tribes/tribe_descr.h (+2/-0)
src/logic/map_objects/tribes/warehouse.cc (+2/-2)
src/map_io/map_allowed_building_types_packet.cc (+17/-0)
Changed in widelands: | |
status: | Confirmed → Fix Committed |
To post a comment you must log in.
A related message while loading the game:
WARNING: player 1 is allowed to create worker type Recruit but his Headquarters 259 at (11, 53) does not have a next_spawn time set for that worker type; setting it to 132107
(Printed by Warehouse: :load_finish( ).)
I am not sure how to fix this, though. Always enabling the barracks when loading a game is not feasible since that would break campaigns even when saved with the same game version.
The easiest way would be to simply ignore it. Why should anyone load that old saves anyway? ;-)
We also could use the notification above and add a special case if the recruit has not been loaded (Or add a global special case when a pre-barracks save game is loaded. Not sure whether this is possible).
Then we could either revert to the old logic and make soldiers recruitable in the warehouses. However, this might affect games played afterwards when not restarting the program. Or we could enable barracks in this case. This would possibly result in a useless building when an old campaign save game has been loaded but would probably be fine for normal games.