summaryrefslogtreecommitdiff
path: root/plugins/liquids.cpp
diff options
context:
space:
mode:
authorQuietust2012-01-19 14:11:52 -0600
committerQuietust2012-01-19 14:11:52 -0600
commit4bb724cd6c16fc8c06069183883d8af70e19a0ef (patch)
treec6682e3c9be2e4e1124f75f533bdaf6023ff8313 /plugins/liquids.cpp
parente2d7359bdd51a345ddf900bad0487ce3de29d346 (diff)
downloaddfhack-4bb724cd6c16fc8c06069183883d8af70e19a0ef.tar.gz
dfhack-4bb724cd6c16fc8c06069183883d8af70e19a0ef.tar.bz2
dfhack-4bb724cd6c16fc8c06069183883d8af70e19a0ef.tar.xz
Significant cleanup of Maps module - next step will be to kill it properly
Diffstat (limited to 'plugins/liquids.cpp')
-rw-r--r--plugins/liquids.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/plugins/liquids.cpp b/plugins/liquids.cpp
index 4b6af873..0b7904db 100644
--- a/plugins/liquids.cpp
+++ b/plugins/liquids.cpp
@@ -389,7 +389,7 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters)
mcache.setTiletypeAt(*iter, 331);
mcache.setTemp1At(*iter,10015);
mcache.setTemp2At(*iter,10015);
- DFHack::t_designation des = mcache.designationAt(*iter);
+ df::tile_designation des = mcache.designationAt(*iter);
des.bits.flow_size = 0;
mcache.setDesignationAt(*iter, des);
iter ++;
@@ -411,8 +411,8 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters)
{
mcache.setTiletypeAt(*iter, 90);
- DFHack::t_designation a = mcache.designationAt(*iter);
- a.bits.liquid_type = DFHack::liquid_water;
+ df::tile_designation a = mcache.designationAt(*iter);
+ a.bits.liquid_type = df::tile_liquid::Water;
a.bits.liquid_static = false;
a.bits.flow_size = 7;
mcache.setTemp1At(*iter,10015);
@@ -434,7 +434,7 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters)
while (iter != all_tiles.end())
{
DFHack::DFCoord current = *iter;
- DFHack::t_designation des = mcache.designationAt(current);
+ df::tile_designation des = mcache.designationAt(current);
des.bits.water_salt = false;
des.bits.water_stagnant = false;
mcache.setDesignationAt(current,des);
@@ -455,9 +455,8 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters)
iter ++;
continue;
}
- DFHack::t_designation des = mcache.designationAt(current);
+ df::tile_designation des = mcache.designationAt(current);
uint16_t tt = mcache.tiletypeAt(current);
- DFHack::naked_designation & flow = des.bits;
// don't put liquids into places where they don't belong...
if(!DFHack::FlowPassable(tt))
{
@@ -468,27 +467,27 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters)
{
if(setmode == "s.")
{
- flow.flow_size = amount;
+ des.bits.flow_size = amount;
}
else if(setmode == "s+")
{
- if(flow.flow_size < amount)
- flow.flow_size = amount;
+ if(des.bits.flow_size < amount)
+ des.bits.flow_size = amount;
}
else if(setmode == "s-")
{
- if (flow.flow_size > amount)
- flow.flow_size = amount;
+ if (des.bits.flow_size > amount)
+ des.bits.flow_size = amount;
}
if(amount != 0 && mode == "magma")
{
- flow.liquid_type = DFHack::liquid_magma;
+ des.bits.liquid_type = df::tile_liquid::Magma;
mcache.setTemp1At(current,12000);
mcache.setTemp2At(current,12000);
}
else if(amount != 0 && mode == "water")
{
- flow.liquid_type = DFHack::liquid_water;
+ des.bits.liquid_type = df::tile_liquid::Water;
mcache.setTemp1At(current,10015);
mcache.setTemp2At(current,10015);
}