#3303 closed enhancement (fixed)
[PATCH] Tweak ResourceTrickle Schema
Reported by: | s0600204 | Owned by: | s0600204 |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 19 |
Component: | UI & Simulation | Keywords: | patch |
Cc: | Patch: |
Description
In JS Components where collectable resources are expressed in rates, the XML Schema is typically
// ResourceGatherer.js <Rates> <food.fish>1</food.fish> <metal.ore>3</metal.ore> <stone.rock>3</stone.rock> <wood.tree>2</wood.tree> </Rates> // Cost.js <Resources> <food>50</food> <wood>0</wood> <stone>0</stone> <metal>25</metal> </Resources>
The exception to this is ResourceTrickle:
<FoodRate>1.0</FoodRate> <WoodRate>1.0</WoodRate> <StoneRate>0.75</StoneRate> <MetalRate>0.75</MetalRate>
The provided patch, adapted from the resource-agnostic mod on GitHub, modifies the XML Schema of the ResourceTrickle Component and all of the entity templates that use it, so as to match the schemas of the other components.
Attachments (1)
Change History (4)
by , 9 years ago
Attachment: | trickle.diff added |
---|
comment:1 by , 9 years ago
Looks good! You can leave the schema indentation as it was though, because it is easier to read and modify. Thanks for the patch :)
comment:3 by , 9 years ago
Keywords: | review removed |
---|
Thanks for the patch. It needed an interleave as otherwise there were validation failures. I also made GetRates()
use a loop instead of too much hard-coding.
Note:
See TracTickets
for help on using tickets.
Proposed patch