summaryrefslogtreecommitdiff
path: root/plugins/tiletypes.cpp
diff options
context:
space:
mode:
authorJared Adams2012-05-07 18:31:28 -0600
committerJared Adams2012-05-07 18:31:28 -0600
commit833bf518d973473d8abf8533e58b069610ddeb9c (patch)
treead888de4231d11065cc48c3e33ba3e9fc897b624 /plugins/tiletypes.cpp
parent567b3e2a52a3be8949c4536cff15e68b55f87fc6 (diff)
downloaddfhack-833bf518d973473d8abf8533e58b069610ddeb9c.tar.gz
dfhack-833bf518d973473d8abf8533e58b069610ddeb9c.tar.bz2
dfhack-833bf518d973473d8abf8533e58b069610ddeb9c.tar.xz
Fix some issues
Diffstat (limited to 'plugins/tiletypes.cpp')
-rw-r--r--plugins/tiletypes.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/plugins/tiletypes.cpp b/plugins/tiletypes.cpp
index b7914f25..59bdc7b3 100644
--- a/plugins/tiletypes.cpp
+++ b/plugins/tiletypes.cpp
@@ -461,14 +461,10 @@ bool tryVariant(std::string value, TileType &paint)
bool processTileType(color_ostream & out, TileType &paint, std::vector<std::string> &params, int start, int end)
{
- if (params.size() < start + 2)
- {
- return false;
- }
-
int loc = start;
std::string option = params[loc++];
- std::string value = params[loc++];
+ std::string value = end <= loc ? "" : params[loc++];
+ tolower(option);
toupper(value);
int valInt;
if (value == "ANY")
@@ -605,6 +601,18 @@ bool processTileType(color_ostream & out, TileType &paint, std::vector<std::stri
out << "Unknown skyview flag: " << value << std::endl;
}
}
+ else if (option == "aquifer" || option == "aqua")
+ {
+ if (valInt >= -1 && valInt < 2)
+ {
+ paint.aquifer = valInt;
+ found = true;
+ }
+ else
+ {
+ out << "Unknown aquifer flag: " << value << std::endl;
+ }
+ }
else if (option == "all" || option == "a")
{
loc--;