|
|
@ -177,11 +177,10 @@ int main (void)
|
|
|
|
uint32_t numCreatures = DF.InitReadCreatures();
|
|
|
|
uint32_t numCreatures = DF.InitReadCreatures();
|
|
|
|
for(uint32_t i = 0; i < numCreatures; i++)
|
|
|
|
for(uint32_t i = 0; i < numCreatures; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DF.Suspend();
|
|
|
|
|
|
|
|
DFHack::t_creature temp;
|
|
|
|
DFHack::t_creature temp;
|
|
|
|
DF.ReadCreature(i, temp);
|
|
|
|
DF.ReadCreature(i, temp);
|
|
|
|
DF.ForceResume();
|
|
|
|
if(string(creaturestypes[temp.type].id) == "DWARF")
|
|
|
|
if(string(creaturestypes[temp.type].id) == "DWARF"){
|
|
|
|
{
|
|
|
|
cout << "address: " << temp.origin << " creature type: " << creaturestypes[temp.type].id << ", position: " << temp.x << "x " << temp.y << "y "<< temp.z << "z" << endl;
|
|
|
|
cout << "address: " << temp.origin << " creature type: " << creaturestypes[temp.type].id << ", position: " << temp.x << "x " << temp.y << "y "<< temp.z << "z" << endl;
|
|
|
|
bool addendl = false;
|
|
|
|
bool addendl = false;
|
|
|
|
if(temp.first_name[0])
|
|
|
|
if(temp.first_name[0])
|
|
|
@ -195,7 +194,8 @@ int main (void)
|
|
|
|
addendl = true;
|
|
|
|
addendl = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
string transName = DF.TranslateName(temp.last_name,names,creaturestypes[temp.type].id);
|
|
|
|
string transName = DF.TranslateName(temp.last_name,names,creaturestypes[temp.type].id);
|
|
|
|
if(!transName.empty()){
|
|
|
|
if(!transName.empty())
|
|
|
|
|
|
|
|
{
|
|
|
|
cout << ", trans name: " << transName;
|
|
|
|
cout << ", trans name: " << transName;
|
|
|
|
addendl=true;
|
|
|
|
addendl=true;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -211,10 +211,13 @@ int main (void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
cout << ", likes: ";
|
|
|
|
cout << ", likes: ";
|
|
|
|
for(uint32_t i = 0;i<temp.numLikes; i++){
|
|
|
|
for(uint32_t i = 0;i<temp.numLikes; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
if(printLike(temp.likes[i],mat,itemTypes))
|
|
|
|
if(printLike(temp.likes[i],mat,itemTypes))
|
|
|
|
|
|
|
|
{
|
|
|
|
cout << ", ";
|
|
|
|
cout << ", ";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if(addendl)
|
|
|
|
if(addendl)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cout << endl;
|
|
|
|
cout << endl;
|
|
|
@ -232,18 +235,21 @@ int main (void)
|
|
|
|
cout << endl;
|
|
|
|
cout << endl;
|
|
|
|
cout << "happiness: " << temp.happiness << ", strength: " << temp.strength << ", agility: "
|
|
|
|
cout << "happiness: " << temp.happiness << ", strength: " << temp.strength << ", agility: "
|
|
|
|
<< temp.agility << ", toughness: " << temp.toughness << ", money: " << temp.money << ", id: " << temp.id;
|
|
|
|
<< temp.agility << ", toughness: " << temp.toughness << ", money: " << temp.money << ", id: " << temp.id;
|
|
|
|
if(temp.squad_leader_id != -1){
|
|
|
|
if(temp.squad_leader_id != -1)
|
|
|
|
|
|
|
|
{
|
|
|
|
cout << ", squad_leader_id: " << temp.squad_leader_id;
|
|
|
|
cout << ", squad_leader_id: " << temp.squad_leader_id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cout << ", sex: ";
|
|
|
|
cout << ", sex: ";
|
|
|
|
if(temp.sex == 0){
|
|
|
|
if(temp.sex == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
cout << "Female";
|
|
|
|
cout << "Female";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else{
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
cout <<"Male";
|
|
|
|
cout <<"Male";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cout << endl;
|
|
|
|
cout << endl;
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
//skills
|
|
|
|
//skills
|
|
|
|
for(unsigned int i = 0; i < temp.skills.size();i++){
|
|
|
|
for(unsigned int i = 0; i < temp.skills.size();i++){
|
|
|
|
if(i > 0){
|
|
|
|
if(i > 0){
|
|
|
@ -251,7 +257,7 @@ int main (void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cout << temp.skills[i].name << ": " << temp.skills[i].rating;
|
|
|
|
cout << temp.skills[i].name << ": " << temp.skills[i].rating;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* FLAGS 1
|
|
|
|
* FLAGS 1
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|