Enhancing a building wastes its wares

Bug #559854 reported by Dom De Felice on 2010-04-10
This bug affects 7 people
Affects Status Importance Assigned to Milestone

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.

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
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.

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?

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.

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.

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.

Arnaudus (a-lerouzic) wrote :

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

SirVer (sirver) on 2011-10-08
Changed in widelands:
status: Confirmed → In Progress
assignee: nobody → SirVer (sirver)
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
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
_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.

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.

_aD (ad-simplypeachy) wrote :

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

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.

ypopezios (ypopezios) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints