Enhancing a building wastes its wares

Bug #559854 reported by Dom De Felice
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Wishlist
Unassigned

Bug Description

Every time I enhance a building all the wares that were in it are lost. So I lost rations when I enhance a mine to a deep mine, I lost wheat and water when I enhance a micro brewery to a brewery, etc.
It would be better if all the wares inside the building could be ejected when enhancing it.

Revision history for this message
Victor Pelt (victor-pelt) wrote :

it's not a bug, it's a feature :-D

if we want to eject wares we would have to look at a few things
- do we want to fully eject all wares before starting to upgrade (this would slow down an upgrade a bit)
- who is ejecting the wares if no worker present. (if a carrier needs to pick up wares similar to dropoff it would be quite different from how goods are currently picked up)

Changed in widelands:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Dom De Felice (dom-felice) wrote :

I think the best way would be to instantly drop out all the wares at the building flag. The carriers will pick up them. This way the upgrade wouldn't slow down.
If the flag at the building is full, then the wares that exceed could be lost.
Would it be difficult to implement?

Another idea.
If the upgrading building will use some of the same wares of the old one, these wares could be stored inside the upgrading building. Only unused wares should be ejected.

Revision history for this message
Victor Pelt (victor-pelt) wrote :

two problems there

it's kind of odd if wares would suddenly *puff of smoke* appear at a flag. all other places wares are carried out of the building

new buildings arn't aware where they came from. and a construction site (usually) doens't contain the wares that were used. it would be quite a bit of (messy) overhead if we had to keep track of what wares were there but are currently not used.

slightly better would be is when the builder comes he starts 'cleaning' the old building first (and carry out all the present wares that are no longer required) what do people think of that sollution?

Revision history for this message
SirVer (sirver) wrote :

I like the idea with the builder. But I'd much prefer if I could reduce the max-size of the WaresQueues inside the buildings and have the worker carry out the wares. I could then reduce the wares queues sizes to zero and wait till the building is empty before enhancing. Afaik, timowi is working on a similar solution in his branch.

I think it is in the users responsibility to care for the wares: one could decide if the wares are important or if a fast upgrade would be more important.

Revision history for this message
Dom De Felice (dom-felice) wrote :

Good ideas. I like them both.
Probably the one permitting to set queues maximum length is the best.
I would just add a warning to the user that all wares inside the building will be lost during enhancement or, even better, this could be added as a "tip of the day" appearing while loading the game.

Revision history for this message
Timowi (timo-wingender) wrote :

This is one feature I worked on end of last year. I have some half working code with this. As with some other new economy related feature I decided to do this more general and do it after improvements to the requests handling. I ran in some problem with altering/deleting/suspending request. They are quite sensitive currently. This should be quite easy after the economy improvements.

I let the workers carry out the wares and go home after that. But it was more a proof of concept. I think the best idea is to let the builder carry out the wares before start to work. I planned a similar feature for a destructionsite to get wares from buildings to be destroyed.

Revision history for this message
Arnaudus (a-lerouzic) wrote :

Related bug reports: bug #536570 for ware dropping, bug #587251 about wasting wares when destroying buildings.

SirVer (sirver)
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → SirVer (sirver)
Revision history for this message
SirVer (sirver) wrote :

Fixed in r6022. But see bug 871401.

Changed in widelands:
status: In Progress → Fix Committed
assignee: SirVer (sirver) → nobody
milestone: none → build17-rc1
Revision history for this message
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
_aD (ad-simplypeachy) wrote :

This is marked as released but the feature does not seem to work.
Build an Empire or tavern or Barbarian micro brewer.
Wait for all wares to be delivered.
Upgrade to next level.
Upgrade begins immediately. Wares are not removed and wares are not present once the upgrade is completed.

Revision history for this message
SirVer (sirver) wrote :

I decided that it should be up to the user to decide if he wanted to empty the building (using ware level's) before dismantling (because he wants to keep the content of the building) or not (because he is only interested in the building materials). So the current situation is indeed as I planned it to be - but I should have stated this in any of the bug reports related to this topic.

So, I indeed see this as fix committed. I intend users to set wares indicators to 0, wait till the building is empty and then dismantle.

Revision history for this message
_aD (ad-simplypeachy) wrote :

That's fair - sometimes I do care about the wares, sometimes I don't.

Revision history for this message
ypopezios (ypopezios) wrote :

In my opinion (and I suspect that of the majority too), that was a bad call. The default behaviour should be to save the wares. And someone could skip that, e.g. by pressing Ctrl.

Revision history for this message
ypopezios (ypopezios) wrote :
Revision history for this message
Johannes Kalliauer (jokalliauer1989) wrote :

@sirver Why is the Status "Fix Released"? Isn't it a duplicate of https://bugs.launchpad.net/widelands/+bug/1152674

Revision history for this message
kaputtnik (franku) wrote :

See comment #11

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.