Merge lp:~widelands-dev/widelands/is_value_terms into lp:widelands

Proposed by kaputtnik
Status: Merged
Merged at revision: 7665
Proposed branch: lp:~widelands-dev/widelands/is_value_terms
Merge into: lp:widelands
Diff against target: 1188 lines (+250/-271)
10 files modified
src/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)
To merge this branch: bzr merge lp:~widelands-dev/widelands/is_value_terms
Reviewer Review Type Date Requested Status
TiborB Approve
GunChleoc Approve
Review via email: mp+279205@code.launchpad.net

Commit message

Changing the is values in world/terrains/init.lua and the terms for is-value related things in C++ code.

dead -> unreachable
mountain -> minebale
green -> arable
dry -> walkable
impassable -> unwalkable

Description of the change

This version change also the strings for the editor_info_tool to reflect the changes and uses the same terms.

All other things that has been discussed works well also.

To post a comment you must log in.
Revision history for this message
GunChleoc (gunchleoc) wrote :

LGTM :)

Somebody should look at my part of the code - files to review are:

src/editor/tools/editor_info_tool.cc
src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc
src/logic/world/terrain_description.cc
src/logic/world/terrain_description.h

review: Approve
Revision history for this message
kaputtnik (franku) wrote :

Sorry that i couldn't approve your code... i could only say it works :-D

Revision history for this message
GunChleoc (gunchleoc) wrote :

Thanks for testing again! I still would like a C++ coder to have a look though.

Revision history for this message
TiborB (tiborb95) wrote :

OK for me, only look at my question in diff

Revision history for this message
TiborB (tiborb95) :
Revision history for this message
GunChleoc (gunchleoc) wrote :

The "buf" thing is old code that I didn't want to mess with in this branch - it would have made the diff pretty big. We should overhaul it one day though.

Revision history for this message
TiborB (tiborb95) wrote :

I have not meant buf itself, but its position. But when looking in code again it looks OK

review: Approve
Revision history for this message
GunChleoc (gunchleoc) wrote :

