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/flows.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/flows.cpp')
| -rw-r--r-- | plugins/flows.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/flows.cpp b/plugins/flows.cpp index 757bf971..163152a1 100644 --- a/plugins/flows.cpp +++ b/plugins/flows.cpp @@ -13,6 +13,7 @@ using std::string; using std::vector; using namespace DFHack; +using namespace df::enums; using df::global::world; @@ -26,11 +27,11 @@ DFhackCExport command_result df_flows (Core * c, vector <string> & parameters) for (int i = 0; i < world->map.map_blocks.size(); i++) { df::map_block *cur = world->map.map_blocks[i]; - if (cur->flags.is_set(df::block_flags::UpdateLiquid)) + if (cur->flags.is_set(block_flags::UpdateLiquid)) flow1++; - if (cur->flags.is_set(df::block_flags::UpdateLiquidTwice)) + if (cur->flags.is_set(block_flags::UpdateLiquidTwice)) flow2++; - if (cur->flags.is_set(df::block_flags::UpdateLiquid) && cur->flags.is_set(df::block_flags::UpdateLiquidTwice)) + if (cur->flags.is_set(block_flags::UpdateLiquid) && cur->flags.is_set(block_flags::UpdateLiquidTwice)) flowboth++; for (int x = 0; x < 16; x++) { @@ -39,9 +40,9 @@ DFhackCExport command_result df_flows (Core * c, vector <string> & parameters) // only count tiles with actual liquid in them if (cur->designation[x][y].bits.flow_size == 0) continue; - if (cur->designation[x][y].bits.liquid_type == df::tile_liquid::Magma) + if (cur->designation[x][y].bits.liquid_type == tile_liquid::Magma) magma++; - if (cur->designation[x][y].bits.liquid_type == df::tile_liquid::Water) + if (cur->designation[x][y].bits.liquid_type == tile_liquid::Water) water++; } } |
