Remove wares from a building before dismantling or upgrading

Bug #1152674 reported by Paul Pogonyshev
40
This bug affects 6 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Unknown

Bug Description

At least by default worker and/or carrier should remove all wares from a building that is designated for dismantling. Player can already do this by reducing all slots to zero capacity, but current behavior is spoilery (not everyone knows of this) and is quite tiresome (many clicks required for optimal play). Destroying should probably work as now to remain instantaneous.

To reproduce: start as atlanteans, build gold weaver, stop it. All four starting gold bars are moved into the building. Dismantle it --- gold is gone forever. You can save the gold by manually reducing the stack to zero capacity before dismantling.

Tags: tribes ui
Revision history for this message
Jens Beyer (qcumber-some) wrote :

This is already being discussed (more or less...) at

http://wl.widelands.org/forum/topic/1093/?page=2

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

A suggestion on how to implement this feature: http://wl.widelands.org/forum/post/8943/

"The dismantle/upgrade action could, by default, wait for wares to be removed, but after a second click would then "override" and discard the wares. The dismantle/upgrade icon could be toggled to have a small overlay representing the secondary function. This would require no additional buttons and no additional keyboard modifiers need to be remembered. It would default to "conservative" which seems to be the preferred behaviour, reading other replies in this thread."

summary: - Wares should be evaquated from a building before dismantling starts
+ Remove wares from a building before dismantling or upgrading
Changed in widelands:
status: New → Confirmed
Revision history for this message
Nicolai Hähnle (nha) wrote :

Frankly, this changing behaviour of the dismantle/upgrade button seems very opaque and magical to me, pretty hard to understand in any case. I'm not convinced that having to do a few more mouseclicks for optimal play is a bad thing in any case.

I understand the objection that sites which can store many items require many clicks (or staying long on the arrow buttons) to completely order them to be emptied. Perhaps Ctrl+Click on the arrows could be implemented to help with this. This is something that can be pointed out in the tips that show at the start of the game.

Revision history for this message
cghislai (charlyghislain) wrote :

I think it makes sense to to remove wares in the building when dismantling - it makes no sense they vanish in the air.
It can be the worker that take care of it before builders arrive - that's what i would do if i had to make my house dismantled by someone else. Or it can be that the wares are added to the dismantlesite, so that the builder take care of this job.

Revision history for this message
SirVer (sirver) wrote :

I still think it is not a good idea: e.g. i might not care for a ware (because I have plenty of it, think water) and much rather have the building be enhanced more quickly. But I do care about one of the wares (say marble). Now I can drop the marble manually and then enhance. The current approach is more flexible than unconditionally send out all wares. I vote for won't fix.

Revision history for this message
fuchur (fuchur77) wrote :

Most of the times I remove the wares before ugrading or dismantling a building. That means settint the stock target to zero, leave the window open (otherwise I forget to come back and dismantle...), and wait until the stock is empty. Therefore I'd like to have a more simple way to handle that. It's not the number of needed clicks but the time I need to wait before I can perform the one click I really wanted to.

But I understand the point of SirVer that people only want to remove precious wares. And I fully agree that a lot of regrowing wares like water can be considered an acceptable loss in most cases.

To satisfy both parties I have a suggestion. Send the command "dismantle" or "upgrade" in a queue al last item after removing the wares. First you set the target quantity for each ware to the desired number, then click on dismantle. If the current number in stock is higher than the target number the ware will be removed down to that target number. After that the building will be dismantled. If the current ware count is already lower than the target quantity dismantling will start immediately.

I don't know if this is diffcult or easy to implement. And I know this behaviour would appear to be magic, but it would be a solution to the wishes and needs of everyone.

Revision history for this message
SirVer (sirver) wrote :

the magic is the problem in your suggestion fuchur: it would behave differently depending on some settings. If you want to dismantle quickly you might be surprised by the additional waiting time (during which a building might still be attackable for example).

Another way would be to show an additional window before actually dismantling where you can check which wares you want to salvage - this would be another UI element though that would never be used anywhere else. Still, it is explicit, easy to understand and would meet all user requests in this discussion. It would mean at least one additional click for dismantling, but we could merge this with the "do you really want to dismantle this site" dialogue with CTRL + click keeping its current behavior.

Revision history for this message
fuchur (fuchur77) wrote :

Maybe I did not describe clearly what I had in mind. If the target quantity for a ware is not changed then the dismantling will start immediately. Only if the target quantity is set to a value lower than the current number of wares in stock the dismantling will be delayed until the ware items are moved out. And I assume if someone does that on purpose just before clicking on dismantle he/she will know that it will take some time before the actual dismantle process starts.

As the dismantle feature is not integrated in the tutorials yet (I think so, didn't play them for a while), this could be mentioned there.

SirVer, I also like your suggestion to integrate the possibility to set the ware removal in the "do you really want to dismantle this site" dialogue.

Revision history for this message
SirVer (sirver) wrote :

fuchur, I did understand you perfectly. I just do not like that this is a fairly obscure overloading of the target quantity settings. I think we should not do this - players need to learn this feature independently of the other meaning of target quantity. The more I thought about it, the more I like the idea of asking which wares should be carried out at the confirmation dialog. It is explicit and doesn't even require an extra click compared to the current situation.

Revision history for this message
fuchur (fuchur77) wrote :

I like your proposal, too. And you are perfectly right, it's explicit and self-explaining and therefore the better way to manage it.

Revision history for this message
wl-zocker (wl-zocker) wrote :

I think that asking explicitly in the dismantle confirmation which wares should be kept is the best and clearest way of handling this problem.
If you skip the confirmation with Ctrl+click, the default way should be to remove all wares before the building is dismantled because this is the way most people use (based on the comments in https://wl.widelands.org/forum/topic/1093/).
It should be the same thing if you upgrade a building (to be consistent).

Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
Revision history for this message
SirVer (sirver) wrote :

Let's got with the suggestion in #11.

Changed in widelands:
status: Expired → Confirmed
importance: Undecided → Low
Revision history for this message
GunChleoc (gunchleoc) wrote :
GunChleoc (gunchleoc)
Changed in widelands:
milestone: none → build20-rc1
GunChleoc (gunchleoc)
Changed in widelands:
milestone: build20-rc1 → build21-rc1
Revision history for this message
Teppo Mäenpää (kxq) wrote :

In latest trunk, the ware setting seems to survive an upgrade. So, if one empties a brewery before upgrade, the upgraded mead brewery will not be accepting any wares either, unless player takes action.

Revision history for this message
Benedikt Straub (nordfriese) wrote :

Ouch…
I´m unable to code stuff at the moment, but if someone wants to take care of this, just add something like
if (pair.second.desired_fill == 0) {
    pair.second.desired_fill = pair.second.max_fill;
}
after https://bazaar.launchpad.net/~widelands-dev/widelands/trunk/view/head:/src/logic/map_objects/tribes/productionsite.cc#L1051 and L1060. This will then make for desirable behaviour IMHO.

Revision history for this message
Teppo Mäenpää (kxq) wrote :

Would the purpose of the code be obvious to casual reader? I fully believe that it would work right, please do not understand me wrong.

Actual fix of this bug would be a more clean way to come around, but it is of course more work.

GunChleoc (gunchleoc)
tags: added: tribes ui
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Confirmed → Won't Fix
Revision history for this message
Johannes Kalliauer (jokalliauer1989) wrote :
Changed in widelands:
importance: Low → Unknown
status: Won't Fix → Unknown
Changed in widelands:
status: Unknown → Fix Released
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

Remote bug watches

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