Carriers can/can't be removed from Warehouses

Bug #1100045 reported by Gabriel Margiani
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Low
Unassigned

Bug Description

If you set the "remove from here" attribute to carriers in a warehouse, one after the other will leave the building, and a new one will be crated, so the number of carriers in a warehouse will always be around 100 and in addition you have a stream of carriers going to another warehouse, that's stupid, so i would suggest to ignore the remove attribute for carriers.

Tags: worker

Related branches

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

I agree. Since carriers are always available, there is no need to remove them from a warehouse or prefer the storage in another one.

Changed in widelands:
status: New → Confirmed
Changed in widelands:
milestone: none → build18-rc1
Revision history for this message
Jens Beyer (qcumber-some) wrote :

But then we have Bug #580923 which states that carriers may have build costs, too (which is by design!)... and that means, carriers are not always available...?

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

I guess the underlying reason new ones are created is since they don't have any build cost. As Jens points out, that is possible to set though.

While it in practice doesn't make a lot of sense to do so, I think it in general makes sense to be able to send carriers away. This feature is available for all other workers, and it is only because carriers happen to cost zero we get a somewhat odd result. I also believe it will add more complexity and potential for breakage if we were to try to exclude carriers from being sent away. In addition, that would make it trickier to deal with them if they have been given a build cost.

tags: added: worker
Revision history for this message
SirVer (sirver) wrote :

Carrier having build costs is not anything we should ever have in the main game - it would be nice for scenarios, but not for the main game. So I think this can be handled separately.

Revision history for this message
SirVer (sirver) wrote :

Also, carriers are special (and special cased) in the code: they are created at a constant rate, no matter if there is need for them. Also when there is no carrier in the building we create one when one is needed to fetch up a ware. So giving them buildcost will not work completely as expected.

Revision history for this message
cghislai (charlyghislain) wrote :

So what is the fix here? Prevent setting ware preference on carriers?

Another option - which may be more suited in case carriers would have buildcost under some circumstances, is to tweak the auto-creation of carriers to the stock of 100. This could be done only if they are free, if the ware house accept to store that ware and if there is no other warehouse with higher preference for that ware in the economy.

Revision history for this message
SirVer (sirver) wrote :

> So what is the fix here? Prevent setting ware preference on carriers?
I'd say so.

Everything else seems overengineering for me at this point. YAGNI - you ain't gonna need it.

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

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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