Opened 15 months ago
Closed 15 months ago
#6744 closed defect (fixed)
Negative animal costs and eco points in the summary
Reported by: | Langbart | Owned by: | Freagarach |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 27 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: | Phab:D4951 |
Description
to reproduce
- build a corral
- make a
sheep
- check summary =>
score
=>economy score
- check summary =>
resources
=>gathered/used
reproducible
- works correctly in
Alpha XXI Ulysses
[18915]
Alpha XXII Venustas
[19922] it shows the correct resources, but the economy score shows-5
Alpha XXIII
[21946] negative eco score and wronggathered/used
related
@temple wrote: (26/Nov/17) We keep track of the vegetarian food gathered, so I think the vegetarian ratio is still correct. It can get weird if we train some sheep but don't gather them, since that counts as negative food gathered, so the ratio could be over 100% or even negative in the very early game. But I don't think that's anything to worry about.
- Phab:rP20543 (concerned raised - 20/Oct/19)
@elexis wrote: It changes history, once a resource was gathered, it will remain true that the resource was gathered. Therefore the number of resources gathered should be monotonically increasing. Since the economy score is also the number of resources gathered divided by 10, it equally becomes possible to reduce the score over time. Even possible to get negative score by starting the match, training some sheep and not gathering them.
simulation/components/StatisticsTracker.js
Line | |
---|---|
219 | if (cmpUnitEntityIdentity.HasClass("Domestic") && costs) |
220 | { |
221 | // Subtract costs for sheep/goats/pigs to get the net food gain/use for corralling |
222 | this.resourcesUsed.food -= costs.food; |
223 | this.resourcesGathered.food -= costs.food; |
224 | } |
expected behavior
- gather resource counter never becomes negative
- no change of the history by subtracting the used resources
- no negative eco points
Attachments (3)
Change History (5)
by , 15 months ago
by , 15 months ago
by , 15 months ago
comment:1 by , 15 months ago
Owner: | set to |
---|---|
Patch: | → Phab:D4951 |
comment:2 by , 15 months ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
In 27562: