Remove hard-coding for resource types from the engine
Bug #1713706 reported by
GunChleoc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Low
|
Unassigned |
Bug Description
In order to define message timeouts, we have an individual enum class member for each map resource in enum class::Message:
kGeologists
kGeologists
kGeologists
kGeologists
kGeologists
These are also hard-coded into Worker:
The reason for this hard-coding is to define separate message timeouts for the individual map resource types.
We could fix this by adding a new string parameter to Player:
Related branches
lp:~widelands-dev/widelands/no-hardcoded-resources
- GunChleoc: Approve
-
Diff: 328 lines (+66/-36)9 files modifieddata/world/resources/init.lua (+24/-0)
src/logic/map_objects/tribes/worker.cc (+3/-15)
src/logic/map_objects/world/resource_description.cc (+10/-0)
src/logic/map_objects/world/resource_description.h (+8/-0)
src/logic/message.h (+8/-8)
src/logic/player.cc (+1/-0)
src/map_io/map_players_messages_packet.cc (+3/-2)
src/scripting/lua_game.cc (+9/-1)
src/wui/game_message_menu.cc (+0/-10)
summary: |
- Remove hard-coding for resoucre types from the engine + Remove hard-coding for resource types from the engine |
Changed in widelands: | |
assignee: | nobody → Benedikt Straub (nordfriese) |
milestone: | none → build20-rc1 |
status: | New → In Progress |
Changed in widelands: | |
assignee: | Benedikt Straub (nordfriese) → nobody |
status: | In Progress → Fix Committed |
To post a comment you must log in.
Fixed in build20-rc1