diff options
| author | Jared Adams | 2012-05-07 18:31:28 -0600 |
|---|---|---|
| committer | Jared Adams | 2012-05-07 18:31:28 -0600 |
| commit | 833bf518d973473d8abf8533e58b069610ddeb9c (patch) | |
| tree | ad888de4231d11065cc48c3e33ba3e9fc897b624 /plugins/tiletypes.cpp | |
| parent | 567b3e2a52a3be8949c4536cff15e68b55f87fc6 (diff) | |
| download | dfhack-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.cpp | 20 |
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> ¶ms, 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--; |
