diff --git a/library/include/modules/Vegetation.h b/library/include/modules/Vegetation.h index 89ba5ff6c..f293ec52c 100644 --- a/library/include/modules/Vegetation.h +++ b/library/include/modules/Vegetation.h @@ -40,31 +40,9 @@ namespace Vegetation { const uint32_t sapling_to_tree_threshold = 120 * 28 * 12 * 3; // 3 years -// "Simplified" copy of plant -struct t_plant { - df::language_name name; - df::plant_flags flags; - int16_t material; - df::coord pos; - int32_t grow_counter; - uint16_t temperature_1; - uint16_t temperature_2; - int32_t is_burning; - int32_t hitpoints; - int16_t update_order; - //std::vector unk1; - //int32_t unk2; - //uint16_t temperature_3; - //uint16_t temperature_4; - //uint16_t temperature_5; - // Pointer to original object, in case you want to modify it - df::plant *origin; -}; - DFHACK_EXPORT bool isValid(); DFHACK_EXPORT uint32_t getCount(); DFHACK_EXPORT df::plant * getPlant(const int32_t index); -DFHACK_EXPORT bool copyPlant (const int32_t index, t_plant &out); } } #endif diff --git a/library/modules/Vegetation.cpp b/library/modules/Vegetation.cpp index f7c4c9b0c..9b14a3cc0 100644 --- a/library/modules/Vegetation.cpp +++ b/library/modules/Vegetation.cpp @@ -58,28 +58,3 @@ df::plant * Vegetation::getPlant(const int32_t index) return NULL; return world->plants.all[index]; } - -bool Vegetation::copyPlant(const int32_t index, t_plant &out) -{ - if (uint32_t(index) >= getCount()) - return false; - - out.origin = world->plants.all[index]; - - out.name = out.origin->name; - out.flags = out.origin->flags; - out.material = out.origin->material; - out.pos = out.origin->pos; - out.grow_counter = out.origin->grow_counter; - out.temperature_1 = out.origin->temperature.whole; - out.temperature_2 = out.origin->temperature.fraction; - out.is_burning = out.origin->is_burning; - out.hitpoints = out.origin->hitpoints; - out.update_order = out.origin->update_order; - //out.unk1 = out.origin->anon_1; - //out.unk2 = out.origin->anon_2; - //out.temperature_3 = out.origin->temperature_unk; - //out.temperature_4 = out.origin->min_safe_temp; - //out.temperature_5 = out.origin->max_safe_temp; - return true; -} diff --git a/plugins/plants.cpp b/plugins/plants.cpp index 5ab09868f..22e60c0d0 100644 --- a/plugins/plants.cpp +++ b/plugins/plants.cpp @@ -113,7 +113,7 @@ static command_result immolations (color_ostream &out, do_what what, bool shrubs if(shrubs && p->flags.bits.is_shrub || trees && !p->flags.bits.is_shrub) { if (what == do_immolate) - p->is_burning = true; + p->damage_flags.bits.is_burning = true; p->hitpoints = 0; destroyed ++; } @@ -136,7 +136,7 @@ static command_result immolations (color_ostream &out, do_what what, bool shrubs if(tree->pos.x == x && tree->pos.y == y && tree->pos.z == z) { if(what == do_immolate) - tree->is_burning = true; + tree->damage_flags.bits.is_burning = true; tree->hitpoints = 0; didit = true; break;