mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-20 20:23:03 +02:00
Add creatures amount
This commit is contained in:
parent
e01e7add13
commit
40c03ece34
@ -203,7 +203,7 @@ void Inspector::updateProperties(CGArtifact * o)
|
|||||||
for(auto spell : VLC->spellh->objects)
|
for(auto spell : VLC->spellh->objects)
|
||||||
{
|
{
|
||||||
//if(map->isAllowedSpell(spell->id))
|
//if(map->isAllowedSpell(spell->id))
|
||||||
delegate->options << QString::fromStdString(spell->name);
|
delegate->options << QObject::tr(spell->name.c_str());
|
||||||
}
|
}
|
||||||
addProperty("Spell", VLC->spellh->objects[spellId]->name, delegate, false);
|
addProperty("Spell", VLC->spellh->objects[spellId]->name, delegate, false);
|
||||||
}
|
}
|
||||||
@ -240,6 +240,7 @@ void Inspector::updateProperties(CGCreature * o)
|
|||||||
addProperty("Never flees", o->neverFlees, InspectorDelegate::boolDelegate(), false);
|
addProperty("Never flees", o->neverFlees, InspectorDelegate::boolDelegate(), false);
|
||||||
addProperty("Not growing", o->notGrowingTeam, InspectorDelegate::boolDelegate(), false);
|
addProperty("Not growing", o->notGrowingTeam, InspectorDelegate::boolDelegate(), false);
|
||||||
addProperty("Artifact reward", o->gainedArtifact); //TODO: implement in setProperty
|
addProperty("Artifact reward", o->gainedArtifact); //TODO: implement in setProperty
|
||||||
|
addProperty("Amount", o->stacks[SlotID(0)]->count, false);
|
||||||
//addProperty("Resources reward", o->resources); //TODO: implement in setProperty
|
//addProperty("Resources reward", o->resources); //TODO: implement in setProperty
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,6 +395,8 @@ void Inspector::setProperty(CGCreature * object, const QString & key, const QVar
|
|||||||
object->neverFlees = stringToBool(value.toString());
|
object->neverFlees = stringToBool(value.toString());
|
||||||
if(key == "Not growing")
|
if(key == "Not growing")
|
||||||
object->notGrowingTeam = stringToBool(value.toString());
|
object->notGrowingTeam = stringToBool(value.toString());
|
||||||
|
if(key == "Amount")
|
||||||
|
object->stacks[SlotID(0)]->count = value.toString().toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user