diff options
| author | Quietust | 2012-02-13 16:56:33 -0600 |
|---|---|---|
| committer | Quietust | 2012-02-13 16:56:33 -0600 |
| commit | d0a8c2edd8922673d72a18bfd2214ce45126507b (patch) | |
| tree | b64220558035888a0cea2f0ee7354f4a20b27ecc /plugins/plants.cpp | |
| parent | 9f43d61c2c4f1a9ae760158d3e57601e39ff4a24 (diff) | |
| download | dfhack-d0a8c2edd8922673d72a18bfd2214ce45126507b.tar.gz dfhack-d0a8c2edd8922673d72a18bfd2214ce45126507b.tar.bz2 dfhack-d0a8c2edd8922673d72a18bfd2214ce45126507b.tar.xz | |
Move TileTypes to XML, part 1 - a bunch of stuff is now broken
Diffstat (limited to 'plugins/plants.cpp')
| -rw-r--r-- | plugins/plants.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/plants.cpp b/plugins/plants.cpp index cf15d9d7..48a64bf6 100644 --- a/plugins/plants.cpp +++ b/plugins/plants.cpp @@ -105,7 +105,7 @@ static command_result immolations (Core * c, do_what what, bool shrubs, bool tre c->con.printerr("Map is not available!\n"); return CR_FAILURE; } - DFHack::Gui * Gui = c->getGui(); + Gui * Gui = c->getGui(); uint32_t x_max, y_max, z_max; Maps::getSize(x_max, y_max, z_max); MapExtras::MapCache map; @@ -208,7 +208,7 @@ DFhackCExport command_result df_grow (Core * c, vector <string> & parameters) return CR_FAILURE; } MapExtras::MapCache map; - DFHack::Gui *Gui = c->getGui(); + Gui *Gui = c->getGui(); int32_t x,y,z; if(Gui->getCursorCoords(x,y,z)) { @@ -220,7 +220,8 @@ DFhackCExport command_result df_grow (Core * c, vector <string> & parameters) df::plant * tree = alltrees->at(i); if(tree->pos.x == x && tree->pos.y == y && tree->pos.z == z) { - if(DFHack::tileShape(map.tiletypeAt(DFHack::DFCoord(x,y,z))) == DFHack::SAPLING_OK) + if(tileShape(map.tiletypeAt(DFCoord(x,y,z))) == tiletype_shape::SAPLING && + tileSpecial(map.tiletypeAt(DFCoord(x,y,z))) != tiletype_special::DEAD) { tree->grow_counter = Vegetation::sapling_to_tree_threshold; } @@ -235,8 +236,8 @@ DFhackCExport command_result df_grow (Core * c, vector <string> & parameters) for(size_t i = 0 ; i < world->plants.all.size(); i++) { df::plant *p = world->plants.all[i]; - uint16_t ttype = map.tiletypeAt(df::coord(p->pos.x,p->pos.y,p->pos.z)); - if(!p->flags.bits.is_shrub && DFHack::tileShape(ttype) == DFHack::SAPLING_OK) + df::tiletype ttype = map.tiletypeAt(df::coord(p->pos.x,p->pos.y,p->pos.z)); + if(!p->flags.bits.is_shrub && tileShape(ttype) == tiletype_shape::SAPLING && tileSpecial(ttype) != tiletype_special::DEAD) { p->grow_counter = Vegetation::sapling_to_tree_threshold; } |
