widelands
widelands copied to clipboard
WIP: Proof of concept: Refit to warship at ports reusing expedition code (rebased)
Mirrored from Codeberg
Created on Sat Feb 17 19:10:59 CET 2024 by Tóth András (tothxa)
Type of change New feature
Issue(s) closed Replaces #6201 (rebased on master after naval warfare merge)
Alternative to #6167
Improves #4284: move start expedition button to the expedition tab (which becomes always visible)
New behavior Collecting refitting costs is now handled by the expedition bootstrap code, so ware priorities can be used.
Possible regressions A lot? Expedition bootstrap, refitting, ship programs, etc.
Additional context This is not necessarily meant as a "real" PR. The main goal is to give a reference for alternatives to #6167.
As my problem with #6167 was that it used too many new concepts and too much new code, I thought I'd give this a shot. (to me, this had been the natural approach to military expeditions before the naval warfare branch was started) It was certainly much harder though than I expected (though much of that came from my inexperience with many of these code parts), and I'm not entirely sure if these are all that much simpler changes in the end.
There are a lot of critical To Do items scattered all around the code, the worst one is that SAVELOADING OF EXPEDITIONS AND REFITTING DOES NOT WORK yet.
This also includes a simpler implementation of adding some bobs on top of others on the same node.
Not marked in the code as a to do item, but I'd also make ships move away from the portdock while the shipwright's working to have a better view of things. Possibly also converting the ship to an immovable for the time of the refit. But these are completely new additions that can be done separately later.
Assigned to tothxa