Remove hard-coding for resource types from the engine

Bug #1713706 reported by GunChleoc
6
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:

    kGeologistsCoal,
    kGeologistsGold,
    kGeologistsStones,
    kGeologistsIron,
    kGeologistsWater,

These are also hard-coded into Worker::run_geologist_find.

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::add_message_with_timeout add_message_with_timeout that will define the resources types to control the timeout.

Related branches

GunChleoc (gunchleoc)
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
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build20-rc1

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.