diff options
| author | Quietust | 2012-01-21 18:31:15 -0600 |
|---|---|---|
| committer | Quietust | 2012-01-21 18:31:15 -0600 |
| commit | 2cc6bcf0e97dbdf60492067cd71dc79432a35687 (patch) | |
| tree | e893504d15ef59e8803573f6f4483d2e3ec9ca34 /plugins/liquids.cpp | |
| parent | ccf22bed10a78504701bbdb1f8177a16cf9ffdde (diff) | |
| download | dfhack-2cc6bcf0e97dbdf60492067cd71dc79432a35687.tar.gz dfhack-2cc6bcf0e97dbdf60492067cd71dc79432a35687.tar.bz2 dfhack-2cc6bcf0e97dbdf60492067cd71dc79432a35687.tar.xz | |
Use CoreSuspender and namespace df::enums
Diffstat (limited to 'plugins/liquids.cpp')
| -rw-r--r-- | plugins/liquids.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/liquids.cpp b/plugins/liquids.cpp index d0170fce..bc930ff3 100644 --- a/plugins/liquids.cpp +++ b/plugins/liquids.cpp @@ -20,8 +20,8 @@ using std::set; #include "modules/MapCache.h" using namespace MapExtras; using namespace DFHack; - -typedef vector <DFHack::DFCoord> coord_vec; +using namespace df::enums; +typedef vector <df::coord> coord_vec; class Brush { @@ -358,7 +358,7 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters) amount = 7; else if(command.empty()) { - c->Suspend(); + CoreSuspender suspend(c); Maps::getSize(x_max,y_max,z_max); Position = c->getGui(); do @@ -409,7 +409,7 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters) mcache.setTiletypeAt(*iter, 90); df::tile_designation a = mcache.designationAt(*iter); - a.bits.liquid_type = df::tile_liquid::Water; + a.bits.liquid_type = tile_liquid::Water; a.bits.liquid_static = false; a.bits.flow_size = 7; mcache.setTemp1At(*iter,10015); @@ -478,13 +478,13 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters) } if(amount != 0 && mode == "magma") { - des.bits.liquid_type = df::tile_liquid::Magma; + des.bits.liquid_type = tile_liquid::Magma; mcache.setTemp1At(current,12000); mcache.setTemp2At(current,12000); } else if(amount != 0 && mode == "water") { - des.bits.liquid_type = df::tile_liquid::Water; + des.bits.liquid_type = tile_liquid::Water; mcache.setTemp1At(current,10015); mcache.setTemp2At(current,10015); } @@ -528,7 +528,6 @@ DFhackCExport command_result df_liquids (Core * c, vector <string> & parameters) else c->con << "Something failed horribly! RUN!" << endl; } while (0); - c->Resume(); } else { |
