mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Use config values from new settings
This commit is contained in:
parent
685d63603d
commit
e48a4185ed
@ -255,7 +255,7 @@ void CArmyTooltip::init(const InfoAboutArmy &army)
|
||||
//if =0 - we have no information about stack size at all
|
||||
if(slot.second.count)
|
||||
{
|
||||
if(settings["adventure"]["numericStackQuantities"].Bool())
|
||||
if(settings["gameTweaks"]["numericCreaturesQuantities"].Bool())
|
||||
{
|
||||
subtitle = CCreature::getQuantityRangeStringForId((CCreature::CreatureQuantityId)slot.second.count);
|
||||
}
|
||||
|
@ -134,7 +134,7 @@
|
||||
"type" : "object",
|
||||
"additionalProperties" : false,
|
||||
"default": {},
|
||||
"required" : [ "heroSpeed", "enemySpeed", "scrollSpeed", "heroReminder", "quickCombat", "numericStackQuantities" ],
|
||||
"required" : [ "heroSpeed", "enemySpeed", "scrollSpeed", "heroReminder", "quickCombat" ],
|
||||
"properties" : {
|
||||
"heroSpeed" : {
|
||||
"type" : "number",
|
||||
@ -155,10 +155,6 @@
|
||||
"quickCombat" : {
|
||||
"type" : "boolean",
|
||||
"default" : false
|
||||
},
|
||||
"numericStackQuantities" : {
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -377,7 +377,7 @@ std::string CCreatureSet::getRoughAmount(SlotID slot, int mode) const
|
||||
|
||||
if((int)quantity)
|
||||
{
|
||||
if(settings["adventure"]["numericStackQuantities"].Bool())
|
||||
if(settings["gameTweaks"]["numericCreaturesQuantities"].Bool())
|
||||
return CCreature::getQuantityRangeStringForId(quantity);
|
||||
|
||||
return VLC->generaltexth->arraytxt[(174 + mode) + 3*(int)quantity];
|
||||
@ -825,7 +825,7 @@ std::string CStackInstance::getQuantityTXT(bool capitalized) const
|
||||
|
||||
if ((int)quantity)
|
||||
{
|
||||
if(settings["adventure"]["numericStackQuantities"].Bool())
|
||||
if(settings["gameTweaks"]["numericCreaturesQuantities"].Bool())
|
||||
return CCreature::getQuantityRangeStringForId(quantity);
|
||||
|
||||
return VLC->generaltexth->arraytxt[174 + (int)quantity*3 - 1 - capitalized];
|
||||
|
@ -205,7 +205,7 @@ void CGDwelling::onHeroVisit( const CGHeroInstance * h ) const
|
||||
bd.player = h->tempOwner;
|
||||
bd.text.addTxt(MetaString::GENERAL_TXT, 421); //Much to your dismay, the %s is guarded by %s %s. Do you wish to fight the guards?
|
||||
bd.text.addReplacement(ID == Obj::CREATURE_GENERATOR1 ? MetaString::CREGENS : MetaString::CREGENS4, subID);
|
||||
if(settings["adventure"]["numericStackQuantities"].Bool())
|
||||
if(settings["gameTweaks"]["numericCreaturesQuantities"].Bool())
|
||||
bd.text.addReplacement(CCreature::getQuantityRangeStringForId(Slots().begin()->second->getQuantityID()));
|
||||
else
|
||||
bd.text.addReplacement(MetaString::ARRAY_TXT, 173 + (int)Slots().begin()->second->getQuantityID()*3);
|
||||
|
@ -104,7 +104,7 @@ std::string CGCreature::getHoverText(PlayerColor player) const
|
||||
MetaString ms;
|
||||
CCreature::CreatureQuantityId monsterQuantityId = stacks.begin()->second->getQuantityID();
|
||||
int quantityTextIndex = 172 + 3 * (int)monsterQuantityId;
|
||||
if(settings["adventure"]["numericStackQuantities"].Bool())
|
||||
if(settings["gameTweaks"]["numericCreaturesQuantities"].Bool())
|
||||
ms << CCreature::getQuantityRangeStringForId(monsterQuantityId);
|
||||
else
|
||||
ms.addTxt(MetaString::ARRAY_TXT, quantityTextIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user