Renaming terms of is_value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Currently we have values and terms for the is_value in world/terrains/
* "green" which means arable
* "dry" which means walkable
I assume that this terms are used because of historical reasons and had formerly also a meaning to the terrain affinity. But today terrain affinity is completely independent from the is_value. So this terms should be changed to:
* "arable"
* "walkable"
To have straightforward terms we should also rename:
"mountain" -> "mineable"
Same goes for the the internal used terms:
kArable (formerly kGreen)
kWalkable (formerly kDry)
kWater
kDead
kMineable (formerly kMountain)
kImpassable
These changes should not affect loading of older maps, because only the name of a terrain is stored with a map.
This should make the code more readable, because one doesn't have to translate f.e. "dry" into "walkable" in the code.
Related branches
- TiborB: Approve
- GunChleoc: Approve
-
Diff: 1188 lines (+250/-271)10 files modifiedsrc/ai/ai_help_structs.h (+2/-2)
src/editor/tools/editor_increase_resources_tool.cc (+2/-2)
src/editor/tools/editor_info_tool.cc (+6/-21)
src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc (+25/-103)
src/logic/bob.cc (+1/-1)
src/logic/map.cc (+46/-45)
src/logic/worker.cc (+5/-5)
src/logic/world/terrain_description.cc (+84/-24)
src/logic/world/terrain_description.h (+19/-8)
world/terrains/init.lua (+60/-60)
Changed in widelands: | |
status: | New → Fix Committed |
milestone: | none → build19-rc1 |
Changed in widelands: | |
status: | Fix Committed → Fix Released |
I think renaming TerrainDescript ion::Type: :kDry to TerrainDescript ion::Type: :kWalkable doesn't work, because water also has this property. How about "kPassable"? is = "arable" terrain will then be a bit of an oddity within C++, but it won't bother map editors, because they never see it.