mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Use config values from new settings
This commit is contained in:
@@ -255,7 +255,7 @@ void CArmyTooltip::init(const InfoAboutArmy &army)
|
|||||||
//if =0 - we have no information about stack size at all
|
//if =0 - we have no information about stack size at all
|
||||||
if(slot.second.count)
|
if(slot.second.count)
|
||||||
{
|
{
|
||||||
if(settings["adventure"]["numericStackQuantities"].Bool())
|
if(settings["gameTweaks"]["numericCreaturesQuantities"].Bool())
|
||||||
{
|
{
|
||||||
subtitle = CCreature::getQuantityRangeStringForId((CCreature::CreatureQuantityId)slot.second.count);
|
subtitle = CCreature::getQuantityRangeStringForId((CCreature::CreatureQuantityId)slot.second.count);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
"type" : "object",
|
"type" : "object",
|
||||||
"additionalProperties" : false,
|
"additionalProperties" : false,
|
||||||
"default": {},
|
"default": {},
|
||||||
"required" : [ "heroSpeed", "enemySpeed", "scrollSpeed", "heroReminder", "quickCombat", "numericStackQuantities" ],
|
"required" : [ "heroSpeed", "enemySpeed", "scrollSpeed", "heroReminder", "quickCombat" ],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"heroSpeed" : {
|
"heroSpeed" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@@ -155,10 +155,6 @@
|
|||||||
"quickCombat" : {
|
"quickCombat" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"default" : false
|
"default" : false
|
||||||
},
|
|
||||||
"numericStackQuantities" : {
|
|
||||||
"type": "boolean",
|
|
||||||
"default": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ std::string CCreatureSet::getRoughAmount(SlotID slot, int mode) const
|
|||||||
|
|
||||||
if((int)quantity)
|
if((int)quantity)
|
||||||
{
|
{
|
||||||
if(settings["adventure"]["numericStackQuantities"].Bool())
|
if(settings["gameTweaks"]["numericCreaturesQuantities"].Bool())
|
||||||
return CCreature::getQuantityRangeStringForId(quantity);
|
return CCreature::getQuantityRangeStringForId(quantity);
|
||||||
|
|
||||||
return VLC->generaltexth->arraytxt[(174 + mode) + 3*(int)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 ((int)quantity)
|
||||||
{
|
{
|
||||||
if(settings["adventure"]["numericStackQuantities"].Bool())
|
if(settings["gameTweaks"]["numericCreaturesQuantities"].Bool())
|
||||||
return CCreature::getQuantityRangeStringForId(quantity);
|
return CCreature::getQuantityRangeStringForId(quantity);
|
||||||
|
|
||||||
return VLC->generaltexth->arraytxt[174 + (int)quantity*3 - 1 - capitalized];
|
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.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.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);
|
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()));
|
bd.text.addReplacement(CCreature::getQuantityRangeStringForId(Slots().begin()->second->getQuantityID()));
|
||||||
else
|
else
|
||||||
bd.text.addReplacement(MetaString::ARRAY_TXT, 173 + (int)Slots().begin()->second->getQuantityID()*3);
|
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;
|
MetaString ms;
|
||||||
CCreature::CreatureQuantityId monsterQuantityId = stacks.begin()->second->getQuantityID();
|
CCreature::CreatureQuantityId monsterQuantityId = stacks.begin()->second->getQuantityID();
|
||||||
int quantityTextIndex = 172 + 3 * (int)monsterQuantityId;
|
int quantityTextIndex = 172 + 3 * (int)monsterQuantityId;
|
||||||
if(settings["adventure"]["numericStackQuantities"].Bool())
|
if(settings["gameTweaks"]["numericCreaturesQuantities"].Bool())
|
||||||
ms << CCreature::getQuantityRangeStringForId(monsterQuantityId);
|
ms << CCreature::getQuantityRangeStringForId(monsterQuantityId);
|
||||||
else
|
else
|
||||||
ms.addTxt(MetaString::ARRAY_TXT, quantityTextIndex);
|
ms.addTxt(MetaString::ARRAY_TXT, quantityTextIndex);
|
||||||
|
|||||||
Reference in New Issue
Block a user