forked from mirror/openmw-tes3mp
Task #400 Review GMST access
This commit is contained in:
parent
f45a6b71a9
commit
9f2668b45b
26 changed files with 94 additions and 114 deletions
|
@ -128,12 +128,10 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
text += "\n" + store.gameSettings.search("sQuality")->str + ": " + MWGui::ToolTips::toString(ref->base->data.quality);
|
text += "\n#{sQuality}: " + MWGui::ToolTips::toString(ref->base->data.quality);
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -152,13 +152,13 @@ namespace MWClass
|
||||||
if (typeGmst.empty())
|
if (typeGmst.empty())
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
float iWeight = MWBase::Environment::get().getWorld()->getStore().gameSettings.find (typeGmst)->i;
|
float iWeight = MWBase::Environment::get().getWorld()->getStore().gameSettings.find (typeGmst)->getInt();
|
||||||
|
|
||||||
if (iWeight * MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fLightMaxMod")->f>=
|
if (iWeight * MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fLightMaxMod")->getFloat()>=
|
||||||
ref->base->data.weight)
|
ref->base->data.weight)
|
||||||
return ESM::Skill::LightArmor;
|
return ESM::Skill::LightArmor;
|
||||||
|
|
||||||
if (iWeight * MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMedMaxMod")->f>=
|
if (iWeight * MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMedMaxMod")->getFloat()>=
|
||||||
ref->base->data.weight)
|
ref->base->data.weight)
|
||||||
return ESM::Skill::MediumArmor;
|
return ESM::Skill::MediumArmor;
|
||||||
|
|
||||||
|
@ -229,25 +229,23 @@ namespace MWClass
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
// get armor type string (light/medium/heavy)
|
// get armor type string (light/medium/heavy)
|
||||||
int armorType = getEquipmentSkill(ptr);
|
int armorType = getEquipmentSkill(ptr);
|
||||||
std::string typeText;
|
std::string typeText;
|
||||||
if (armorType == ESM::Skill::LightArmor)
|
if (armorType == ESM::Skill::LightArmor)
|
||||||
typeText = store.gameSettings.search("sLight")->str;
|
typeText = "#{sLight}";
|
||||||
else if (armorType == ESM::Skill::MediumArmor)
|
else if (armorType == ESM::Skill::MediumArmor)
|
||||||
typeText = store.gameSettings.search("sMedium")->str;
|
typeText = "#{sMedium}";
|
||||||
else
|
else
|
||||||
typeText = store.gameSettings.search("sHeavy")->str;
|
typeText = "#{sHeavy}";
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sArmorRating")->str + ": " + MWGui::ToolTips::toString(ref->base->data.armor);
|
text += "\n#{sArmorRating}: " + MWGui::ToolTips::toString(ref->base->data.armor);
|
||||||
|
|
||||||
/// \todo store the current armor health somewhere
|
/// \todo store the current armor health somewhere
|
||||||
text += "\n" + store.gameSettings.search("sCondition")->str + ": " + MWGui::ToolTips::toString(ref->base->data.health);
|
text += "\n#{sCondition}: " + MWGui::ToolTips::toString(ref->base->data.health);
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight) + " (" + typeText + ")";
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight) + " (" + typeText + ")";
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -128,8 +128,8 @@ namespace MWClass
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -193,12 +193,10 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -185,13 +185,11 @@ namespace MWClass
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
info.caption = ref->base->name;
|
info.caption = ref->base->name;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
if (ref->ref.lockLevel > 0)
|
if (ref->ref.lockLevel > 0)
|
||||||
text += "\n" + store.gameSettings.search("sLockLevel")->str + ": " + MWGui::ToolTips::toString(ref->ref.lockLevel);
|
text += "\n#{sLockLevel}: " + MWGui::ToolTips::toString(ref->ref.lockLevel);
|
||||||
if (ref->ref.trap != "")
|
if (ref->ref.trap != "")
|
||||||
text += "\n" + store.gameSettings.search("sTrapped")->str;
|
text += "\n#{sTrapped}";
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -223,14 +223,14 @@ namespace MWClass
|
||||||
dest = region->name;
|
dest = region->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text += "\n" + store.gameSettings.search("sTo")->str;
|
text += "\n#{sTo}";
|
||||||
text += "\n"+dest;
|
text += "\n"+dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ref->ref.lockLevel > 0)
|
if (ref->ref.lockLevel > 0)
|
||||||
text += "\n" + store.gameSettings.search("sLockLevel")->str + ": " + MWGui::ToolTips::toString(ref->ref.lockLevel);
|
text += "\n#{sLockLevel}: " + MWGui::ToolTips::toString(ref->ref.lockLevel);
|
||||||
if (ref->ref.trap != "")
|
if (ref->ref.trap != "")
|
||||||
text += "\n" + store.gameSettings.search("sTrapped")->str;
|
text += "\n#{sTrapped}";
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
||||||
text += MWGui::ToolTips::getMiscString(ref->base->script, "Script");
|
text += MWGui::ToolTips::getMiscString(ref->base->script, "Script");
|
||||||
|
|
|
@ -145,12 +145,10 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -173,12 +173,10 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -137,16 +137,14 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
/// \todo store remaining uses somewhere
|
/// \todo store remaining uses somewhere
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sUses")->str + ": " + MWGui::ToolTips::toString(ref->base->data.uses);
|
text += "\n#{sUses}: " + MWGui::ToolTips::toString(ref->base->data.uses);
|
||||||
text += "\n" + store.gameSettings.search("sQuality")->str + ": " + MWGui::ToolTips::toString(ref->base->data.quality);
|
text += "\n#{sQuality}: " + MWGui::ToolTips::toString(ref->base->data.quality);
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -101,7 +101,7 @@ namespace MWClass
|
||||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||||
ptr.get<ESM::Miscellaneous>();
|
ptr.get<ESM::Miscellaneous>();
|
||||||
|
|
||||||
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGold")->getString())
|
||||||
{
|
{
|
||||||
return std::string("Item Gold Up");
|
return std::string("Item Gold Up");
|
||||||
}
|
}
|
||||||
|
@ -113,7 +113,7 @@ namespace MWClass
|
||||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
MWWorld::LiveCellRef<ESM::Miscellaneous> *ref =
|
||||||
ptr.get<ESM::Miscellaneous>();
|
ptr.get<ESM::Miscellaneous>();
|
||||||
|
|
||||||
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
if (ref->base->name == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGold")->getString())
|
||||||
{
|
{
|
||||||
return std::string("Item Gold Down");
|
return std::string("Item Gold Down");
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ namespace MWClass
|
||||||
|
|
||||||
int count = ptr.getRefData().getCount();
|
int count = ptr.getRefData().getCount();
|
||||||
|
|
||||||
bool isGold = (ref->base->name == store.gameSettings.search("sGold")->str);
|
bool isGold = (ref->base->name == store.gameSettings.find("sGold")->getString());
|
||||||
if (isGold && count == 1)
|
if (isGold && count == 1)
|
||||||
count = ref->base->data.value;
|
count = ref->base->data.value;
|
||||||
|
|
||||||
|
@ -170,8 +170,8 @@ namespace MWClass
|
||||||
|
|
||||||
if (!isGold)
|
if (!isGold)
|
||||||
{
|
{
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
|
@ -192,7 +192,7 @@ namespace MWClass
|
||||||
const ESMS::ESMStore &store =
|
const ESMS::ESMStore &store =
|
||||||
MWBase::Environment::get().getWorld()->getStore();
|
MWBase::Environment::get().getWorld()->getStore();
|
||||||
|
|
||||||
if (MWWorld::Class::get(ptr).getName(ptr) == store.gameSettings.search("sGold")->str) {
|
if (MWWorld::Class::get(ptr).getName(ptr) == store.gameSettings.find("sGold")->getString()) {
|
||||||
int goldAmount = ptr.getRefData().getCount();
|
int goldAmount = ptr.getRefData().getCount();
|
||||||
|
|
||||||
std::string base = "Gold_001";
|
std::string base = "Gold_001";
|
||||||
|
|
|
@ -133,8 +133,8 @@ namespace MWClass
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
info.effects = MWGui::Widgets::MWEffectList::effectListFromESM(&ref->base->effects);
|
info.effects = MWGui::Widgets::MWEffectList::effectListFromESM(&ref->base->effects);
|
||||||
info.isPotion = true;
|
info.isPotion = true;
|
||||||
|
|
|
@ -136,16 +136,14 @@ namespace MWClass
|
||||||
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
info.caption = ref->base->name + MWGui::ToolTips::getCountString(ptr.getRefData().getCount());
|
||||||
info.icon = ref->base->icon;
|
info.icon = ref->base->icon;
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
/// \todo store remaining uses somewhere
|
/// \todo store remaining uses somewhere
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sUses")->str + ": " + MWGui::ToolTips::toString(ref->base->data.uses);
|
text += "\n#{sUses}: " + MWGui::ToolTips::toString(ref->base->data.uses);
|
||||||
text += "\n" + store.gameSettings.search("sQuality")->str + ": " + MWGui::ToolTips::toString(ref->base->data.quality);
|
text += "\n#{sQuality}: " + MWGui::ToolTips::toString(ref->base->data.quality);
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -130,11 +130,10 @@ namespace MWClass
|
||||||
|
|
||||||
/// \todo store remaining uses somewhere
|
/// \todo store remaining uses somewhere
|
||||||
|
|
||||||
const ESMS::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
|
text += "\n#{sUses}: " + MWGui::ToolTips::toString(ref->base->data.uses);
|
||||||
text += "\n" + store.gameSettings.search("sUses")->str + ": " + MWGui::ToolTips::toString(ref->base->data.uses);
|
text += "\n#{sQuality}: " + MWGui::ToolTips::toString(ref->base->data.quality);
|
||||||
text += "\n" + store.gameSettings.search("sQuality")->str + ": " + MWGui::ToolTips::toString(ref->base->data.quality);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
|
||||||
|
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp()) {
|
||||||
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
text += MWGui::ToolTips::getMiscString(ref->ref.owner, "Owner");
|
||||||
|
|
|
@ -284,7 +284,7 @@ namespace MWClass
|
||||||
// weapon type & damage. arrows / bolts don't have his info.
|
// weapon type & damage. arrows / bolts don't have his info.
|
||||||
if (ref->base->data.type < 12)
|
if (ref->base->data.type < 12)
|
||||||
{
|
{
|
||||||
text += "\n" + store.gameSettings.search("sType")->str + " ";
|
text += "\n#{sType} ";
|
||||||
|
|
||||||
std::map <int, std::pair <std::string, std::string> > mapping;
|
std::map <int, std::pair <std::string, std::string> > mapping;
|
||||||
mapping[ESM::Weapon::ShortBladeOneHand] = std::make_pair("sSkillShortblade", "sOneHanded");
|
mapping[ESM::Weapon::ShortBladeOneHand] = std::make_pair("sSkillShortblade", "sOneHanded");
|
||||||
|
@ -303,29 +303,29 @@ namespace MWClass
|
||||||
std::string type = mapping[ref->base->data.type].first;
|
std::string type = mapping[ref->base->data.type].first;
|
||||||
std::string oneOrTwoHanded = mapping[ref->base->data.type].second;
|
std::string oneOrTwoHanded = mapping[ref->base->data.type].second;
|
||||||
|
|
||||||
text += store.gameSettings.search(type)->str +
|
text += store.gameSettings.find(type)->getString() +
|
||||||
((oneOrTwoHanded != "") ? ", " + store.gameSettings.search(oneOrTwoHanded)->str : "");
|
((oneOrTwoHanded != "") ? ", " + store.gameSettings.find(oneOrTwoHanded)->getString() : "");
|
||||||
|
|
||||||
// weapon damage
|
// weapon damage
|
||||||
if (ref->base->data.type >= 9)
|
if (ref->base->data.type >= 9)
|
||||||
{
|
{
|
||||||
// marksman
|
// marksman
|
||||||
text += "\n" + store.gameSettings.search("sAttack")->str + ": "
|
text += "\n#{sAttack}: "
|
||||||
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[0]))
|
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[0]))
|
||||||
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[1]));
|
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[1]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Chop
|
// Chop
|
||||||
text += "\n" + store.gameSettings.search("sChop")->str + ": "
|
text += "\n#{sChop}: "
|
||||||
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[0]))
|
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[0]))
|
||||||
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[1]));
|
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.chop[1]));
|
||||||
// Slash
|
// Slash
|
||||||
text += "\n" + store.gameSettings.search("sSlash")->str + ": "
|
text += "\n#{sSlash}: "
|
||||||
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.slash[0]))
|
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.slash[0]))
|
||||||
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.slash[1]));
|
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.slash[1]));
|
||||||
// Thrust
|
// Thrust
|
||||||
text += "\n" + store.gameSettings.search("sThrust")->str + ": "
|
text += "\n#{sThrust}: "
|
||||||
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.thrust[0]))
|
+ MWGui::ToolTips::toString(static_cast<int>(ref->base->data.thrust[0]))
|
||||||
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.thrust[1]));
|
+ " - " + MWGui::ToolTips::toString(static_cast<int>(ref->base->data.thrust[1]));
|
||||||
}
|
}
|
||||||
|
@ -333,10 +333,10 @@ namespace MWClass
|
||||||
|
|
||||||
/// \todo store the current weapon health somewhere
|
/// \todo store the current weapon health somewhere
|
||||||
if (ref->base->data.type < 11) // thrown weapons and arrows/bolts don't have health, only quantity
|
if (ref->base->data.type < 11) // thrown weapons and arrows/bolts don't have health, only quantity
|
||||||
text += "\n" + store.gameSettings.search("sCondition")->str + ": " + MWGui::ToolTips::toString(ref->base->data.health);
|
text += "\n#{sCondition}: " + MWGui::ToolTips::toString(ref->base->data.health);
|
||||||
|
|
||||||
text += "\n" + store.gameSettings.search("sWeight")->str + ": " + MWGui::ToolTips::toString(ref->base->data.weight);
|
text += "\n#{sWeight}: " + MWGui::ToolTips::toString(ref->base->data.weight);
|
||||||
text += MWGui::ToolTips::getValueString(ref->base->data.value, store.gameSettings.search("sValue")->str);
|
text += MWGui::ToolTips::getValueString(ref->base->data.value, "#{sValue}");
|
||||||
|
|
||||||
info.enchant = ref->base->enchant;
|
info.enchant = ref->base->enchant;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace MWDialogue
|
||||||
quest.addEntry (entry); // we are doing slicing on purpose here
|
quest.addEntry (entry); // we are doing slicing on purpose here
|
||||||
|
|
||||||
std::vector<std::string> empty;
|
std::vector<std::string> empty;
|
||||||
std::string notification = MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sJournalEntry")->str;
|
std::string notification = "#{sJournalEntry}";
|
||||||
MWBase::Environment::get().getWindowManager()->messageBox (notification, empty);
|
MWBase::Environment::get().getWindowManager()->messageBox (notification, empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ void ContainerBase::onSelectedItem(MyGUI::Widget* _sender)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string message = MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sTake")->str;
|
std::string message = "#{sTake}";
|
||||||
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog();
|
||||||
dialog->open(MWWorld::Class::get(object).getName(object), message, count);
|
dialog->open(MWWorld::Class::get(object).getName(object), message, count);
|
||||||
dialog->eventOkClicked.clear();
|
dialog->eventOkClicked.clear();
|
||||||
|
@ -130,18 +130,17 @@ void ContainerBase::onSelectedItem(MyGUI::Widget* _sender)
|
||||||
// the player is trying to sell an item, check if the merchant accepts it
|
// the player is trying to sell an item, check if the merchant accepts it
|
||||||
// also, don't allow selling gold (let's be better than Morrowind at this, can we?)
|
// also, don't allow selling gold (let's be better than Morrowind at this, can we?)
|
||||||
if (!MWBase::Environment::get().getWindowManager()->getTradeWindow()->npcAcceptsItem(object)
|
if (!MWBase::Environment::get().getWindowManager()->getTradeWindow()->npcAcceptsItem(object)
|
||||||
|| MWWorld::Class::get(object).getName(object) == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
|| MWWorld::Class::get(object).getName(object) == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGold")->getString())
|
||||||
{
|
{
|
||||||
// user notification "i don't buy this item"
|
// user notification "i don't buy this item"
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarterDialog4")->str, std::vector<std::string>());
|
messageBox("#{sBarterDialog4}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool buying = isTradeWindow(); // buying or selling?
|
bool buying = isTradeWindow(); // buying or selling?
|
||||||
std::string message = buying ? MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sQuanityMenuMessage02")->str
|
std::string message = buying ? "#{sQuanityMenuMessage02}" : "#{sQuanityMenuMessage01}";
|
||||||
: MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sQuanityMenuMessage01")->str;
|
|
||||||
|
|
||||||
if (std::find(mBoughtItems.begin(), mBoughtItems.end(), object) != mBoughtItems.end())
|
if (std::find(mBoughtItems.begin(), mBoughtItems.end(), object) != mBoughtItems.end())
|
||||||
{
|
{
|
||||||
|
@ -279,7 +278,7 @@ void ContainerBase::onContainerClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
// user notification
|
// user notification
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sContentsMessage2")->str, std::vector<std::string>());
|
messageBox("#{sContentsMessage2}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -302,7 +301,7 @@ void ContainerBase::onContainerClicked(MyGUI::Widget* _sender)
|
||||||
object.getRefData().setCount(origCount);
|
object.getRefData().setCount(origCount);
|
||||||
// user notification
|
// user notification
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sContentsMessage3")->str, std::vector<std::string>());
|
messageBox("#{sContentsMessage3}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
|
|
||||||
mLabelText->setCaption(message);
|
mLabelText->setCaptionWithReplacing(message);
|
||||||
|
|
||||||
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
||||||
|
|
||||||
|
|
|
@ -123,13 +123,13 @@ void DialogueWindow::onSelectTopic(std::string topic)
|
||||||
{
|
{
|
||||||
if (!mEnabled) return;
|
if (!mEnabled) return;
|
||||||
|
|
||||||
if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarter")->str)
|
if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sBarter")->getString())
|
||||||
{
|
{
|
||||||
/// \todo check if the player is allowed to trade with this actor (e.g. faction rank high enough)?
|
/// \todo check if the player is allowed to trade with this actor (e.g. faction rank high enough)?
|
||||||
mWindowManager.pushGuiMode(GM_Barter);
|
mWindowManager.pushGuiMode(GM_Barter);
|
||||||
mWindowManager.getTradeWindow()->startTrade(mPtr);
|
mWindowManager.getTradeWindow()->startTrade(mPtr);
|
||||||
}
|
}
|
||||||
else if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sSpells")->str)
|
else if (topic == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sSpells")->getString())
|
||||||
{
|
{
|
||||||
mWindowManager.pushGuiMode(GM_SpellBuying);
|
mWindowManager.pushGuiMode(GM_SpellBuying);
|
||||||
mWindowManager.getSpellBuyingWindow()->startSpellBuying(mPtr);
|
mWindowManager.getSpellBuyingWindow()->startSpellBuying(mPtr);
|
||||||
|
@ -158,10 +158,10 @@ void DialogueWindow::setKeywords(std::list<std::string> keyWords)
|
||||||
bool anyService = mShowTrade||mShowSpells;
|
bool anyService = mShowTrade||mShowSpells;
|
||||||
|
|
||||||
if (mShowTrade)
|
if (mShowTrade)
|
||||||
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarter")->str);
|
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sBarter")->getString());
|
||||||
|
|
||||||
if (mShowSpells)
|
if (mShowSpells)
|
||||||
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sSpells")->str);
|
mTopicsList->addItem(MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sSpells")->getString());
|
||||||
|
|
||||||
if (anyService)
|
if (anyService)
|
||||||
mTopicsList->addSeparator();
|
mTopicsList->addSeparator();
|
||||||
|
@ -266,7 +266,7 @@ void DialogueWindow::updateOptions()
|
||||||
|
|
||||||
void DialogueWindow::goodbye()
|
void DialogueWindow::goodbye()
|
||||||
{
|
{
|
||||||
mHistory->addDialogText("\n#572D21" + MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGoodbye")->str);
|
mHistory->addDialogText("\n#572D21" + MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGoodbye")->getString());
|
||||||
mTopicsList->setEnabled(false);
|
mTopicsList->setEnabled(false);
|
||||||
mEnabled = false;
|
mEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,12 +51,12 @@ namespace MWGui
|
||||||
void SpellBuyingWindow::addSpell(const std::string& spellId)
|
void SpellBuyingWindow::addSpell(const std::string& spellId)
|
||||||
{
|
{
|
||||||
const ESM::Spell* spell = MWBase::Environment::get().getWorld()->getStore().spells.find(spellId);
|
const ESM::Spell* spell = MWBase::Environment::get().getWorld()->getStore().spells.find(spellId);
|
||||||
int price = spell->data.cost*MWBase::Environment::get().getWorld()->getStore().gameSettings.search("fSpellValueMult")->f;
|
int price = spell->data.cost*MWBase::Environment::get().getWorld()->getStore().gameSettings.find("fSpellValueMult")->getFloat();
|
||||||
MyGUI::Button* toAdd = mSpellsView->createWidget<MyGUI::Button>((price>mWindowManager.getInventoryWindow()->getPlayerGold()) ? "SandTextGreyedOut" : "SpellText", 0, mCurrentY, 200, sLineHeight, MyGUI::Align::Default);
|
MyGUI::Button* toAdd = mSpellsView->createWidget<MyGUI::Button>((price>mWindowManager.getInventoryWindow()->getPlayerGold()) ? "SandTextGreyedOut" : "SpellText", 0, mCurrentY, 200, sLineHeight, MyGUI::Align::Default);
|
||||||
mCurrentY += sLineHeight;
|
mCurrentY += sLineHeight;
|
||||||
/// \todo price adjustment depending on merchantile skill
|
/// \todo price adjustment depending on merchantile skill
|
||||||
toAdd->setUserData(price);
|
toAdd->setUserData(price);
|
||||||
toAdd->setCaption(spell->name+" - "+boost::lexical_cast<std::string>(price)+MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sgp")->str);
|
toAdd->setCaptionWithReplacing(spell->name+" - "+boost::lexical_cast<std::string>(price)+"#{sgp}");
|
||||||
toAdd->setSize(toAdd->getTextSize().width,sLineHeight);
|
toAdd->setSize(toAdd->getTextSize().width,sLineHeight);
|
||||||
toAdd->eventMouseWheel += MyGUI::newDelegate(this, &SpellBuyingWindow::onMouseWheel);
|
toAdd->eventMouseWheel += MyGUI::newDelegate(this, &SpellBuyingWindow::onMouseWheel);
|
||||||
toAdd->setUserString("ToolTipType", "Spell");
|
toAdd->setUserString("ToolTipType", "Spell");
|
||||||
|
@ -127,8 +127,7 @@ namespace MWGui
|
||||||
|
|
||||||
void SpellBuyingWindow::updateLabels()
|
void SpellBuyingWindow::updateLabels()
|
||||||
{
|
{
|
||||||
mPlayerGold->setCaption(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str
|
mPlayerGold->setCaptionWithReplacing("#{sGold}: " + boost::lexical_cast<std::string>(mWindowManager.getInventoryWindow()->getPlayerGold()));
|
||||||
+ ": " + boost::lexical_cast<std::string>(mWindowManager.getInventoryWindow()->getPlayerGold()));
|
|
||||||
mPlayerGold->setCoord(8,
|
mPlayerGold->setCoord(8,
|
||||||
mPlayerGold->getTop(),
|
mPlayerGold->getTop(),
|
||||||
mPlayerGold->getTextSize().width,
|
mPlayerGold->getTextSize().width,
|
||||||
|
|
|
@ -57,7 +57,7 @@ StatsWindow::StatsWindow (MWBase::WindowManager& parWindowManager)
|
||||||
const ESMS::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
const ESMS::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
for (int i=0; names[i][0]; ++i)
|
for (int i=0; names[i][0]; ++i)
|
||||||
{
|
{
|
||||||
setText (names[i][0], store.gameSettings.find (names[i][1])->str);
|
setText (names[i][0], store.gameSettings.find (names[i][1])->getString());
|
||||||
}
|
}
|
||||||
|
|
||||||
getWidget(mSkillView, "SkillView");
|
getWidget(mSkillView, "SkillView");
|
||||||
|
|
|
@ -374,13 +374,13 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
||||||
{
|
{
|
||||||
enchant = store.enchants.search(info.enchant);
|
enchant = store.enchants.search(info.enchant);
|
||||||
if (enchant->data.type == ESM::Enchantment::CastOnce)
|
if (enchant->data.type == ESM::Enchantment::CastOnce)
|
||||||
text += "\n" + store.gameSettings.search("sItemCastOnce")->str;
|
text += "\n#{sItemCastOnce}";
|
||||||
else if (enchant->data.type == ESM::Enchantment::WhenStrikes)
|
else if (enchant->data.type == ESM::Enchantment::WhenStrikes)
|
||||||
text += "\n" + store.gameSettings.search("sItemCastWhenStrikes")->str;
|
text += "\n#{sItemCastWhenStrikes}";
|
||||||
else if (enchant->data.type == ESM::Enchantment::WhenUsed)
|
else if (enchant->data.type == ESM::Enchantment::WhenUsed)
|
||||||
text += "\n" + store.gameSettings.search("sItemCastWhenUsed")->str;
|
text += "\n#{sItemCastWhenUsed}";
|
||||||
else if (enchant->data.type == ESM::Enchantment::ConstantEffect)
|
else if (enchant->data.type == ESM::Enchantment::ConstantEffect)
|
||||||
text += "\n" + store.gameSettings.search("sItemCastConstant")->str;
|
text += "\n#{sItemCastConstant}";
|
||||||
}
|
}
|
||||||
|
|
||||||
// this the maximum width of the tooltip before it starts word-wrapping
|
// this the maximum width of the tooltip before it starts word-wrapping
|
||||||
|
@ -405,7 +405,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
||||||
textWidget->setProperty("Static", "true");
|
textWidget->setProperty("Static", "true");
|
||||||
textWidget->setProperty("MultiLine", "true");
|
textWidget->setProperty("MultiLine", "true");
|
||||||
textWidget->setProperty("WordWrap", "true");
|
textWidget->setProperty("WordWrap", "true");
|
||||||
textWidget->setCaption(text);
|
textWidget->setCaptionWithReplacing(text);
|
||||||
textWidget->setTextAlign(Align::HCenter | Align::Top);
|
textWidget->setTextAlign(Align::HCenter | Align::Top);
|
||||||
IntSize textSize = textWidget->getTextSize();
|
IntSize textSize = textWidget->getTextSize();
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
|
||||||
const int chargeWidth = 204;
|
const int chargeWidth = 204;
|
||||||
|
|
||||||
TextBox* chargeText = enchantArea->createWidget<TextBox>("SandText", IntCoord(0, 0, 10, 18), Align::Default, "ToolTipEnchantChargeText");
|
TextBox* chargeText = enchantArea->createWidget<TextBox>("SandText", IntCoord(0, 0, 10, 18), Align::Default, "ToolTipEnchantChargeText");
|
||||||
chargeText->setCaption(store.gameSettings.search("sCharges")->str);
|
chargeText->setCaptionWithReplacing("#{sCharges}");
|
||||||
const int chargeTextWidth = chargeText->getTextSize().width + 5;
|
const int chargeTextWidth = chargeText->getTextSize().width + 5;
|
||||||
|
|
||||||
const int chargeAndTextWidth = chargeWidth + chargeTextWidth;
|
const int chargeAndTextWidth = chargeWidth + chargeTextWidth;
|
||||||
|
|
|
@ -110,7 +110,7 @@ namespace MWGui
|
||||||
for (MWWorld::ContainerStoreIterator it = playerStore.begin();
|
for (MWWorld::ContainerStoreIterator it = playerStore.begin();
|
||||||
it != playerStore.end(); ++it)
|
it != playerStore.end(); ++it)
|
||||||
{
|
{
|
||||||
if (MWWorld::Class::get(*it).getName(*it) == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
if (MWWorld::Class::get(*it).getName(*it) == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGold")->getString())
|
||||||
{
|
{
|
||||||
goldFound = true;
|
goldFound = true;
|
||||||
gold = *it;
|
gold = *it;
|
||||||
|
@ -138,7 +138,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
// user notification
|
// user notification
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarterDialog11")->str, std::vector<std::string>());
|
messageBox("#{sBarterDialog11}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
// user notification
|
// user notification
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarterDialog1")->str, std::vector<std::string>());
|
messageBox("#{sBarterDialog1}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
// user notification
|
// user notification
|
||||||
MWBase::Environment::get().getWindowManager()->
|
MWBase::Environment::get().getWindowManager()->
|
||||||
messageBox(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sBarterDialog2")->str, std::vector<std::string>());
|
messageBox("#{sBarterDialog2}", std::vector<std::string>());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,17 +200,16 @@ namespace MWGui
|
||||||
|
|
||||||
void TradeWindow::updateLabels()
|
void TradeWindow::updateLabels()
|
||||||
{
|
{
|
||||||
mPlayerGold->setCaption(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sYourGold")->str
|
mPlayerGold->setCaptionWithReplacing("#{sYourGold} " + boost::lexical_cast<std::string>(mWindowManager.getInventoryWindow()->getPlayerGold()));
|
||||||
+ " " + boost::lexical_cast<std::string>(mWindowManager.getInventoryWindow()->getPlayerGold()));
|
|
||||||
|
|
||||||
if (mCurrentBalance > 0)
|
if (mCurrentBalance > 0)
|
||||||
{
|
{
|
||||||
mTotalBalanceLabel->setCaption(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sTotalSold")->str);
|
mTotalBalanceLabel->setCaptionWithReplacing("#{sTotalSold}");
|
||||||
mTotalBalance->setCaption(boost::lexical_cast<std::string>(mCurrentBalance));
|
mTotalBalance->setCaption(boost::lexical_cast<std::string>(mCurrentBalance));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mTotalBalanceLabel->setCaption(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sTotalCost")->str);
|
mTotalBalanceLabel->setCaptionWithReplacing("#{sTotalCost}");
|
||||||
mTotalBalance->setCaption(boost::lexical_cast<std::string>(-mCurrentBalance));
|
mTotalBalance->setCaption(boost::lexical_cast<std::string>(-mCurrentBalance));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,8 +228,7 @@ namespace MWGui
|
||||||
merchantgold = ref->base->data.gold;
|
merchantgold = ref->base->data.gold;
|
||||||
}
|
}
|
||||||
|
|
||||||
mMerchantGold->setCaption(MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sSellerGold")->str
|
mMerchantGold->setCaptionWithReplacing("#{sSellerGold} " + boost::lexical_cast<std::string>(merchantgold));
|
||||||
+ " " + boost::lexical_cast<std::string>(merchantgold));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<MWWorld::Ptr> TradeWindow::getEquippedItems()
|
std::vector<MWWorld::Ptr> TradeWindow::getEquippedItems()
|
||||||
|
|
|
@ -97,13 +97,13 @@ float MWMechanics::NpcStats::getSkillGain (int skillIndex, const ESM::Class& cla
|
||||||
}
|
}
|
||||||
|
|
||||||
float typeFactor =
|
float typeFactor =
|
||||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMiscSkillBonus")->f;
|
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMiscSkillBonus")->getFloat();
|
||||||
|
|
||||||
for (int i=0; i<5; ++i)
|
for (int i=0; i<5; ++i)
|
||||||
if (class_.data.skills[i][0]==skillIndex)
|
if (class_.data.skills[i][0]==skillIndex)
|
||||||
{
|
{
|
||||||
typeFactor =
|
typeFactor =
|
||||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMinorSkillBonus")->f;
|
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMinorSkillBonus")->getFloat();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -112,7 +112,7 @@ float MWMechanics::NpcStats::getSkillGain (int skillIndex, const ESM::Class& cla
|
||||||
if (class_.data.skills[i][1]==skillIndex)
|
if (class_.data.skills[i][1]==skillIndex)
|
||||||
{
|
{
|
||||||
typeFactor =
|
typeFactor =
|
||||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMajorSkillBonus")->f;
|
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fMajorSkillBonus")->getFloat();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ float MWMechanics::NpcStats::getSkillGain (int skillIndex, const ESM::Class& cla
|
||||||
if (skill->data.specialization==class_.data.specialization)
|
if (skill->data.specialization==class_.data.specialization)
|
||||||
{
|
{
|
||||||
specialisationFactor =
|
specialisationFactor =
|
||||||
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fSpecialSkillBonus")->f;
|
MWBase::Environment::get().getWorld()->getStore().gameSettings.find ("fSpecialSkillBonus")->getFloat();
|
||||||
|
|
||||||
if (specialisationFactor<=0)
|
if (specialisationFactor<=0)
|
||||||
throw std::runtime_error ("invalid skill specialisation factor");
|
throw std::runtime_error ("invalid skill specialisation factor");
|
||||||
|
|
|
@ -323,6 +323,7 @@ namespace MWRender
|
||||||
bool Player::getPosition(Ogre::Vector3 &player, Ogre::Vector3 &camera)
|
bool Player::getPosition(Ogre::Vector3 &player, Ogre::Vector3 &camera)
|
||||||
{
|
{
|
||||||
float xch;
|
float xch;
|
||||||
|
mCamera->getParentSceneNode ()->needUpdate(true);
|
||||||
camera = mCamera->getRealPosition();
|
camera = mCamera->getRealPosition();
|
||||||
xch = camera.z, camera.z = camera.y, camera.y = -xch;
|
xch = camera.z, camera.z = camera.y, camera.y = -xch;
|
||||||
player = mPlayerNode->getPosition();
|
player = mPlayerNode->getPosition();
|
||||||
|
|
|
@ -76,7 +76,7 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& ptr)
|
||||||
|
|
||||||
// gold needs special handling: when it is inserted into a container, the base object automatically becomes Gold_001
|
// gold needs special handling: when it is inserted into a container, the base object automatically becomes Gold_001
|
||||||
// this ensures that gold piles of different sizes stack with each other (also, several scripts rely on Gold_001 for detecting player gold)
|
// this ensures that gold piles of different sizes stack with each other (also, several scripts rely on Gold_001 for detecting player gold)
|
||||||
if (MWWorld::Class::get(ptr).getName(ptr) == MWBase::Environment::get().getWorld()->getStore().gameSettings.search("sGold")->str)
|
if (MWWorld::Class::get(ptr).getName(ptr) == MWBase::Environment::get().getWorld()->getStore().gameSettings.find("sGold")->getString())
|
||||||
{
|
{
|
||||||
MWWorld::LiveCellRef<ESM::Miscellaneous> *gold =
|
MWWorld::LiveCellRef<ESM::Miscellaneous> *gold =
|
||||||
ptr.get<ESM::Miscellaneous>();
|
ptr.get<ESM::Miscellaneous>();
|
||||||
|
|
|
@ -526,7 +526,7 @@ namespace MWWorld
|
||||||
std::pair<std::string, float> result = mPhysics->getFacedHandle (*this);
|
std::pair<std::string, float> result = mPhysics->getFacedHandle (*this);
|
||||||
|
|
||||||
if (result.first.empty() ||
|
if (result.first.empty() ||
|
||||||
result.second>getStore().gameSettings.find ("iMaxActivateDist")->i)
|
result.second>getStore().gameSettings.find ("iMaxActivateDist")->getInt())
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
return result.first;
|
return result.first;
|
||||||
|
|
Loading…
Reference in a new issue