OK, thanks! Will merge :)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== renamed file 'pics/terrain_green.png' => 'pics/terrain_arable.png'
2=== renamed file 'pics/terrain_mountain.png' => 'pics/terrain_mineable.png'
3Binary files pics/terrain_mountain.png 2009-11-09 19:01:11 +0000 and pics/terrain_mineable.png 2015-12-05 10:59:45 +0000 differ
4=== renamed file 'pics/terrain_dead.png' => 'pics/terrain_unreachable.png'
5=== renamed file 'pics/terrain_impassable.png' => 'pics/terrain_unwalkable.png'
6Binary files pics/terrain_impassable.png 2015-02-24 13:51:38 +0000 and pics/terrain_unwalkable.png 2015-12-05 10:59:45 +0000 differ
7=== renamed file 'pics/terrain_dry.png' => 'pics/terrain_walkable.png'
8Binary files pics/terrain_dry.png 2009-11-09 19:01:11 +0000 and pics/terrain_walkable.png 2015-12-05 10:59:45 +0000 differ
9=== modified file 'pics/terrain_water.png'
10Binary files pics/terrain_water.png 2005-12-29 01:10:07 +0000 and pics/terrain_water.png 2015-12-05 10:59:45 +0000 differ
11=== modified file 'src/ai/ai_help_structs.h'
12--- src/ai/ai_help_structs.h 2015-11-26 10:43:33 +0000
13+++ src/ai/ai_help_structs.h 2015-12-05 10:59:45 +0000
14@@ -187,9 +187,9 @@
15
16 bool accept(const Map& /* map */, const FCoords& coord) const {
17 return (world_.terrain_descr(coord.field->terrain_d()).get_is() &
18- TerrainDescription::Type::kWater) ||
19+ TerrainDescription::Is::kWater) ||
20 (world_.terrain_descr(coord.field->terrain_r()).get_is() &
21- TerrainDescription::Type::kWater);
22+ TerrainDescription::Is::kWater);
23 }
24
25 private:
26
27=== modified file 'src/editor/tools/editor_increase_resources_tool.cc'
28--- src/editor/tools/editor_increase_resources_tool.cc 2015-11-11 09:56:22 +0000
29+++ src/editor/tools/editor_increase_resources_tool.cc 2015-12-05 10:59:45 +0000
30@@ -37,7 +37,7 @@
31 if (!terrain.is_resource_valid(resource)) {
32 return -1;
33 }
34- if (terrain.get_is() & Widelands::TerrainDescription::Type::kImpassable) {
35+ if (terrain.get_is() & Widelands::TerrainDescription::Is::kUnwalkable) {
36 return 8;
37 }
38 return 1;
39@@ -59,7 +59,7 @@
40 count += resource_value(world.terrain_descr(f.field->terrain_r()), curres);
41 count += resource_value(world.terrain_descr(f.field->terrain_d()), curres);
42
43- // If one of the neighbours is impassable, count its resource stronger.
44+ // If one of the neighbours is unwalkable, count its resource stronger.
45 // top left neigbour
46 map.get_neighbour(f, Widelands::WALK_NW, &f1);
47 count += resource_value(world.terrain_descr(f1.field->terrain_r()), curres);
48
49=== modified file 'src/editor/tools/editor_info_tool.cc'
50--- src/editor/tools/editor_info_tool.cc 2015-11-27 14:42:11 +0000
51+++ src/editor/tools/editor_info_tool.cc 2015-12-05 10:59:45 +0000
52@@ -107,28 +107,13 @@
53
54 buf += "• " + (boost::format(pgettext("terrain_name", "Name: %s")) % ter.descname()).str() + "\n";
55
56- Widelands::TerrainDescription::Type terrain_is = ter.get_is();
57 std::vector<std::string> terrain_is_strings;
58-
59- if (terrain_is == Widelands::TerrainDescription::Type::kGreen) {
60- terrain_is_strings.push_back(_("arable"));
61- }
62- if (terrain_is & Widelands::TerrainDescription::Type::kDry) {
63- terrain_is_strings.push_back(_("treeless"));
64- }
65- if (terrain_is & Widelands::TerrainDescription::Type::kWater) {
66- terrain_is_strings.push_back(_("aquatic"));
67- }
68- if (terrain_is & Widelands::TerrainDescription::Type::kDead) {
69- terrain_is_strings.push_back(_("dead"));
70- }
71- if (terrain_is & Widelands::TerrainDescription::Type::kMountain) {
72- terrain_is_strings.push_back(_("mountainous"));
73- }
74- if (terrain_is & Widelands::TerrainDescription::Type::kImpassable) {
75- terrain_is_strings.push_back(_("impassable"));
76- }
77- buf += "• " + (boost::format(_("Category: %s"))
78+ for (const Widelands::TerrainDescription::Type& terrain_type : ter.get_types()) {
79+ terrain_is_strings.push_back(terrain_type.descname);
80+ }
81+ /** TRANSLATORS: "Is" is a list of terrain properties, e.g. "arable", "unreachable and unwalkable" */
82+ /** TRANSLATORS: You can also translate this as "Category: %s" or "Property: %s" */
83+ buf += "• " + (boost::format(_("Is: %s"))
84 % i18n::localize_list(terrain_is_strings, i18n::ConcatenateWith::AMPERSAND)).str() + "\n";
85 buf += "• " + (boost::format(_("Editor Category: %s")) % ter.editor_category().descname()).str() + "\n";
86
87
88=== modified file 'src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc'
89--- src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc 2015-10-10 11:47:22 +0000
90+++ src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc 2015-12-05 10:59:45 +0000
91@@ -42,117 +42,39 @@
92
93 using namespace Widelands;
94
95-static const int32_t check[] = {
96- TerrainDescription::Type::kGreen, // "green"
97- TerrainDescription::Type::kDry, // "dry"
98- TerrainDescription::Type::kDry | TerrainDescription::Type::kMountain, // "mountain"
99- TerrainDescription::Type::kDry | TerrainDescription::Type::kImpassable, // "impassable"
100- TerrainDescription::Type::kDead | TerrainDescription::Type::kDry |
101- TerrainDescription::Type::kImpassable, // "dead"
102- TerrainDescription::Type::kImpassable | TerrainDescription::Type::kDry | TerrainDescription::Type::kWater,
103- -1, // end marker
104-};
105-
106 UI::Checkbox* create_terrain_checkbox(UI::Panel* parent,
107 const TerrainDescription& terrain_descr,
108 std::vector<std::unique_ptr<const Image>>* offscreen_images) {
109- const Image* green = g_gr->images().get("pics/terrain_green.png");
110- const Image* water = g_gr->images().get("pics/terrain_water.png");
111- const Image* mountain = g_gr->images().get("pics/terrain_mountain.png");
112- const Image* dead = g_gr->images().get("pics/terrain_dead.png");
113- const Image* impassable = g_gr->images().get("pics/terrain_impassable.png");
114- const Image* dry = g_gr->images().get("pics/terrain_dry.png");
115
116- constexpr int kSmallPicHeight = 20;
117- constexpr int kSmallPicWidth = 20;
118+ constexpr int kSmallPicSize = 20;
119
120 std::vector<std::string> tooltips;
121
122- for (size_t checkfor = 0; check[checkfor] >= 0; ++checkfor) {
123- const TerrainDescription::Type ter_is = terrain_descr.get_is();
124- if (ter_is != check[checkfor])
125- continue;
126-
127- const Texture& terrain_texture = terrain_descr.get_texture(0);
128- Texture* texture = new Texture(terrain_texture.width(), terrain_texture.height());
129- blit(Rect(0, 0, terrain_texture.width(), terrain_texture.height()),
130- terrain_texture,
131- Rect(0, 0, terrain_texture.width(), terrain_texture.height()),
132- 1.,
133- BlendMode::UseAlpha, texture);
134- Point pt(1, terrain_texture.height() - kSmallPicHeight - 1);
135-
136- if (ter_is == TerrainDescription::Type::kGreen) {
137- blit(Rect(pt.x, pt.y, green->width(), green->height()),
138- *green,
139- Rect(0, 0, green->width(), green->height()),
140- 1.,
141- BlendMode::UseAlpha,
142- texture);
143- pt.x += kSmallPicWidth + 1;
144- /** TRANSLATORS: This is a terrain type tooltip in the editor */
145- tooltips.push_back(_("arable"));
146- } else {
147- if (ter_is & TerrainDescription::Type::kWater) {
148- blit(Rect(pt.x, pt.y, water->width(), water->height()),
149- *water,
150- Rect(0, 0, water->width(), water->height()),
151- 1.,
152- BlendMode::UseAlpha,
153- texture);
154- pt.x += kSmallPicWidth + 1;
155- /** TRANSLATORS: This is a terrain type tooltip in the editor */
156- tooltips.push_back(_("aquatic"));
157- }
158- else if (ter_is & TerrainDescription::Type::kMountain) {
159- blit(Rect(pt.x, pt.y, mountain->width(), mountain->height()),
160- *mountain,
161- Rect(0, 0, mountain->width(), mountain->height()),
162- 1.,
163- BlendMode::UseAlpha,
164- texture);
165- pt.x += kSmallPicWidth + 1;
166- /** TRANSLATORS: This is a terrain type tooltip in the editor */
167- tooltips.push_back(_("mountainous"));
168- }
169- if (ter_is & TerrainDescription::Type::kDead) {
170- blit(Rect(pt.x, pt.y, dead->width(), dead->height()),
171- *dead,
172- Rect(0, 0, dead->width(), dead->height()),
173- 1.,
174- BlendMode::UseAlpha,
175- texture);
176- pt.x += kSmallPicWidth + 1;
177- /** TRANSLATORS: This is a terrain type tooltip in the editor */
178- tooltips.push_back(_("dead"));
179- }
180- if (ter_is & TerrainDescription::Type::kImpassable) {
181- blit(Rect(pt.x, pt.y, impassable->width(), impassable->height()),
182- *impassable,
183- Rect(0, 0, impassable->width(), impassable->height()),
184- 1.,
185- BlendMode::UseAlpha,
186- texture);
187- pt.x += kSmallPicWidth + 1;
188- /** TRANSLATORS: This is a terrain type tooltip in the editor */
189- tooltips.push_back(_("impassable"));
190- }
191- if (ter_is & TerrainDescription::Type::kDry) {
192- blit(Rect(pt.x, pt.y, dry->width(), dry->height()),
193- *dry,
194- Rect(0, 0, dry->width(), dry->height()),
195- 1.,
196- BlendMode::UseAlpha,
197- texture);
198- /** TRANSLATORS: This is a terrain type tooltip in the editor */
199- tooltips.push_back(_("treeless"));
200- }
201- }
202-
203- // Make sure we delete this later on.
204- offscreen_images->emplace_back(texture);
205- break;
206+ // Blit the main terrain image
207+ const Texture& terrain_texture = terrain_descr.get_texture(0);
208+ Texture* texture = new Texture(terrain_texture.width(), terrain_texture.height());
209+ blit(Rect(0, 0, terrain_texture.width(), terrain_texture.height()),
210+ terrain_texture,
211+ Rect(0, 0, terrain_texture.width(), terrain_texture.height()),
212+ 1.,
213+ BlendMode::UseAlpha, texture);
214+ Point pt(1, terrain_texture.height() - kSmallPicSize - 1);
215+
216+ // Collect tooltips and blit small icons representing "is" values
217+ for (const TerrainDescription::Type& terrain_type : terrain_descr.get_types()) {
218+ tooltips.push_back(terrain_type.descname);
219+
220+ blit(Rect(pt.x, pt.y, terrain_type.icon->width(), terrain_type.icon->height()),
221+ *terrain_type.icon,
222+ Rect(0, 0, terrain_type.icon->width(), terrain_type.icon->height()),
223+ 1.,
224+ BlendMode::UseAlpha,
225+ texture);
226+ pt.x += kSmallPicSize + 1;
227 }
228+ // Make sure we delete this later on.
229+ offscreen_images->emplace_back(texture);
230+
231 /** TRANSLATORS: %1% = terrain name, %2% = list of terrain types */
232 const std::string tooltip = ((boost::format("%1%: %2%"))
233 % terrain_descr.descname()
234
235=== modified file 'src/logic/bob.cc'
236--- src/logic/bob.cc 2015-11-20 19:09:59 +0000
237+++ src/logic/bob.cc 2015-12-05 10:59:45 +0000
238@@ -868,7 +868,7 @@
239
240
241 /**
242- * Cause the object to walk, honoring passable/impassable parts of the map
243+ * Cause the object to walk, honoring passable/unwalkable parts of the map
244 * using movecaps. If force is true, the passability check is skipped.
245 *
246 * \return the number of milliseconds after which the walk has ended. You must
247
248=== modified file 'src/logic/map.cc'
249--- src/logic/map.cc 2015-11-18 08:41:27 +0000
250+++ src/logic/map.cc 2015-12-05 10:59:45 +0000
251@@ -208,7 +208,7 @@
252 amount += terd.get_default_resource_amount();
253 }
254
255- // If one of the neighbours is impassable, count its resource
256+ // If one of the neighbours is unwalkable, count its resource
257 // stronger
258 // top left neigbour
259 get_neighbour(f, WALK_NW, &f1);
260@@ -216,7 +216,7 @@
261 const TerrainDescription& terr = world.terrain_descr(f1.field->terrain_r());
262 const int8_t resr = terr.get_default_resource();
263 const int default_amount = terr.get_default_resource_amount();
264- if ((terr.get_is() & TerrainDescription::Type::kImpassable) && default_amount > 0)
265+ if ((terr.get_is() & TerrainDescription::Is::kUnwalkable) && default_amount > 0)
266 m[resr] += 3;
267 else
268 ++m[resr];
269@@ -226,7 +226,7 @@
270 const TerrainDescription& terd = world.terrain_descr(f1.field->terrain_d());
271 const int8_t resd = terd.get_default_resource();
272 const int default_amount = terd.get_default_resource_amount();
273- if ((terd.get_is() & TerrainDescription::Type::kImpassable) && default_amount > 0)
274+ if ((terd.get_is() & TerrainDescription::Is::kUnwalkable) && default_amount > 0)
275 m[resd] += 3;
276 else
277 ++m[resd];
278@@ -239,7 +239,7 @@
279 const TerrainDescription& terd = world.terrain_descr(f1.field->terrain_d());
280 const int8_t resd = terd.get_default_resource();
281 const int default_amount = terd.get_default_resource_amount();
282- if ((terd.get_is() & TerrainDescription::Type::kImpassable) && default_amount > 0)
283+ if ((terd.get_is() & TerrainDescription::Is::kUnwalkable) && default_amount > 0)
284 m[resd] += 3;
285 else
286 ++m[resd];
287@@ -252,7 +252,7 @@
288 const TerrainDescription& terr = world.terrain_descr(f1.field->terrain_r());
289 const int8_t resr = terr.get_default_resource();
290 const int default_amount = terr.get_default_resource_amount();
291- if ((terr.get_is() & TerrainDescription::Type::kImpassable) && default_amount > 0)
292+ if ((terr.get_is() & TerrainDescription::Is::kUnwalkable) && default_amount > 0)
293 m[resr] += 3;
294 else
295 ++m[resr];
296@@ -1040,51 +1040,51 @@
297 const FCoords tl = tl_n(f);
298 const FCoords l = l_n(f);
299
300- const TerrainDescription::Type tr_d_terrain_is =
301+ const TerrainDescription::Is tr_d_terrain_is =
302 world.terrain_descr(tr.field->terrain_d()).get_is();
303- const TerrainDescription::Type tl_r_terrain_is =
304+ const TerrainDescription::Is tl_r_terrain_is =
305 world.terrain_descr(tl.field->terrain_r()).get_is();
306- const TerrainDescription::Type tl_d_terrain_is =
307+ const TerrainDescription::Is tl_d_terrain_is =
308 world.terrain_descr(tl.field->terrain_d()).get_is();
309- const TerrainDescription::Type l_r_terrain_is =
310+ const TerrainDescription::Is l_r_terrain_is =
311 world.terrain_descr (l.field->terrain_r()).get_is();
312- const TerrainDescription::Type f_d_terrain_is =
313+ const TerrainDescription::Is f_d_terrain_is =
314 world.terrain_descr (f.field->terrain_d()).get_is();
315- const TerrainDescription::Type f_r_terrain_is =
316+ const TerrainDescription::Is f_r_terrain_is =
317 world.terrain_descr (f.field->terrain_r()).get_is();
318
319 // 1b) Collect some information about the neighbours
320- uint8_t cnt_impassable = 0;
321+ uint8_t cnt_unwalkable = 0;
322 uint8_t cnt_water = 0;
323- uint8_t cnt_dead = 0;
324-
325- if (tr_d_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
326- if (tl_r_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
327- if (tl_d_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
328- if (l_r_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
329- if (f_d_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
330- if (f_r_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
331-
332- if (tr_d_terrain_is & TerrainDescription::Type::kWater) ++cnt_water;
333- if (tl_r_terrain_is & TerrainDescription::Type::kWater) ++cnt_water;
334- if (tl_d_terrain_is & TerrainDescription::Type::kWater) ++cnt_water;
335- if (l_r_terrain_is & TerrainDescription::Type::kWater) ++cnt_water;
336- if (f_d_terrain_is & TerrainDescription::Type::kWater) ++cnt_water;
337- if (f_r_terrain_is & TerrainDescription::Type::kWater) ++cnt_water;
338-
339- if (tr_d_terrain_is & TerrainDescription::Type::kDead) ++cnt_dead;
340- if (tl_r_terrain_is & TerrainDescription::Type::kDead) ++cnt_dead;
341- if (tl_d_terrain_is & TerrainDescription::Type::kDead) ++cnt_dead;
342- if (l_r_terrain_is & TerrainDescription::Type::kDead) ++cnt_dead;
343- if (f_d_terrain_is & TerrainDescription::Type::kDead) ++cnt_dead;
344- if (f_r_terrain_is & TerrainDescription::Type::kDead) ++cnt_dead;
345+ uint8_t cnt_unreachable = 0;
346+
347+ if (tr_d_terrain_is & TerrainDescription::Is::kUnwalkable) ++cnt_unwalkable;
348+ if (tl_r_terrain_is & TerrainDescription::Is::kUnwalkable) ++cnt_unwalkable;
349+ if (tl_d_terrain_is & TerrainDescription::Is::kUnwalkable) ++cnt_unwalkable;
350+ if (l_r_terrain_is & TerrainDescription::Is::kUnwalkable) ++cnt_unwalkable;
351+ if (f_d_terrain_is & TerrainDescription::Is::kUnwalkable) ++cnt_unwalkable;
352+ if (f_r_terrain_is & TerrainDescription::Is::kUnwalkable) ++cnt_unwalkable;
353+
354+ if (tr_d_terrain_is & TerrainDescription::Is::kWater) ++cnt_water;
355+ if (tl_r_terrain_is & TerrainDescription::Is::kWater) ++cnt_water;
356+ if (tl_d_terrain_is & TerrainDescription::Is::kWater) ++cnt_water;
357+ if (l_r_terrain_is & TerrainDescription::Is::kWater) ++cnt_water;
358+ if (f_d_terrain_is & TerrainDescription::Is::kWater) ++cnt_water;
359+ if (f_r_terrain_is & TerrainDescription::Is::kWater) ++cnt_water;
360+
361+ if (tr_d_terrain_is & TerrainDescription::Is::kUnreachable) ++cnt_unreachable;
362+ if (tl_r_terrain_is & TerrainDescription::Is::kUnreachable) ++cnt_unreachable;
363+ if (tl_d_terrain_is & TerrainDescription::Is::kUnreachable) ++cnt_unreachable;
364+ if (l_r_terrain_is & TerrainDescription::Is::kUnreachable) ++cnt_unreachable;
365+ if (f_d_terrain_is & TerrainDescription::Is::kUnreachable) ++cnt_unreachable;
366+ if (f_r_terrain_is & TerrainDescription::Is::kUnreachable) ++cnt_unreachable;
367
368
369 // 2) Passability
370
371 // 2a) If any of the neigbouring triangles is walkable this node is
372 // walkable.
373- if (cnt_impassable < 6)
374+ if (cnt_unwalkable < 6)
375 caps |= MOVECAPS_WALK;
376
377 // 2b) If all neighbouring triangles are water, the node is swimable.
378@@ -1094,7 +1094,7 @@
379
380 // 2c) [OVERRIDE] If any of the neighbouring triangles is really "bad" (such
381 // as lava), we can neither walk nor swim to this node.
382- if (cnt_dead)
383+ if (cnt_unreachable)
384 caps &= ~(MOVECAPS_WALK | MOVECAPS_SWIM);
385
386 // === everything below is used to check buildability ===
387@@ -1109,7 +1109,7 @@
388 &&
389 imm->get_size() >= BaseImmovable::SMALL)
390 {
391- // 3b) [OVERRIDE] check for "impassable" MapObjects
392+ // 3b) [OVERRIDE] check for "unwalkable" MapObjects
393 if (!imm->get_passable())
394 caps &= ~(MOVECAPS_WALK | MOVECAPS_SWIM);
395 return static_cast<NodeCaps>(caps);
396@@ -1272,7 +1272,7 @@
397 const FCoords tl = tl_n(f);
398 const FCoords l = l_n(f);
399
400- const TerrainDescription::Type terrains[6] = {
401+ const TerrainDescription::Is terrains[6] = {
402 world.terrain_descr(tr.field->terrain_d()).get_is(),
403 world.terrain_descr(tl.field->terrain_r()).get_is(),
404 world.terrain_descr(tl.field->terrain_d()).get_is(),
405@@ -1281,21 +1281,22 @@
406 world.terrain_descr (f.field->terrain_r()).get_is()
407 };
408
409- uint32_t cnt_mountain = 0;
410- uint32_t cnt_dry = 0;
411+ uint32_t cnt_mineable = 0;
412+ uint32_t cnt_walkable = 0;
413 for (uint32_t i = 0; i < 6; ++i) {
414- if (terrains[i] & TerrainDescription::Type::kWater)
415+ if (terrains[i] & TerrainDescription::Is::kWater ||
416+ terrains[i] & TerrainDescription::Is::kUnwalkable)
417 return BaseImmovable::NONE;
418- if (terrains[i] & TerrainDescription::Type::kMountain) ++cnt_mountain;
419- if (terrains[i] & TerrainDescription::Type::kDry) ++cnt_dry;
420+ if (terrains[i] & TerrainDescription::Is::kMineable) ++cnt_mineable;
421+ if (terrains[i] & TerrainDescription::Is::kWalkable) ++cnt_walkable;
422 }
423
424- if (cnt_mountain == 6) {
425+ if (cnt_mineable == 6) {
426 if (ismine)
427 *ismine = true;
428 return BaseImmovable::SMALL;
429 }
430- if (cnt_mountain || cnt_dry)
431+ if (cnt_mineable || cnt_walkable)
432 return BaseImmovable::NONE;
433
434 // Adjust size based on neighbouring immovables
435
436=== modified file 'src/logic/worker.cc'
437--- src/logic/worker.cc 2015-12-03 08:45:37 +0000
438+++ src/logic/worker.cc 2015-12-05 10:59:45 +0000
439@@ -515,7 +515,7 @@
440 // will also allow blocking the shoreline if it is next to the worker's
441 // location. Also, the gap of 2 nodes between 2 farms will be blocked,
442 // because both are next to their farm. The only real solution that I can
443-// think of for this kind of bugs is to only allow impassable objects to
444+// think of for this kind of bugs is to only allow unwalkable objects to
445 // be placed on a node if ALL neighbouring nodes are passable. This must
446 // of course be checked at the moment when the object is placed and not,
447 // as in this case, only before a worker starts walking there to place an
448@@ -2716,11 +2716,11 @@
449 bool is_center_mountain =
450 (world.terrain_descr(owner_area.field->terrain_d()).get_is()
451 &
452- TerrainDescription::Type::kMountain)
453+ TerrainDescription::Is::kMineable)
454 |
455 (world.terrain_descr(owner_area.field->terrain_r()).get_is()
456 &
457- TerrainDescription::Type::kMountain);
458+ TerrainDescription::Is::kMineable);
459 // Only run towards fields that are on a mountain (or not)
460 // depending on position of center
461 bool is_target_mountain;
462@@ -2733,11 +2733,11 @@
463 is_target_mountain =
464 (world.terrain_descr(target.field->terrain_d()).get_is()
465 &
466- TerrainDescription::Type::kMountain)
467+ TerrainDescription::Is::kMineable)
468 |
469 (world.terrain_descr(target.field->terrain_r()).get_is()
470 &
471- TerrainDescription::Type::kMountain);
472+ TerrainDescription::Is::kMineable);
473 if (i == 0)
474 i = list.size();
475 --i;
476
477=== modified file 'src/logic/world/terrain_description.cc'
478--- src/logic/world/terrain_description.cc 2015-11-11 09:56:22 +0000
479+++ src/logic/world/terrain_description.cc 2015-12-05 10:59:45 +0000
480@@ -23,6 +23,7 @@
481
482 #include <boost/format.hpp>
483
484+#include "base/i18n.h"
485 #include "graphic/animation.h"
486 #include "graphic/graphic.h"
487 #include "graphic/texture.h"
488@@ -36,36 +37,70 @@
489 namespace {
490
491 // Parse a terrain type from the giving string.
492-TerrainDescription::Type terrain_type_from_string(const std::string& type) {
493- if (type == "green") {
494- return TerrainDescription::Type::kGreen;
495+TerrainDescription::Is terrain_type_from_string(const std::string& type) {
496+ if (type == "arable") {
497+ return TerrainDescription::Is::kArable;
498 }
499- if (type == "dry") {
500- return TerrainDescription::Type::kDry;
501+ if (type == "walkable") {
502+ return TerrainDescription::Is::kWalkable;
503 }
504 if (type == "water") {
505- return static_cast<TerrainDescription::Type>(TerrainDescription::Type::kWater |
506- TerrainDescription::Type::kDry |
507- TerrainDescription::Type::kImpassable);
508- }
509- if (type == "dead") {
510- return static_cast<TerrainDescription::Type>(TerrainDescription::Type::kDead |
511- TerrainDescription::Type::kDry |
512- TerrainDescription::Type::kImpassable);
513- }
514- if (type == "mountain") {
515- return static_cast<TerrainDescription::Type>(TerrainDescription::Type::kDry |
516- TerrainDescription::Type::kMountain);
517- }
518- if (type == "impassable") {
519- return static_cast<TerrainDescription::Type>(TerrainDescription::Type::kDry |
520- TerrainDescription::Type::kImpassable);
521- }
522- throw LuaError((boost::format("invalid terrain type '%s'") % type).str());
523+ return static_cast<TerrainDescription::Is>(TerrainDescription::Is::kWater |
524+ TerrainDescription::Is::kUnwalkable);
525+ }
526+ if (type == "unreachable") {
527+ return static_cast<TerrainDescription::Is>(TerrainDescription::Is::kUnreachable |
528+ TerrainDescription::Is::kUnwalkable);
529+ }
530+ if (type == "mineable") {
531+ return TerrainDescription::Is::kMineable;
532+ }
533+ if (type == "unwalkable") {
534+ return TerrainDescription::Is::kUnwalkable;
535+ }
536+ throw LuaError((boost::format("Invalid terrain \"is\" value '%s'") % type).str());
537 }
538
539 } // namespace
540
541+
542+TerrainDescription::Type::Type(TerrainDescription::Is _is) : is(_is) {
543+ switch (is) {
544+ case Is::kArable:
545+ /** TRANSLATORS: This is a terrain type tooltip in the editor */
546+ descname = _("arable");
547+ icon = g_gr->images().get("pics/terrain_arable.png");
548+ break;
549+ case Is::kWalkable:
550+ /** TRANSLATORS: This is a terrain type tooltip in the editor */
551+ descname = _("walkable");
552+ icon = g_gr->images().get("pics/terrain_walkable.png");
553+ break;
554+ case Is::kWater:
555+ /** TRANSLATORS: This is a terrain type tooltip in the editor */
556+ descname = _("navigable");
557+ icon = g_gr->images().get("pics/terrain_water.png");
558+ break;
559+ case Is::kUnreachable:
560+ /** TRANSLATORS: This is a terrain type tooltip in the editor */
561+ descname = _("unreachable");
562+ icon = g_gr->images().get("pics/terrain_unreachable.png");
563+ break;
564+ case Is::kMineable:
565+ /** TRANSLATORS: This is a terrain type tooltip in the editor */
566+ descname = _("mineable");
567+ icon = g_gr->images().get("pics/terrain_mineable.png");
568+ break;
569+ case Is::kUnwalkable:
570+ /** TRANSLATORS: This is a terrain type tooltip in the editor */
571+ descname = _("unwalkable");
572+ icon = g_gr->images().get("pics/terrain_unwalkable.png");
573+ break;
574+ default:
575+ throw wexception("Unknown TerrainDescription::Is in TerrainDescription::Type");
576+ }
577+}
578+
579 TerrainDescription::TerrainDescription(const LuaTable& table, const Widelands::World& world)
580 : name_(table.get_string("name")),
581 descname_(table.get_string("descname")),
582@@ -136,10 +171,35 @@
583 return texture_paths_;
584 }
585
586-TerrainDescription::Type TerrainDescription::get_is() const {
587+TerrainDescription::Is TerrainDescription::get_is() const {
588 return is_;
589 }
590
591+
592+const std::vector<TerrainDescription::Type> TerrainDescription::get_types() const {
593+ std::vector<TerrainDescription::Type> terrain_types;
594+
595+ if (is_ == Widelands::TerrainDescription::Is::kArable) {
596+ terrain_types.push_back(TerrainDescription::Type(TerrainDescription::Is::kArable));
597+ }
598+ if (is_ & Widelands::TerrainDescription::Is::kWalkable) {
599+ terrain_types.push_back(TerrainDescription::Type(TerrainDescription::Is::kWalkable));
600+ }
601+ if (is_ & Widelands::TerrainDescription::Is::kWater) {
602+ terrain_types.push_back(TerrainDescription::Type(TerrainDescription::Is::kWater));
603+ }
604+ if (is_ & Widelands::TerrainDescription::Is::kUnreachable) {
605+ terrain_types.push_back(TerrainDescription::Type(TerrainDescription::Is::kUnreachable));
606+ }
607+ if (is_ & Widelands::TerrainDescription::Is::kMineable) {
608+ terrain_types.push_back(TerrainDescription::Type(TerrainDescription::Is::kMineable));
609+ }
610+ if (is_ & Widelands::TerrainDescription::Is::kUnwalkable) {
611+ terrain_types.push_back(TerrainDescription::Type(TerrainDescription::Is::kUnwalkable));
612+ }
613+ return terrain_types;
614+}
615+
616 const std::string& TerrainDescription::name() const {
617 return name_;
618 }
619
620=== modified file 'src/logic/world/terrain_description.h'
621--- src/logic/world/terrain_description.h 2015-11-11 09:56:22 +0000
622+++ src/logic/world/terrain_description.h 2015-12-05 10:59:45 +0000
623@@ -26,6 +26,7 @@
624
625 #include "base/macros.h"
626 #include "graphic/color.h"
627+#include "graphic/graphic.h"
628 #include "logic/widelands.h"
629 #include "logic/world/resource_description.h"
630
631@@ -42,13 +43,21 @@
632
633 class TerrainDescription {
634 public:
635- enum Type {
636- kGreen = 0,
637- kDry = 1,
638+ enum Is {
639+ kArable = 0,
640+ kWalkable = 1,
641 kWater = 2,
642- kDead = 4,
643- kMountain = 8,
644- kImpassable = 16,
645+ kUnreachable = 4,
646+ kMineable = 8,
647+ kUnwalkable = 16,
648+ };
649+
650+ struct Type {
651+ Type(TerrainDescription::Is _is);
652+
653+ TerrainDescription::Is is;
654+ const char* descname;
655+ const Image* icon;
656 };
657
658 TerrainDescription(const LuaTable& table, const World&);
659@@ -75,7 +84,9 @@
660 const RGBColor& get_minimap_color(int shade);
661
662 /// Returns the type of terrain this is (water, walkable, and so on).
663- Type get_is() const;
664+ Is get_is() const;
665+ /// Returns a list of the types that match get_is()
666+ const std::vector<TerrainDescription::Type> get_types() const;
667
668 /// Returns the valid resource with the given index.
669 DescriptionIndex get_valid_resource(uint8_t index) const;
670@@ -114,7 +125,7 @@
671 const std::string name_;
672 const std::string descname_;
673 const EditorCategory* editor_category_; ///< not owned.
674- Type is_;
675+ Is is_;
676 std::vector<uint8_t> valid_resources_;
677 int default_resource_index_;
678 int default_resource_amount_;
679
680=== modified file 'world/terrains/init.lua'
681--- world/terrains/init.lua 2015-10-31 12:11:44 +0000
682+++ world/terrains/init.lua 2015-12-05 10:59:45 +0000
683@@ -40,13 +40,13 @@
684 -- on.
685 --
686 -- The following properties are available:
687- -- "green": Allows building of normal buildings and roads
688- -- "mountain": Allows building of mines and roads
689- -- "dry": Allows building of roads only. Trees don't like this terrain.
690+ -- "arable": Allows building of normal buildings and roads
691+ -- "mineable": Allows building of mines and roads
692+ -- "walkable": Allows building of roads only
693 -- "water": Nothing can be built here, but ships and aquatic animals can pass
694- -- "dead": Nothing can be built here, and nothing can walk on it, and nothing will grow.
695- -- "impassable": Nothing can be built here, and nothing can walk on it
696- is = "green",
697+ -- "unreachable": Nothing can be built here (not even immovables), and nothing can walk on it
698+ -- "unwalkable": Nothing can be built here, and nothing can walk on it
699+ is = "arable",
700
701 -- The list resources that can be found in this terrain.
702 valid_resources = {"water"},
703@@ -79,7 +79,7 @@
704 name = "wiese2",
705 descname = _ "Meadow",
706 editor_category = "green",
707- is = "green",
708+ is = "arable",
709 valid_resources = {"water"},
710 default_resource = "water",
711 default_resource_amount = 10,
712@@ -96,7 +96,7 @@
713 name = "wiese3",
714 descname = _ "Meadow",
715 editor_category = "green",
716- is = "green",
717+ is = "arable",
718 valid_resources = {"water"},
719 default_resource = "water",
720 default_resource_amount = 10,
721@@ -112,7 +112,7 @@
722 name = "wiese4",
723 descname = _ "Meadow",
724 editor_category = "green",
725- is = "green",
726+ is = "arable",
727 valid_resources = {"water"},
728 default_resource = "water",
729 default_resource_amount = 10,
730@@ -128,7 +128,7 @@
731 name = "steppe",
732 descname = _ "Steppe",
733 editor_category = "green",
734- is = "green",
735+ is = "arable",
736 valid_resources = { "water" },
737 default_resource = "water",
738 default_resource_amount = 5,
739@@ -144,7 +144,7 @@
740 name = "steppe_kahl",
741 descname = _ "Barren Steppe",
742 editor_category = "green",
743- is = "green",
744+ is = "arable",
745 valid_resources = {"water"},
746 default_resource = "water",
747 default_resource_amount = 4,
748@@ -160,7 +160,7 @@
749 name = "bergwiese",
750 descname = _ "Mountain Meadow",
751 editor_category = "green",
752- is = "green",
753+ is = "arable",
754 valid_resources = {},
755 default_resource = "",
756 default_resource_amount = 0,
757@@ -176,7 +176,7 @@
758 name = "berg1",
759 descname = _ "Mountain",
760 editor_category = "green",
761- is = "mountain",
762+ is = "mineable",
763 valid_resources = { "coal", "iron", "gold", "stones" },
764 default_resource = "",
765 default_resource_amount = 0,
766@@ -192,7 +192,7 @@
767 name = "berg2",
768 descname = _ "Mountain",
769 editor_category = "green",
770- is = "mountain",
771+ is = "mineable",
772 valid_resources = {"coal", "iron", "gold", "stones"},
773 default_resource = "",
774 default_resource_amount = 0,
775@@ -208,7 +208,7 @@
776 name = "berg3",
777 descname = _ "Mountain",
778 editor_category = "green",
779- is = "mountain",
780+ is = "mineable",
781 valid_resources = {"coal", "iron", "gold", "stones"},
782 default_resource = "",
783 default_resource_amount = 0,
784@@ -224,7 +224,7 @@
785 name = "berg4",
786 descname = _ "Mountain",
787 editor_category = "green",
788- is = "mountain",
789+ is = "mineable",
790 valid_resources = {"coal", "iron", "gold", "stones"},
791 default_resource = "",
792 default_resource_amount = 0,
793@@ -240,7 +240,7 @@
794 name = "sumpf",
795 descname = _ "Swamp",
796 editor_category = "green",
797- is = "impassable",
798+ is = "unwalkable",
799 valid_resources = {"water"},
800 default_resource = "water",
801 default_resource_amount = 20,
802@@ -257,7 +257,7 @@
803 name = "strand",
804 descname = _ "Beach",
805 editor_category = "green",
806- is = "dry",
807+ is = "walkable",
808 valid_resources = {},
809 default_resource = "",
810 default_resource_amount = 0,
811@@ -271,7 +271,7 @@
812 name = "schnee",
813 descname = _ "Snow",
814 editor_category = "green",
815- is = "dead",
816+ is = "unreachable",
817 valid_resources = {},
818 default_resource = "",
819 default_resource_amount = 0,
820@@ -287,7 +287,7 @@
821 name = "lava",
822 descname = _ "Lava",
823 editor_category = "green",
824- is = "dead",
825+ is = "unreachable",
826 valid_resources = {},
827 default_resource = "",
828 default_resource_amount = 0,
829@@ -325,7 +325,7 @@
830 name = "ashes",
831 descname = _ "Ashes",
832 editor_category = "wasteland",
833- is = "green",
834+ is = "arable",
835 valid_resources = { "water" },
836 default_resource = "water",
837 default_resource_amount = 5,
838@@ -341,7 +341,7 @@
839 name = "ashes2",
840 descname = _ "Ashes",
841 editor_category = "wasteland",
842- is = "green",
843+ is = "arable",
844 valid_resources = { "water" },
845 default_resource = "water",
846 default_resource_amount = 4,
847@@ -357,7 +357,7 @@
848 name = "hardground1",
849 descname = _ "Hard Ground",
850 editor_category = "wasteland",
851- is = "green",
852+ is = "arable",
853 valid_resources = { "water" },
854 default_resource = "water",
855 default_resource_amount = 10,
856@@ -373,7 +373,7 @@
857 name = "hardground2",
858 descname = _ "Hard Ground",
859 editor_category = "wasteland",
860- is = "green",
861+ is = "arable",
862 valid_resources = { "water" },
863 default_resource = "water",
864 default_resource_amount = 10,
865@@ -389,7 +389,7 @@
866 name = "hardground3",
867 descname = _ "Hard Ground",
868 editor_category = "wasteland",
869- is = "green",
870+ is = "arable",
871 valid_resources = { "water" },
872 default_resource = "water",
873 default_resource_amount = 10,
874@@ -405,7 +405,7 @@
875 name = "hardground4",
876 descname = _ "Hard Ground",
877 editor_category = "wasteland",
878- is = "green",
879+ is = "arable",
880 valid_resources = { "water" },
881 default_resource = "water",
882 default_resource_amount = 10,
883@@ -421,7 +421,7 @@
884 name = "hardlava",
885 descname = _ "Igneous Rocks",
886 editor_category = "wasteland",
887- is = "green",
888+ is = "arable",
889 valid_resources = { "water" },
890 default_resource = "",
891 default_resource_amount = 0,
892@@ -437,7 +437,7 @@
893 name = "wasteland_mountain1",
894 descname = _ "Mountain",
895 editor_category = "wasteland",
896- is = "mountain",
897+ is = "mineable",
898 valid_resources = { "coal", "iron", "gold", "stones" },
899 default_resource = "",
900 default_resource_amount = 0,
901@@ -453,7 +453,7 @@
902 name = "wasteland_mountain2",
903 descname = _ "Mountain",
904 editor_category = "wasteland",
905- is = "mountain",
906+ is = "mineable",
907 valid_resources = { "coal", "iron", "gold", "stones" },
908 default_resource = "",
909 default_resource_amount = 0,
910@@ -469,7 +469,7 @@
911 name = "wasteland_mountain3",
912 descname = _ "Mountain",
913 editor_category = "wasteland",
914- is = "mountain",
915+ is = "mineable",
916 valid_resources = { "coal", "iron", "gold", "stones" },
917 default_resource = "",
918 default_resource_amount = 0,
919@@ -485,7 +485,7 @@
920 name = "wasteland_mountain4",
921 descname = _ "Mountain",
922 editor_category = "wasteland",
923- is = "mountain",
924+ is = "mineable",
925 valid_resources = { "coal", "iron", "gold", "stones" },
926 default_resource = "",
927 default_resource_amount = 0,
928@@ -501,7 +501,7 @@
929 name = "wasteland_beach",
930 descname = _ "Beach",
931 editor_category = "wasteland",
932- is = "dry",
933+ is = "walkable",
934 valid_resources = {},
935 default_resource = "",
936 default_resource_amount = 0,
937@@ -517,7 +517,7 @@
938 name = "lava-stone1",
939 descname = _ "Lava Rocks",
940 editor_category = "wasteland",
941- is = "dead",
942+ is = "unreachable",
943 valid_resources = {},
944 default_resource = "",
945 default_resource_amount = 0,
946@@ -534,7 +534,7 @@
947 name = "lava-stone2",
948 descname = _ "Lava Rocks",
949 editor_category = "wasteland",
950- is = "dead",
951+ is = "unreachable",
952 valid_resources = {},
953 default_resource = "",
954 default_resource_amount = 0,
955@@ -573,7 +573,7 @@
956 name = "tundra",
957 descname = _ "Tundra",
958 editor_category = "winter",
959- is = "green",
960+ is = "arable",
961 valid_resources = { "water" },
962 default_resource = "water",
963 default_resource_amount = 10,
964@@ -589,7 +589,7 @@
965 name = "tundra2",
966 descname = _ "Tundra",
967 editor_category = "winter",
968- is = "green",
969+ is = "arable",
970 valid_resources = { "water" },
971 default_resource = "water",
972 default_resource_amount = 10,
973@@ -605,7 +605,7 @@
974 name = "tundra3",
975 descname = _ "Tundra",
976 editor_category = "winter",
977- is = "green",
978+ is = "arable",
979 valid_resources = { "water" },
980 default_resource = "water",
981 default_resource_amount = 10,
982@@ -621,7 +621,7 @@
983 name = "tundra_taiga",
984 descname = _ "Tundra Taiga",
985 editor_category = "winter",
986- is = "green",
987+ is = "arable",
988 valid_resources = { "water" },
989 default_resource = "water",
990 default_resource_amount = 10,
991@@ -637,7 +637,7 @@
992 name = "taiga",
993 descname = _ "Taiga",
994 editor_category = "winter",
995- is = "green",
996+ is = "arable",
997 valid_resources = { "water" },
998 default_resource = "water",
999 default_resource_amount = 10,
1000@@ -653,7 +653,7 @@
1001 name = "snow",
1002 descname = _ "Snow",
1003 editor_category = "winter",
1004- is = "green",
1005+ is = "arable",
1006 valid_resources = { "water" },
1007 default_resource = "",
1008 default_resource_amount = 0,
1009@@ -669,7 +669,7 @@
1010 name = "winter_mountain1",
1011 descname = _ "Mountain",
1012 editor_category = "winter",
1013- is = "mountain",
1014+ is = "mineable",
1015 valid_resources = { "coal", "iron", "gold", "stones" },
1016 default_resource = "",
1017 default_resource_amount = 0,
1018@@ -685,7 +685,7 @@
1019 name = "winter_mountain2",
1020 descname = _ "Mountain",
1021 editor_category = "winter",
1022- is = "mountain",
1023+ is = "mineable",
1024 valid_resources = { "coal", "iron", "gold", "stones" },
1025 default_resource = "",
1026 default_resource_amount = 0,
1027@@ -701,7 +701,7 @@
1028 name = "winter_mountain3",
1029 descname = _ "Mountain",
1030 editor_category = "winter",
1031- is = "mountain",
1032+ is = "mineable",
1033 valid_resources = { "coal", "iron", "gold", "stones" },
1034 default_resource = "",
1035 default_resource_amount = 0,
1036@@ -717,7 +717,7 @@
1037 name = "winter_mountain4",
1038 descname = _ "Mountain",
1039 editor_category = "winter",
1040- is = "mountain",
1041+ is = "mineable",
1042 valid_resources = { "coal", "iron", "gold", "stones" },
1043 default_resource = "",
1044 default_resource_amount = 0,
1045@@ -733,7 +733,7 @@
1046 name = "ice",
1047 descname = _ "Ice",
1048 editor_category = "winter",
1049- is = "dry",
1050+ is = "walkable",
1051 valid_resources = {},
1052 default_resource = "",
1053 default_resource_amount = 0,
1054@@ -749,7 +749,7 @@
1055 name = "winter_beach",
1056 descname = _ "Beach",
1057 editor_category = "winter",
1058- is = "dry",
1059+ is = "walkable",
1060 valid_resources = {},
1061 default_resource = "",
1062 default_resource_amount = 0,
1063@@ -821,7 +821,7 @@
1064 name = "desert4",
1065 descname = _ "Desert",
1066 editor_category = "desert",
1067- is = "green",
1068+ is = "arable",
1069 valid_resources = {"water"},
1070 default_resource = "water",
1071 default_resource_amount = 2,
1072@@ -837,7 +837,7 @@
1073 name = "drysoil",
1074 descname = _ "Dry Soil",
1075 editor_category = "desert",
1076- is = "green",
1077+ is = "arable",
1078 valid_resources = {"water"},
1079 default_resource = "water",
1080 default_resource_amount = 4,
1081@@ -851,7 +851,7 @@
1082 name = "desert_steppe",
1083 descname = _ "Steppe",
1084 editor_category = "desert",
1085- is = "green",
1086+ is = "arable",
1087 valid_resources = {"water"},
1088 default_resource = "water",
1089 default_resource_amount = 5,
1090@@ -867,7 +867,7 @@
1091 name = "meadow",
1092 descname = _ "Meadow",
1093 editor_category = "desert",
1094- is = "green",
1095+ is = "arable",
1096 valid_resources = {"water"},
1097 default_resource = "water",
1098 default_resource_amount = 10,
1099@@ -883,7 +883,7 @@
1100 name = "mountainmeadow",
1101 descname = _ "Mountain Meadow",
1102 editor_category = "desert",
1103- is = "green",
1104+ is = "arable",
1105 valid_resources = {"water"},
1106 default_resource = "",
1107 default_resource_amount = 0,
1108@@ -899,7 +899,7 @@
1109 name = "highmountainmeadow",
1110 descname = _ "High Mountain Meadow",
1111 editor_category = "desert",
1112- is = "green",
1113+ is = "arable",
1114 valid_resources = {"water"},
1115 default_resource = "",
1116 default_resource_amount = 0,
1117@@ -915,7 +915,7 @@
1118 name = "mountain1",
1119 descname = _ "Mountain",
1120 editor_category = "desert",
1121- is = "mountain",
1122+ is = "mineable",
1123 valid_resources = { "coal", "iron", "gold", "stones" },
1124 default_resource = "",
1125 default_resource_amount = 0,
1126@@ -931,7 +931,7 @@
1127 name = "mountain2",
1128 descname = _ "Mountain",
1129 editor_category = "desert",
1130- is = "mountain",
1131+ is = "mineable",
1132 valid_resources = { "coal", "iron", "gold", "stones" },
1133 default_resource = "",
1134 default_resource_amount = 0,
1135@@ -947,7 +947,7 @@
1136 name = "mountain3",
1137 descname = _ "Mountain",
1138 editor_category = "desert",
1139- is = "mountain",
1140+ is = "mineable",
1141 valid_resources = { "coal", "iron", "gold", "stones" },
1142 default_resource = "",
1143 default_resource_amount = 0,
1144@@ -963,7 +963,7 @@
1145 name = "mountain4",
1146 descname = _ "Mountain",
1147 editor_category = "desert",
1148- is = "mountain",
1149+ is = "mineable",
1150 valid_resources = { "coal", "iron", "gold", "stones" },
1151 default_resource = "",
1152 default_resource_amount = 0,
1153@@ -979,7 +979,7 @@
1154 name = "desert1",
1155 descname = _ "Desert",
1156 editor_category = "desert",
1157- is = "dry",
1158+ is = "walkable",
1159 valid_resources = {},
1160 default_resource = "",
1161 default_resource_amount = 0,
1162@@ -995,7 +995,7 @@
1163 name = "desert2",
1164 descname = _ "Desert",
1165 editor_category = "desert",
1166- is = "dry",
1167+ is = "walkable",
1168 valid_resources = {},
1169 default_resource = "",
1170 default_resource_amount = 0,
1171@@ -1011,7 +1011,7 @@
1172 name = "desert3",
1173 descname = _ "Desert",
1174 editor_category = "desert",
1175- is = "dry",
1176+ is = "walkable",
1177 valid_resources = {},
1178 default_resource = "",
1179 default_resource_amount = 0,
1180@@ -1027,7 +1027,7 @@
1181 name = "desert_beach",
1182 descname = _ "Beach",
1183 editor_category = "desert",
1184- is = "dry",
1185+ is = "walkable",
1186 valid_resources = {},
1187 default_resource = "",
1188 default_resource_amount = 0,

Subscribers

People subscribed via source and target branches

to status/vote changes: