Quietust 2012-01-27 09:33:45 -06:00
commit b0d2e8a0f8
7 changed files with 25 additions and 1 deletions

@ -58,6 +58,7 @@ struct t_construction {
DFHACK_EXPORT bool isValid();
DFHACK_EXPORT uint32_t getCount();
DFHACK_EXPORT bool copyConstruction (const int32_t index, t_construction &out);
DFHACK_EXPORT df::construction * getConstruction (const int32_t index);
}
}
}

@ -59,6 +59,7 @@ struct t_engraving {
DFHACK_EXPORT bool isValid();
DFHACK_EXPORT uint32_t getCount();
DFHACK_EXPORT bool copyEngraving (const int32_t index, t_engraving &out);
DFHACK_EXPORT df::engraving * getEngraving (const int32_t index);
}
}
}

@ -65,6 +65,7 @@ struct t_plant {
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);
}
}

@ -51,6 +51,13 @@ uint32_t Constructions::getCount()
return world->constructions.size();
}
df::construction * Constructions::getConstruction(const int32_t index)
{
if (index < 0 || index >= getCount())
return NULL;
return world->constructions[index];
}
bool Constructions::copyConstruction(const int32_t index, t_construction &out)
{
if (index < 0 || index >= getCount())

@ -52,6 +52,13 @@ uint32_t Engravings::getCount()
return world->engravings.size();
}
df::engraving * Engravings::getEngraving(int index)
{
if (index < 0 || index >= getCount())
return NULL;
return world->engravings[index];
}
bool Engravings::copyEngraving(const int32_t index, t_engraving &out)
{
if (index < 0 || index >= getCount())

@ -53,6 +53,13 @@ uint32_t Vegetation::getCount()
return world->plants.all.size();
}
df::plant * Vegetation::getPlant(const int32_t index)
{
if (index < 0 || index >= getCount())
return NULL;
return world->plants.all[index];
}
bool Vegetation::copyPlant(const int32_t index, t_plant &out)
{
if (index < 0 || index >= getCount())