#2413 closed defect (fixed)
[PATCH] Resource Trickle
Reported by: | O.Davoodi | Owned by: | O.Davoodi |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 16 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
Resource trickle component for Persian Apadana (and possible future entities/mods).
Attachments (2)
Change History (6)
by , 10 years ago
Attachment: | ResourceTrickle.patch added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
There is a corral ticket: #1907.
Merging it gives some problems, like corrals only expect to give one resource type at a time, and there's no default rate yet. I also wonder if we should abuse corrals for something like this. The corral patch is also certainly not finished (mainly due to design issues, and the consequences of that).
So I'd like to get this in separately.
One thing I don't like in the patch is the storing of the decimals. IMO we should support decimal resources, and just round them in the GUI. It would make code like this a lot simpeler, and wouldn't require us to keep rounding stuff in all components that have something to do with resources. (note that health was also made decimal some time ago, for similar reasons).
by , 10 years ago
Attachment: | ResourceTrickle&FloatingResources.patch added |
---|
Modified as per sanderd17's comments
comment:4 by , 10 years ago
Keywords: | review removed |
---|
I don't know anything about the coding (neither what's required, nor what you have done already), so I might be wrong, but just from a theoretical point of view it seems like something like this could be used both for a resource trickle like this and something like the corrals: I.e. resource trickle but only when some required conditions are met (i.e. animals in the corral) and with a rate depending on conditions (i.e. how many animals are in the corral). This probably has to be discussed among the programmers though as the corral will not always have a resource trickle, but rather other effects as well (to be decided exactly, but something like quicker train speed).
I just think it would be bad to develop the same thing twice if it can be done at the same time with a few adjustment :)