widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #03772
[Merge] lp:~widelands-dev/widelands/stringfixes into lp:widelands
GunChleoc has proposed merging lp:~widelands-dev/widelands/stringfixes into lp:widelands.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/stringfixes/+merge/250768
Renamed "unpassable" terrain to "impassable".
http://dict.leo.org/#/search=unpassable&searchLoc=0&resultOrder=basic&multiwordShowSingle=on
http://dict.leo.org/#/search=impassable&searchLoc=0&resultOrder=basic&multiwordShowSingle=on
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/stringfixes into lp:widelands.
=== renamed file 'pics/terrain_unpassable.png' => 'pics/terrain_impassable.png'
=== modified file 'src/editor/tools/editor_increase_resources_tool.cc'
--- src/editor/tools/editor_increase_resources_tool.cc 2015-02-16 13:10:35 +0000
+++ src/editor/tools/editor_increase_resources_tool.cc 2015-02-24 14:51:02 +0000
@@ -37,7 +37,7 @@
if (!terrain.is_resource_valid(resource)) {
return -1;
}
- if (terrain.get_is() & Widelands::TerrainDescription::Type::kUnpassable) {
+ if (terrain.get_is() & Widelands::TerrainDescription::Type::kImpassable) {
return 8;
}
return 1;
@@ -59,7 +59,7 @@
count += resource_value(world.terrain_descr(f.field->terrain_r()), curres);
count += resource_value(world.terrain_descr(f.field->terrain_d()), curres);
- // If one of the neighbours is unpassable, count its resource stronger.
+ // If one of the neighbours is impassable, count its resource stronger.
// top left neigbour
map.get_neighbour(f, Widelands::WALK_NW, &f1);
count += resource_value(world.terrain_descr(f1.field->terrain_r()), curres);
=== modified file 'src/editor/tools/editor_info_tool.cc'
--- src/editor/tools/editor_info_tool.cc 2015-02-16 13:10:35 +0000
+++ src/editor/tools/editor_info_tool.cc 2015-02-24 14:51:02 +0000
@@ -119,8 +119,8 @@
if (terrain_is & Widelands::TerrainDescription::Type::kMountain) {
terrain_is_strings.push_back(_("mountainous"));
}
- if (terrain_is & Widelands::TerrainDescription::Type::kUnpassable) {
- terrain_is_strings.push_back(_("unpassable"));
+ if (terrain_is & Widelands::TerrainDescription::Type::kImpassable) {
+ terrain_is_strings.push_back(_("impassable"));
}
buf += "• " + (boost::format(_("Category: %s"))
% i18n::localize_list(terrain_is_strings, i18n::ConcatenateWith::AMPERSAND)).str() + "\n";
=== modified file 'src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc'
--- src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc 2015-02-16 13:10:35 +0000
+++ src/editor/ui_menus/editor_tool_set_terrain_options_menu.cc 2015-02-24 14:51:02 +0000
@@ -46,10 +46,10 @@
TerrainDescription::Type::kGreen, // "green"
TerrainDescription::Type::kDry, // "dry"
TerrainDescription::Type::kDry | TerrainDescription::Type::kMountain, // "mountain"
- TerrainDescription::Type::kDry | TerrainDescription::Type::kUnpassable, // "unpassable"
+ TerrainDescription::Type::kDry | TerrainDescription::Type::kImpassable, // "impassable"
TerrainDescription::Type::kDead | TerrainDescription::Type::kDry |
- TerrainDescription::Type::kUnpassable, // "dead"
- TerrainDescription::Type::kUnpassable | TerrainDescription::Type::kDry | TerrainDescription::Type::kWater,
+ TerrainDescription::Type::kImpassable, // "dead"
+ TerrainDescription::Type::kImpassable | TerrainDescription::Type::kDry | TerrainDescription::Type::kWater,
-1, // end marker
};
@@ -60,7 +60,7 @@
const Image* water = g_gr->images().get("pics/terrain_water.png");
const Image* mountain = g_gr->images().get("pics/terrain_mountain.png");
const Image* dead = g_gr->images().get("pics/terrain_dead.png");
- const Image* unpassable = g_gr->images().get("pics/terrain_unpassable.png");
+ const Image* impassable = g_gr->images().get("pics/terrain_impassable.png");
const Image* dry = g_gr->images().get("pics/terrain_dry.png");
constexpr int kSmallPicHeight = 20;
@@ -126,16 +126,16 @@
/** TRANSLATORS: This is a terrain type tooltip in the editor */
tooltips.push_back(_("dead"));
}
- if (ter_is & TerrainDescription::Type::kUnpassable) {
- blit(Rect(pt.x, pt.y, unpassable->width(), unpassable->height()),
- *unpassable,
- Rect(0, 0, unpassable->width(), unpassable->height()),
+ if (ter_is & TerrainDescription::Type::kImpassable) {
+ blit(Rect(pt.x, pt.y, impassable->width(), impassable->height()),
+ *impassable,
+ Rect(0, 0, impassable->width(), impassable->height()),
1.,
BlendMode::UseAlpha,
texture);
pt.x += kSmallPicWidth + 1;
/** TRANSLATORS: This is a terrain type tooltip in the editor */
- tooltips.push_back(_("unpassable"));
+ tooltips.push_back(_("impassable"));
}
if (ter_is & TerrainDescription::Type::kDry) {
blit(Rect(pt.x, pt.y, dry->width(), dry->height()),
=== modified file 'src/logic/map.cc'
--- src/logic/map.cc 2015-02-16 13:10:35 +0000
+++ src/logic/map.cc 2015-02-24 14:51:02 +0000
@@ -207,7 +207,7 @@
amount += terd.get_default_resource_amount();
}
- // If one of the neighbours is unpassable, count its resource
+ // If one of the neighbours is impassable, count its resource
// stronger
// top left neigbour
get_neighbour(f, WALK_NW, &f1);
@@ -215,7 +215,7 @@
const TerrainDescription& terr = world.terrain_descr(f1.field->terrain_r());
const int8_t resr = terr.get_default_resource();
const int default_amount = terr.get_default_resource_amount();
- if ((terr.get_is() & TerrainDescription::Type::kUnpassable) && default_amount > 0)
+ if ((terr.get_is() & TerrainDescription::Type::kImpassable) && default_amount > 0)
m[resr] += 3;
else
++m[resr];
@@ -225,7 +225,7 @@
const TerrainDescription& terd = world.terrain_descr(f1.field->terrain_d());
const int8_t resd = terd.get_default_resource();
const int default_amount = terd.get_default_resource_amount();
- if ((terd.get_is() & TerrainDescription::Type::kUnpassable) && default_amount > 0)
+ if ((terd.get_is() & TerrainDescription::Type::kImpassable) && default_amount > 0)
m[resd] += 3;
else
++m[resd];
@@ -238,7 +238,7 @@
const TerrainDescription& terd = world.terrain_descr(f1.field->terrain_d());
const int8_t resd = terd.get_default_resource();
const int default_amount = terd.get_default_resource_amount();
- if ((terd.get_is() & TerrainDescription::Type::kUnpassable) && default_amount > 0)
+ if ((terd.get_is() & TerrainDescription::Type::kImpassable) && default_amount > 0)
m[resd] += 3;
else
++m[resd];
@@ -251,7 +251,7 @@
const TerrainDescription& terr = world.terrain_descr(f1.field->terrain_r());
const int8_t resr = terr.get_default_resource();
const int default_amount = terr.get_default_resource_amount();
- if ((terr.get_is() & TerrainDescription::Type::kUnpassable) && default_amount > 0)
+ if ((terr.get_is() & TerrainDescription::Type::kImpassable) && default_amount > 0)
m[resr] += 3;
else
++m[resr];
@@ -1035,16 +1035,16 @@
world.terrain_descr (f.field->terrain_r()).get_is();
// 1b) Collect some information about the neighbours
- uint8_t cnt_unpassable = 0;
+ uint8_t cnt_impassable = 0;
uint8_t cnt_water = 0;
uint8_t cnt_dead = 0;
- if (tr_d_terrain_is & TerrainDescription::Type::kUnpassable) ++cnt_unpassable;
- if (tl_r_terrain_is & TerrainDescription::Type::kUnpassable) ++cnt_unpassable;
- if (tl_d_terrain_is & TerrainDescription::Type::kUnpassable) ++cnt_unpassable;
- if (l_r_terrain_is & TerrainDescription::Type::kUnpassable) ++cnt_unpassable;
- if (f_d_terrain_is & TerrainDescription::Type::kUnpassable) ++cnt_unpassable;
- if (f_r_terrain_is & TerrainDescription::Type::kUnpassable) ++cnt_unpassable;
+ if (tr_d_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
+ if (tl_r_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
+ if (tl_d_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
+ if (l_r_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
+ if (f_d_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
+ if (f_r_terrain_is & TerrainDescription::Type::kImpassable) ++cnt_impassable;
if (tr_d_terrain_is & TerrainDescription::Type::kWater) ++cnt_water;
if (tl_r_terrain_is & TerrainDescription::Type::kWater) ++cnt_water;
@@ -1065,7 +1065,7 @@
// 2a) If any of the neigbouring triangles is walkable this node is
// walkable.
- if (cnt_unpassable < 6)
+ if (cnt_impassable < 6)
caps |= MOVECAPS_WALK;
// 2b) If all neighbouring triangles are water, the node is swimable.
@@ -1090,7 +1090,7 @@
&&
imm->get_size() >= BaseImmovable::SMALL)
{
- // 3b) [OVERRIDE] check for "unpassable" MapObjects
+ // 3b) [OVERRIDE] check for "impassable" MapObjects
if (!imm->get_passable())
caps &= ~(MOVECAPS_WALK | MOVECAPS_SWIM);
return static_cast<NodeCaps>(caps);
=== modified file 'src/logic/worker.cc'
--- src/logic/worker.cc 2015-02-16 13:10:35 +0000
+++ src/logic/worker.cc 2015-02-24 14:51:02 +0000
@@ -517,7 +517,7 @@
// will also allow blocking the shoreline if it is next to the worker's
// location. Also, the gap of 2 nodes between 2 farms will be blocked,
// because both are next to their farm. The only real solution that I can
-// think of for this kind of bugs is to only allow unpassable objects to
+// think of for this kind of bugs is to only allow impassable objects to
// be placed on a node if ALL neighbouring nodes are passable. This must
// of course be checked at the moment when the object is placed and not,
// as in this case, only before a worker starts walking there to place an
=== modified file 'src/logic/world/terrain_description.cc'
--- src/logic/world/terrain_description.cc 2015-02-16 13:10:35 +0000
+++ src/logic/world/terrain_description.cc 2015-02-24 14:51:02 +0000
@@ -47,20 +47,20 @@
if (type == "water") {
return static_cast<TerrainDescription::Type>(TerrainDescription::Type::kWater |
TerrainDescription::Type::kDry |
- TerrainDescription::Type::kUnpassable);
+ TerrainDescription::Type::kImpassable);
}
if (type == "dead") {
return static_cast<TerrainDescription::Type>(TerrainDescription::Type::kDead |
TerrainDescription::Type::kDry |
- TerrainDescription::Type::kUnpassable);
+ TerrainDescription::Type::kImpassable);
}
if (type == "mountain") {
return static_cast<TerrainDescription::Type>(TerrainDescription::Type::kDry |
TerrainDescription::Type::kMountain);
}
- if (type == "unpassable") {
+ if (type == "impassable") {
return static_cast<TerrainDescription::Type>(TerrainDescription::Type::kDry |
- TerrainDescription::Type::kUnpassable);
+ TerrainDescription::Type::kImpassable);
}
throw LuaError((boost::format("invalid terrain type '%s'") % type).str());
}
=== modified file 'src/logic/world/terrain_description.h'
--- src/logic/world/terrain_description.h 2015-02-16 13:10:35 +0000
+++ src/logic/world/terrain_description.h 2015-02-24 14:51:02 +0000
@@ -48,7 +48,7 @@
kWater = 2,
kDead = 4,
kMountain = 8,
- kUnpassable = 16,
+ kImpassable = 16,
};
TerrainDescription(const LuaTable& table, const World&);
=== modified file 'world/terrains/init.lua'
--- world/terrains/init.lua 2015-02-16 18:38:19 +0000
+++ world/terrains/init.lua 2015-02-24 14:51:02 +0000
@@ -45,7 +45,7 @@
-- "dry": Allows building of roads only. Trees don't like this terrain.
-- "water": Nothing can be built here, but ships and aquatic animals can pass
-- "dead": Nothing can be built here, and nothing can walk on it, and nothing will grow.
- -- "unpassable": Nothing can be built here, and nothing can walk on it
+ -- "impassable": Nothing can be built here, and nothing can walk on it
is = "green",
-- The list resources that can be found in this terrain.
@@ -229,7 +229,7 @@
name = "sumpf",
descname = _ "Swamp",
editor_category = "green",
- is = "unpassable",
+ is = "impassable",
valid_resources = {"water"},
default_resource = "water",
default_resource_amount = 20,
Follow ups