Reimplement resource indicators
Bug #1784208 reported by
GunChleoc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Follow-up from https:/
How do we ensure which resource gets linked to which resource indicator, and that the tribes have one for each resource? Maybe we can find a solution here that's more clever, i.e. moving their definitions from the tribes to the world. An additional check during tribe loading might also be sufficient here, in case we would like to have the possibility of individual graphics per tribe in the future.
Related branches
lp:~widelands-dev/widelands/rework-resource-indicators
- GunChleoc: Approve
- Benedikt Straub: Needs Resubmitting
-
Diff: 2608 lines (+1415/-524)48 files modifieddata/campaigns/bar01.wmf/scripting/texts.lua (+10/-10)
data/campaigns/tutorial03_seafaring.wmf/scripting/mission_thread.lua (+1/-1)
data/tribes/atlanteans.lua (+37/-10)
data/tribes/barbarians.lua (+35/-10)
data/tribes/empire.lua (+35/-10)
data/tribes/frisians.lua (+35/-10)
data/tribes/immovables/resi/atlanteans/init.lua (+230/-0)
data/tribes/immovables/resi/barbarians/init.lua (+221/-0)
data/tribes/immovables/resi/empire/init.lua (+221/-0)
data/tribes/immovables/resi/frisians/init.lua (+230/-0)
data/tribes/immovables/resi/helptexts/coal_1.lua (+17/-0)
data/tribes/immovables/resi/helptexts/coal_2.lua (+17/-0)
data/tribes/immovables/resi/helptexts/gold_1.lua (+17/-0)
data/tribes/immovables/resi/helptexts/gold_2.lua (+17/-0)
data/tribes/immovables/resi/helptexts/iron_1.lua (+17/-0)
data/tribes/immovables/resi/helptexts/iron_2.lua (+17/-0)
data/tribes/immovables/resi/helptexts/none.lua (+14/-0)
data/tribes/immovables/resi/helptexts/stones_1.lua (+32/-0)
data/tribes/immovables/resi/helptexts/stones_2.lua (+32/-0)
data/tribes/immovables/resi/helptexts/water.lua (+14/-0)
data/tribes/immovables/resi_coal1/helptexts.lua (+0/-17)
data/tribes/immovables/resi_coal1/init.lua (+0/-23)
data/tribes/immovables/resi_coal2/helptexts.lua (+0/-17)
data/tribes/immovables/resi_coal2/init.lua (+0/-23)
data/tribes/immovables/resi_gold1/helptexts.lua (+0/-17)
data/tribes/immovables/resi_gold1/init.lua (+0/-23)
data/tribes/immovables/resi_gold2/helptexts.lua (+0/-17)
data/tribes/immovables/resi_gold2/init.lua (+0/-23)
data/tribes/immovables/resi_iron1/helptexts.lua (+0/-17)
data/tribes/immovables/resi_iron1/init.lua (+0/-23)
data/tribes/immovables/resi_iron2/helptexts.lua (+0/-17)
data/tribes/immovables/resi_iron2/init.lua (+0/-23)
data/tribes/immovables/resi_none/helptexts.lua (+0/-14)
data/tribes/immovables/resi_none/init.lua (+0/-23)
data/tribes/immovables/resi_stones1/helptexts.lua (+0/-27)
data/tribes/immovables/resi_stones1/init.lua (+0/-23)
data/tribes/immovables/resi_stones2/helptexts.lua (+0/-27)
data/tribes/immovables/resi_stones2/init.lua (+0/-23)
data/tribes/immovables/resi_water1/helptexts.lua (+0/-14)
data/tribes/immovables/resi_water1/init.lua (+0/-23)
data/tribes/init.lua (+4/-10)
data/tribes/scripting/help/building_help.lua (+15/-8)
src/logic/editor_game_base.cc (+15/-0)
src/logic/map_objects/tribes/tribe_descr.cc (+46/-35)
src/logic/map_objects/tribes/tribe_descr.h (+12/-0)
src/map_io/tribes_legacy_lookup_table.cc (+49/-6)
src/scripting/lua_map.cc (+24/-0)
src/scripting/lua_map.h (+1/-0)
Changed in widelands: | |
assignee: | Benedikt Straub (nordfriese) → nobody |
status: | In Progress → Fix Committed |
To post a comment you must log in.
I see two possibilities here:
a) Each resource gets a property
resi = {
[10] = "resi_coal1",
[20] = "resi_coal2",
}
like for editor amount images. The resi-immovables would be moved from tribe to world.
b) Each tribe specifies a table of
resi= {
coal = {
[10] = "resi_coal1",
[20] = "resi_coal2",
},
iron = {
[10] = "resi_iron1",
[20] = "resi_iron2",
},
etc.
}
I´d prefer the latter one. We already have a beautiful collection of resource signs for bar, emp and atl in the media repo. A check during tribeloading that each tribe has for each detectable resource at least one indicator >= the resource's max_amount can go in the tribes/init.lua.