summaryrefslogtreecommitdiff
path: root/plugins/liquids.cpp
diff options
context:
space:
mode:
authorPetr Mrázek2011-09-02 01:25:01 +0200
committerPetr Mrázek2011-09-02 01:25:01 +0200
commit8cdeb0b59cb9ee52ab81a46d8d6f95e0f846fe01 (patch)
treee59028ea78e05f167b97476b231198359c55c0b9 /plugins/liquids.cpp
parente48f8af9a889ebe96ed7eab0b79865b6b0e40cc1 (diff)
downloaddfhack-8cdeb0b59cb9ee52ab81a46d8d6f95e0f846fe01.tar.gz
dfhack-8cdeb0b59cb9ee52ab81a46d8d6f95e0f846fe01.tar.bz2
dfhack-8cdeb0b59cb9ee52ab81a46d8d6f95e0f846fe01.tar.xz
Add a salt/stagnant flag removal command to the liquids tool.
Diffstat (limited to 'plugins/liquids.cpp')
-rw-r--r--plugins/liquids.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/liquids.cpp b/plugins/liquids.cpp
index 0400d2d0..a1468563 100644
--- a/plugins/liquids.cpp
+++ b/plugins/liquids.cpp
@@ -206,6 +206,7 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters)
<< "of - make obsidian floors" << endl
<< "rs - make a river source" << endl
<< "f - flow bits only" << endl
+ << "wclean - remove salt and stagnant flags from tiles" << endl
<< "Set-Modes (only for magma/water):" << endl
<< "s+ - only add" << endl
<< "s. - set" << endl
@@ -254,6 +255,10 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters)
{
mode = "riversource";
}
+ else if(command == "wclean")
+ {
+ mode = "wclean";
+ }
else if(command == "point" || command == "p")
{
delete brush;
@@ -423,6 +428,19 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters)
iter++;
}
}
+ else if(mode=="wclean")
+ {
+ coord_vec::iterator iter = all_tiles.begin();
+ while (iter != all_tiles.end())
+ {
+ DFHack::DFCoord current = *iter;
+ DFHack::t_designation des = mcache.designationAt(current);
+ des.bits.water_salt = false;
+ des.bits.water_stagnant = false;
+ mcache.setDesignationAt(current,des);
+ iter++;
+ }
+ }
else if(mode== "magma" || mode== "water" || mode == "flowbits")
{
set <Block *> seen_blocks;