remove more of the testdata stuff - it never does anything other than occupy memory, in debug builds

This commit is contained in:
DarthArgus
2016-03-24 19:19:44 +00:00
parent 64b4a7731d
commit a65ea6163d
61 changed files with 682 additions and 4049 deletions
@@ -656,7 +656,7 @@ bool ConsoleCommandParserObject::performParsing (const NetworkId & userId, const
{
if (ConfigServerGame::getStripNonFreeAssetsFromPlayersInTutorial() && NewbieTutorial::isInTutorialArea(userObject))
{
std::string sharedTemplate = ot->getSharedTemplate(false);
std::string sharedTemplate = ot->getSharedTemplate();
if (!FileManifest::contains(sharedTemplate.c_str()))
{
@@ -739,7 +739,7 @@ bool ConsoleCommandParserObject::performParsing (const NetworkId & userId, const
{
if (ConfigServerGame::getStripNonFreeAssetsFromPlayersInTutorial() && NewbieTutorial::isInTutorialArea(userObject))
{
std::string sharedTemplate = ot->getSharedTemplate(false);
std::string sharedTemplate = ot->getSharedTemplate();
if (!FileManifest::contains(sharedTemplate.c_str()))
{
@@ -809,7 +809,7 @@ bool ConsoleCommandParserObject::performParsing (const NetworkId & userId, const
if (ConfigServerGame::getStripNonFreeAssetsFromPlayersInTutorial() && NewbieTutorial::isInTutorialArea(userObject))
{
std::string sharedTemplate = ot->getSharedTemplate(false);
std::string sharedTemplate = ot->getSharedTemplate();
if (!FileManifest::contains(sharedTemplate.c_str()))
{
@@ -886,7 +886,7 @@ bool ConsoleCommandParserObject::performParsing (const NetworkId & userId, const
{
if (ConfigServerGame::getStripNonFreeAssetsFromPlayersInTutorial() && NewbieTutorial::isInTutorialArea(userObject))
{
std::string sharedTemplate = ot->getSharedTemplate(false);
std::string sharedTemplate = ot->getSharedTemplate();
if (!FileManifest::contains(sharedTemplate.c_str()))
{
@@ -953,7 +953,7 @@ bool ConsoleCommandParserObject::performParsing (const NetworkId & userId, const
{
if (ConfigServerGame::getStripNonFreeAssetsFromPlayersInTutorial() && NewbieTutorial::isInTutorialArea(userObject))
{
std::string sharedTemplate = ot->getSharedTemplate(false);
std::string sharedTemplate = ot->getSharedTemplate();
if (!FileManifest::contains(sharedTemplate.c_str()))
{
@@ -1021,7 +1021,7 @@ bool ConsoleCommandParserObject::performParsing (const NetworkId & userId, const
{
if (ConfigServerGame::getStripNonFreeAssetsFromPlayersInTutorial() && NewbieTutorial::isInTutorialArea(userObject))
{
std::string sharedTemplate = ot->getSharedTemplate(false);
std::string sharedTemplate = ot->getSharedTemplate();
if (!FileManifest::contains(sharedTemplate.c_str()))
{
@@ -1093,7 +1093,7 @@ bool ConsoleCommandParserObject::performParsing (const NetworkId & userId, const
{
if (ConfigServerGame::getStripNonFreeAssetsFromPlayersInTutorial() && NewbieTutorial::isInTutorialArea(userObject))
{
std::string sharedTemplate = ot->getSharedTemplate(false);
std::string sharedTemplate = ot->getSharedTemplate();
if (!FileManifest::contains(sharedTemplate.c_str()))
{
@@ -4434,7 +4434,6 @@ void CreatureObject::removeAttributeModifier (const std::string & modName)
{
sendCancelTimedMod(m.mod.tag);
}
const char * type = "attrib";
if (AttribMod::isSkillMod(m.mod))
{
const char * skillModName = AttribModNameManager::getInstance().getAttribModName(m.mod.skill);
@@ -4447,11 +4446,8 @@ void CreatureObject::removeAttributeModifier (const std::string & modName)
PlayerObject::getAccountDescription(this).c_str(),
m.mod.tag, m.mod.skill, m.mod.value, m.mod.sustain, m.mod.flags));
}
type = "skill";
}
m_attributeModList.erase(f);
// LOG("CustomerService", ("Attribs: Removed named %s mod %s from %s",
// type, modName.c_str(), PlayerObject::getAccountDescription(this).c_str()));
}
}
} // CreatureObject::removeAttributeModifier
@@ -5185,7 +5181,6 @@ void CreatureObject::decayAttributes(float time)
// regenerate attributes
int i;
bool attribRegen = false;
float regenerationRate[3] = {0,0,0};
m_regenerationTime += time;
for (i = 0; i < 3; ++i)
@@ -5195,7 +5190,6 @@ void CreatureObject::decayAttributes(float time)
int currentAttrib = getAttribute(poolAttrib);
if (currentAttrib < maxAttrib)
{
attribRegen = true;
regenerationRate[i] = getRegenRate(poolAttrib);
m_regeneration[poolAttrib] += regenerationRate[i] * time;
}
@@ -7109,7 +7103,6 @@ void CreatureObject::onContainerGainItem(ServerObject& item, ServerObject* sourc
{
Object const * inventory = 0;
Object const * datapad = 0;
Object const * appearance = 0;
SlottedContainer const * const myContainer = ContainerInterface::getSlottedContainer(*this);
@@ -7132,7 +7125,6 @@ void CreatureObject::onContainerGainItem(ServerObject& item, ServerObject* sourc
if (appearanceInvSlot != SlotId::invalid)
{
Container::ContainedItem itemId = myContainer->getObjectInSlot(appearanceInvSlot, tmp);
appearance = itemId.getObject();
}
}
@@ -351,7 +351,6 @@ namespace ServerObjectNamespace
if (!dest || !transferer)
return true;
bool isBankTransfer = false;
const CreatureObject * const creature = transferer->asCreatureObject();
if (creature && dest == creature->getBankContainer())
{
@@ -370,7 +369,6 @@ namespace ServerObjectNamespace
const TangibleObject * const bankTerminal = safe_cast<TangibleObject *>(NetworkIdManager::getObjectById(bankTerminalId));
if (bankTerminal)
{
isBankTransfer = true;
Unicode::String bankName;
if (bankTerminal->getObjVars().getItem(OBJVAR_BANK_NAME_ID, bankName))
{
@@ -114,22 +114,14 @@ Tag ServerArmorTemplate::getHighestTemplateVersion(void) const
} // ServerArmorTemplate::getHighestTemplateVersion
//@BEGIN TFD
ServerArmorTemplate::ArmorRating ServerArmorTemplate::getRating(bool testData) const
ServerArmorTemplate::ArmorRating ServerArmorTemplate::getRating() const
{
#ifdef _DEBUG
ServerArmorTemplate::ArmorRating testDataValue = static_cast<ServerArmorTemplate::ArmorRating>(0);
#else
UNREF(testData);
#endif
const ServerArmorTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getRating(true);
#endif
}
if (!m_rating.isLoaded())
@@ -147,31 +139,18 @@ UNREF(testData);
}
ArmorRating value = static_cast<ArmorRating>(m_rating.getValue());
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::getRating
int ServerArmorTemplate::getIntegrity(bool testData) const
int ServerArmorTemplate::getIntegrity() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getIntegrity(true);
#endif
}
if (!m_integrity.isLoaded())
@@ -211,31 +190,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::getIntegrity
int ServerArmorTemplate::getIntegrityMin(bool testData) const
int ServerArmorTemplate::getIntegrityMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getIntegrityMin(true);
#endif
}
if (!m_integrity.isLoaded())
@@ -275,31 +241,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::getIntegrityMin
int ServerArmorTemplate::getIntegrityMax(bool testData) const
int ServerArmorTemplate::getIntegrityMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getIntegrityMax(true);
#endif
}
if (!m_integrity.isLoaded())
@@ -339,31 +292,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::getIntegrityMax
int ServerArmorTemplate::getEffectiveness(bool testData) const
int ServerArmorTemplate::getEffectiveness() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getEffectiveness(true);
#endif
}
if (!m_effectiveness.isLoaded())
@@ -403,31 +343,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::getEffectiveness
int ServerArmorTemplate::getEffectivenessMin(bool testData) const
int ServerArmorTemplate::getEffectivenessMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getEffectivenessMin(true);
#endif
}
if (!m_effectiveness.isLoaded())
@@ -467,31 +394,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::getEffectivenessMin
int ServerArmorTemplate::getEffectivenessMax(bool testData) const
int ServerArmorTemplate::getEffectivenessMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getEffectivenessMax(true);
#endif
}
if (!m_effectiveness.isLoaded())
@@ -531,11 +445,6 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::getEffectivenessMax
@@ -693,22 +602,14 @@ size_t ServerArmorTemplate::getSpecialProtectionCount(void) const
return count;
} // ServerArmorTemplate::getSpecialProtectionCount
int ServerArmorTemplate::getVulnerability(bool testData) const
int ServerArmorTemplate::getVulnerability() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getVulnerability(true);
#endif
}
if (!m_vulnerability.isLoaded())
@@ -748,31 +649,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::getVulnerability
int ServerArmorTemplate::getVulnerabilityMin(bool testData) const
int ServerArmorTemplate::getVulnerabilityMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getVulnerabilityMin(true);
#endif
}
if (!m_vulnerability.isLoaded())
@@ -812,31 +700,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::getVulnerabilityMin
int ServerArmorTemplate::getVulnerabilityMax(bool testData) const
int ServerArmorTemplate::getVulnerabilityMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getVulnerabilityMax(true);
#endif
}
if (!m_vulnerability.isLoaded())
@@ -876,11 +751,6 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::getVulnerabilityMax
@@ -1032,21 +902,6 @@ int ServerArmorTemplate::getEncumbranceMax(int index) const
return value;
} // ServerArmorTemplate::getEncumbranceMax
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerArmorTemplate::testValues(void) const
{
IGNORE_RETURN(getRating(true));
IGNORE_RETURN(getIntegrityMin(true));
IGNORE_RETURN(getIntegrityMax(true));
IGNORE_RETURN(getEffectivenessMin(true));
IGNORE_RETURN(getEffectivenessMax(true));
IGNORE_RETURN(getVulnerabilityMin(true));
IGNORE_RETURN(getVulnerabilityMax(true));
} // ServerArmorTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -1088,8 +943,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,1))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -1197,22 +1052,14 @@ Tag ServerArmorTemplate::_SpecialProtection::getId(void) const
return _SpecialProtection_tag;
} // ServerArmorTemplate::_SpecialProtection::getId
ServerArmorTemplate::DamageType ServerArmorTemplate::_SpecialProtection::getType(bool versionOk, bool testData) const
ServerArmorTemplate::DamageType ServerArmorTemplate::_SpecialProtection::getType(bool versionOk) const
{
#ifdef _DEBUG
ServerArmorTemplate::DamageType testDataValue = static_cast<ServerArmorTemplate::DamageType>(0);
#else
UNREF(testData);
#endif
const ServerArmorTemplate::_SpecialProtection * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate::_SpecialProtection *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getType(true);
#endif
}
if (!m_type.isLoaded())
@@ -1230,31 +1077,18 @@ UNREF(testData);
}
DamageType value = static_cast<DamageType>(m_type.getValue());
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::_SpecialProtection::getType
int ServerArmorTemplate::_SpecialProtection::getEffectiveness(bool versionOk, bool testData) const
int ServerArmorTemplate::_SpecialProtection::getEffectiveness(bool versionOk) const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate::_SpecialProtection * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate::_SpecialProtection *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getEffectiveness(true);
#endif
}
if (!m_effectiveness.isLoaded())
@@ -1294,31 +1128,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::_SpecialProtection::getEffectiveness
int ServerArmorTemplate::_SpecialProtection::getEffectivenessMin(bool versionOk, bool testData) const
int ServerArmorTemplate::_SpecialProtection::getEffectivenessMin(bool versionOk) const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate::_SpecialProtection * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate::_SpecialProtection *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getEffectivenessMin(true);
#endif
}
if (!m_effectiveness.isLoaded())
@@ -1358,31 +1179,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::_SpecialProtection::getEffectivenessMin
int ServerArmorTemplate::_SpecialProtection::getEffectivenessMax(bool versionOk, bool testData) const
int ServerArmorTemplate::_SpecialProtection::getEffectivenessMax(bool versionOk) const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerArmorTemplate::_SpecialProtection * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerArmorTemplate::_SpecialProtection *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getEffectivenessMax(true);
#endif
}
if (!m_effectiveness.isLoaded())
@@ -1422,26 +1230,10 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerArmorTemplate::_SpecialProtection::getEffectivenessMax
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerArmorTemplate::_SpecialProtection::testValues(void) const
{
IGNORE_RETURN(getType(true));
IGNORE_RETURN(getEffectivenessMin(true));
IGNORE_RETURN(getEffectivenessMax(true));
} // ServerArmorTemplate::_SpecialProtection::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -98,16 +98,11 @@ protected:
virtual Tag getId(void) const;
public:
DamageType getType(bool versionOk, bool testData = false) const;
int getEffectiveness(bool versionOk, bool testData = false) const;
int getEffectivenessMin(bool versionOk, bool testData = false) const;
int getEffectivenessMax(bool versionOk, bool testData = false) const;
DamageType getType(bool versionOk) const;
int getEffectiveness(bool versionOk) const;
int getEffectivenessMin(bool versionOk) const;
int getEffectivenessMax(bool versionOk) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -125,29 +120,24 @@ private:
friend class ServerArmorTemplate::_SpecialProtection;
public:
ArmorRating getRating(bool testData = false) const;
int getIntegrity(bool testData = false) const;
int getIntegrityMin(bool testData = false) const;
int getIntegrityMax(bool testData = false) const;
int getEffectiveness(bool testData = false) const;
int getEffectivenessMin(bool testData = false) const;
int getEffectivenessMax(bool testData = false) const;
ArmorRating getRating() const;
int getIntegrity() const;
int getIntegrityMin() const;
int getIntegrityMax() const;
int getEffectiveness() const;
int getEffectivenessMin() const;
int getEffectivenessMax() const;
void getSpecialProtection(SpecialProtection &data, int index) const;
void getSpecialProtectionMin(SpecialProtection &data, int index) const;
void getSpecialProtectionMax(SpecialProtection &data, int index) const;
size_t getSpecialProtectionCount(void) const;
int getVulnerability(bool testData = false) const;
int getVulnerabilityMin(bool testData = false) const;
int getVulnerabilityMax(bool testData = false) const;
int getVulnerability() const;
int getVulnerabilityMin() const;
int getVulnerabilityMax() const;
int getEncumbrance(int index) const;
int getEncumbranceMin(int index) const;
int getEncumbranceMax(int index) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -13,7 +13,7 @@
#include "serverGame/FirstServerGame.h"
#include "ServerBattlefieldMarkerObjectTemplate.h"
#include "serverGame/BattlefieldMarkerObject.h"
#include "sharedDebug/DataLint.h"
#include "sharedFile/Iff.h"
#include "sharedObject/ObjectTemplate.h"
#include "sharedObject/ObjectTemplateList.h"
@@ -113,15 +113,6 @@ Object * ServerBattlefieldMarkerObjectTemplate::createObject(void) const
} // ServerBattlefieldMarkerObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerBattlefieldMarkerObjectTemplate::testValues(void) const
{
ServerTangibleObjectTemplate::testValues();
} // ServerBattlefieldMarkerObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -164,8 +155,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,22 +112,14 @@ Object * ServerBuildingObjectTemplate::createObject(void) const
} // ServerBuildingObjectTemplate::createObject
//@BEGIN TFD
int ServerBuildingObjectTemplate::getMaintenanceCost(bool testData) const
int ServerBuildingObjectTemplate::getMaintenanceCost() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerBuildingObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerBuildingObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaintenanceCost(true);
#endif
}
if (!m_maintenanceCost.isLoaded())
@@ -167,31 +159,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerBuildingObjectTemplate::getMaintenanceCost
int ServerBuildingObjectTemplate::getMaintenanceCostMin(bool testData) const
int ServerBuildingObjectTemplate::getMaintenanceCostMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerBuildingObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerBuildingObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaintenanceCostMin(true);
#endif
}
if (!m_maintenanceCost.isLoaded())
@@ -231,31 +210,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerBuildingObjectTemplate::getMaintenanceCostMin
int ServerBuildingObjectTemplate::getMaintenanceCostMax(bool testData) const
int ServerBuildingObjectTemplate::getMaintenanceCostMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerBuildingObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerBuildingObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaintenanceCostMax(true);
#endif
}
if (!m_maintenanceCost.isLoaded())
@@ -295,31 +261,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerBuildingObjectTemplate::getMaintenanceCostMax
bool ServerBuildingObjectTemplate::getIsPublic(bool testData) const
bool ServerBuildingObjectTemplate::getIsPublic() const
{
#ifdef _DEBUG
bool testDataValue = false;
#else
UNREF(testData);
#endif
const ServerBuildingObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerBuildingObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getIsPublic(true);
#endif
}
if (!m_isPublic.isLoaded())
@@ -337,27 +290,10 @@ UNREF(testData);
}
bool value = m_isPublic.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerBuildingObjectTemplate::getIsPublic
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerBuildingObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getMaintenanceCostMin(true));
IGNORE_RETURN(getMaintenanceCostMax(true));
IGNORE_RETURN(getIsPublic(true));
ServerTangibleObjectTemplate::testValues();
} // ServerBuildingObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -400,8 +336,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,1))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -44,16 +44,11 @@ public:
//@BEGIN TFD
public:
int getMaintenanceCost(bool testData = false) const;
int getMaintenanceCostMin(bool testData = false) const;
int getMaintenanceCostMax(bool testData = false) const;
bool getIsPublic(bool testData = false) const;
int getMaintenanceCost() const;
int getMaintenanceCostMin() const;
int getMaintenanceCostMax() const;
bool getIsPublic() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -118,15 +118,6 @@ Object * ServerCellObjectTemplate::createObject(void) const
} // ServerCellObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerCellObjectTemplate::testValues(void) const
{
ServerObjectTemplate::testValues();
} // ServerCellObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -169,8 +160,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -114,15 +114,6 @@ Object * ServerCityObjectTemplate::createObject(void) const
} // ServerCityObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerCityObjectTemplate::testValues(void) const
{
ServerUniverseObjectTemplate::testValues();
} // ServerCityObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -165,8 +156,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -103,15 +103,6 @@ Tag ServerConstructionContractObjectTemplate::getId(void) const
} // ServerConstructionContractObjectTemplate::getId
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerConstructionContractObjectTemplate::testValues(void) const
{
ServerIntangibleObjectTemplate::testValues();
} // ServerConstructionContractObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -154,8 +145,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -601,22 +601,14 @@ int ServerCreatureObjectTemplate::getMaxAttributesMax(Attributes index) const
return value;
} // ServerCreatureObjectTemplate::getMaxAttributesMax
float ServerCreatureObjectTemplate::getMinDrainModifier(bool testData) const
float ServerCreatureObjectTemplate::getMinDrainModifier() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMinDrainModifier(true);
#endif
}
if (!m_minDrainModifier.isLoaded())
@@ -656,31 +648,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMinDrainModifier
float ServerCreatureObjectTemplate::getMinDrainModifierMin(bool testData) const
float ServerCreatureObjectTemplate::getMinDrainModifierMin() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMinDrainModifierMin(true);
#endif
}
if (!m_minDrainModifier.isLoaded())
@@ -720,31 +699,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMinDrainModifierMin
float ServerCreatureObjectTemplate::getMinDrainModifierMax(bool testData) const
float ServerCreatureObjectTemplate::getMinDrainModifierMax() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMinDrainModifierMax(true);
#endif
}
if (!m_minDrainModifier.isLoaded())
@@ -784,31 +750,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMinDrainModifierMax
float ServerCreatureObjectTemplate::getMaxDrainModifier(bool testData) const
float ServerCreatureObjectTemplate::getMaxDrainModifier() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxDrainModifier(true);
#endif
}
if (!m_maxDrainModifier.isLoaded())
@@ -848,31 +801,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMaxDrainModifier
float ServerCreatureObjectTemplate::getMaxDrainModifierMin(bool testData) const
float ServerCreatureObjectTemplate::getMaxDrainModifierMin() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxDrainModifierMin(true);
#endif
}
if (!m_maxDrainModifier.isLoaded())
@@ -912,31 +852,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMaxDrainModifierMin
float ServerCreatureObjectTemplate::getMaxDrainModifierMax(bool testData) const
float ServerCreatureObjectTemplate::getMaxDrainModifierMax() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxDrainModifierMax(true);
#endif
}
if (!m_maxDrainModifier.isLoaded())
@@ -976,31 +903,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMaxDrainModifierMax
float ServerCreatureObjectTemplate::getMinFaucetModifier(bool testData) const
float ServerCreatureObjectTemplate::getMinFaucetModifier() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMinFaucetModifier(true);
#endif
}
if (!m_minFaucetModifier.isLoaded())
@@ -1040,31 +954,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMinFaucetModifier
float ServerCreatureObjectTemplate::getMinFaucetModifierMin(bool testData) const
float ServerCreatureObjectTemplate::getMinFaucetModifierMin() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMinFaucetModifierMin(true);
#endif
}
if (!m_minFaucetModifier.isLoaded())
@@ -1104,31 +1005,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMinFaucetModifierMin
float ServerCreatureObjectTemplate::getMinFaucetModifierMax(bool testData) const
float ServerCreatureObjectTemplate::getMinFaucetModifierMax() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMinFaucetModifierMax(true);
#endif
}
if (!m_minFaucetModifier.isLoaded())
@@ -1168,31 +1056,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMinFaucetModifierMax
float ServerCreatureObjectTemplate::getMaxFaucetModifier(bool testData) const
float ServerCreatureObjectTemplate::getMaxFaucetModifier() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxFaucetModifier(true);
#endif
}
if (!m_maxFaucetModifier.isLoaded())
@@ -1232,31 +1107,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMaxFaucetModifier
float ServerCreatureObjectTemplate::getMaxFaucetModifierMin(bool testData) const
float ServerCreatureObjectTemplate::getMaxFaucetModifierMin() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxFaucetModifierMin(true);
#endif
}
if (!m_maxFaucetModifier.isLoaded())
@@ -1296,31 +1158,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMaxFaucetModifierMin
float ServerCreatureObjectTemplate::getMaxFaucetModifierMax(bool testData) const
float ServerCreatureObjectTemplate::getMaxFaucetModifierMax() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxFaucetModifierMax(true);
#endif
}
if (!m_maxFaucetModifier.isLoaded())
@@ -1360,11 +1209,6 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getMaxFaucetModifierMax
@@ -1531,22 +1375,14 @@ size_t ServerCreatureObjectTemplate::getAttribModsCount(void) const
return count;
} // ServerCreatureObjectTemplate::getAttribModsCount
int ServerCreatureObjectTemplate::getShockWounds(bool testData) const
int ServerCreatureObjectTemplate::getShockWounds() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getShockWounds(true);
#endif
}
if (!m_shockWounds.isLoaded())
@@ -1586,31 +1422,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getShockWounds
int ServerCreatureObjectTemplate::getShockWoundsMin(bool testData) const
int ServerCreatureObjectTemplate::getShockWoundsMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getShockWoundsMin(true);
#endif
}
if (!m_shockWounds.isLoaded())
@@ -1650,31 +1473,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getShockWoundsMin
int ServerCreatureObjectTemplate::getShockWoundsMax(bool testData) const
int ServerCreatureObjectTemplate::getShockWoundsMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getShockWoundsMax(true);
#endif
}
if (!m_shockWounds.isLoaded())
@@ -1714,31 +1524,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getShockWoundsMax
bool ServerCreatureObjectTemplate::getCanCreateAvatar(bool testData) const
bool ServerCreatureObjectTemplate::getCanCreateAvatar() const
{
#ifdef _DEBUG
bool testDataValue = false;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCanCreateAvatar(true);
#endif
}
if (!m_canCreateAvatar.isLoaded())
@@ -1756,31 +1553,18 @@ UNREF(testData);
}
bool value = m_canCreateAvatar.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getCanCreateAvatar
const std::string & ServerCreatureObjectTemplate::getNameGeneratorType(bool testData) const
const std::string & ServerCreatureObjectTemplate::getNameGeneratorType() const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getNameGeneratorType(true);
#endif
}
if (!m_nameGeneratorType.isLoaded())
@@ -1798,31 +1582,18 @@ UNREF(testData);
}
const std::string & value = m_nameGeneratorType.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getNameGeneratorType
float ServerCreatureObjectTemplate::getApproachTriggerRange(bool testData) const
float ServerCreatureObjectTemplate::getApproachTriggerRange() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getApproachTriggerRange(true);
#endif
}
if (!m_approachTriggerRange.isLoaded())
@@ -1862,31 +1633,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getApproachTriggerRange
float ServerCreatureObjectTemplate::getApproachTriggerRangeMin(bool testData) const
float ServerCreatureObjectTemplate::getApproachTriggerRangeMin() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getApproachTriggerRangeMin(true);
#endif
}
if (!m_approachTriggerRange.isLoaded())
@@ -1926,31 +1684,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getApproachTriggerRangeMin
float ServerCreatureObjectTemplate::getApproachTriggerRangeMax(bool testData) const
float ServerCreatureObjectTemplate::getApproachTriggerRangeMax() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerCreatureObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getApproachTriggerRangeMax(true);
#endif
}
if (!m_approachTriggerRange.isLoaded())
@@ -1990,11 +1735,6 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerCreatureObjectTemplate::getApproachTriggerRangeMax
@@ -2293,29 +2033,6 @@ float ServerCreatureObjectTemplate::getMentalStatesDecayMax(MentalStates index)
return value;
} // ServerCreatureObjectTemplate::getMentalStatesDecayMax
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerCreatureObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getMinDrainModifierMin(true));
IGNORE_RETURN(getMinDrainModifierMax(true));
IGNORE_RETURN(getMaxDrainModifierMin(true));
IGNORE_RETURN(getMaxDrainModifierMax(true));
IGNORE_RETURN(getMinFaucetModifierMin(true));
IGNORE_RETURN(getMinFaucetModifierMax(true));
IGNORE_RETURN(getMaxFaucetModifierMin(true));
IGNORE_RETURN(getMaxFaucetModifierMax(true));
IGNORE_RETURN(getShockWoundsMin(true));
IGNORE_RETURN(getShockWoundsMax(true));
IGNORE_RETURN(getCanCreateAvatar(true));
IGNORE_RETURN(getNameGeneratorType(true));
IGNORE_RETURN(getApproachTriggerRangeMin(true));
IGNORE_RETURN(getApproachTriggerRangeMax(true));
ServerTangibleObjectTemplate::testValues();
} // ServerCreatureObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -2358,8 +2075,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,5))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -70,30 +70,30 @@ public:
int getMaxAttributes(Attributes index) const;
int getMaxAttributesMin(Attributes index) const;
int getMaxAttributesMax(Attributes index) const;
float getMinDrainModifier(bool testData = false) const;
float getMinDrainModifierMin(bool testData = false) const;
float getMinDrainModifierMax(bool testData = false) const;
float getMaxDrainModifier(bool testData = false) const;
float getMaxDrainModifierMin(bool testData = false) const;
float getMaxDrainModifierMax(bool testData = false) const;
float getMinFaucetModifier(bool testData = false) const;
float getMinFaucetModifierMin(bool testData = false) const;
float getMinFaucetModifierMax(bool testData = false) const;
float getMaxFaucetModifier(bool testData = false) const;
float getMaxFaucetModifierMin(bool testData = false) const;
float getMaxFaucetModifierMax(bool testData = false) const;
float getMinDrainModifier() const;
float getMinDrainModifierMin() const;
float getMinDrainModifierMax() const;
float getMaxDrainModifier() const;
float getMaxDrainModifierMin() const;
float getMaxDrainModifierMax() const;
float getMinFaucetModifier() const;
float getMinFaucetModifierMin() const;
float getMinFaucetModifierMax() const;
float getMaxFaucetModifier() const;
float getMaxFaucetModifierMin() const;
float getMaxFaucetModifierMax() const;
void getAttribMods(AttribMod &data, int index) const;
void getAttribModsMin(AttribMod &data, int index) const;
void getAttribModsMax(AttribMod &data, int index) const;
size_t getAttribModsCount(void) const;
int getShockWounds(bool testData = false) const;
int getShockWoundsMin(bool testData = false) const;
int getShockWoundsMax(bool testData = false) const;
bool getCanCreateAvatar(bool testData = false) const;
const std::string & getNameGeneratorType(bool testData = false) const;
float getApproachTriggerRange(bool testData = false) const;
float getApproachTriggerRangeMin(bool testData = false) const;
float getApproachTriggerRangeMax(bool testData = false) const;
int getShockWounds() const;
int getShockWoundsMin() const;
int getShockWoundsMax() const;
bool getCanCreateAvatar() const;
const std::string & getNameGeneratorType() const;
float getApproachTriggerRange() const;
float getApproachTriggerRangeMin() const;
float getApproachTriggerRangeMax() const;
float getMaxMentalStates(MentalStates index) const;
float getMaxMentalStatesMin(MentalStates index) const;
float getMaxMentalStatesMax(MentalStates index) const;
@@ -101,11 +101,6 @@ public:
float getMentalStatesDecayMin(MentalStates index) const;
float getMentalStatesDecayMax(MentalStates index) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -143,12 +143,6 @@ Tag ServerDraftSchematicObjectTemplate::getHighestTemplateVersion(void) const
*/
Object * ServerDraftSchematicObjectTemplate::createObject(void) const
{
#ifdef _DEBUG
if (DataLint::isEnabled())
{
return new DraftSchematicObject(this);
}
#endif
WARNING(true, ("Trying to create a draft schematic %s outside the draft "
"schematic factory!\n", getName()));
@@ -161,41 +155,17 @@ Object * ServerDraftSchematicObjectTemplate::createObject(void) const
*/
void ServerDraftSchematicObjectTemplate::postLoad()
{
#ifdef _DEBUG
// verify that all slot names are unique
std::set<std::string> slotNames;
IngredientSlot data;
int count = getSlotsCount();
for (int i = 0; i < count; ++i)
{
getSlots(data, i);
if (slotNames.insert(data.name.getText()).second == false)
{
WARNING(true, ("Draft schematic %s has duplicate slot name %s",
getName(), data.name.getText().c_str()));
}
}
#endif
} // ServerDraftSchematicObjectTemplate::postLoad
//@BEGIN TFD
ServerDraftSchematicObjectTemplate::CraftingType ServerDraftSchematicObjectTemplate::getCategory(bool testData) const
ServerDraftSchematicObjectTemplate::CraftingType ServerDraftSchematicObjectTemplate::getCategory() const
{
#ifdef _DEBUG
ServerDraftSchematicObjectTemplate::CraftingType testDataValue = static_cast<ServerDraftSchematicObjectTemplate::CraftingType>(0);
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCategory(true);
#endif
}
if (!m_category.isLoaded())
@@ -213,11 +183,6 @@ UNREF(testData);
}
CraftingType value = static_cast<CraftingType>(m_category.getValue());
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getCategory
@@ -522,22 +487,14 @@ size_t ServerDraftSchematicObjectTemplate::getSkillCommandsCount(void) const
return count;
} // ServerDraftSchematicObjectTemplate::getSkillCommandsCount
bool ServerDraftSchematicObjectTemplate::getDestroyIngredients(bool testData) const
bool ServerDraftSchematicObjectTemplate::getDestroyIngredients() const
{
#ifdef _DEBUG
bool testDataValue = false;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getDestroyIngredients(true);
#endif
}
if (!m_destroyIngredients.isLoaded())
@@ -555,11 +512,6 @@ UNREF(testData);
}
bool value = m_destroyIngredients.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getDestroyIngredients
@@ -623,22 +575,14 @@ size_t ServerDraftSchematicObjectTemplate::getManufactureScriptsCount(void) cons
return count;
} // ServerDraftSchematicObjectTemplate::getManufactureScriptsCount
int ServerDraftSchematicObjectTemplate::getItemsPerContainer(bool testData) const
int ServerDraftSchematicObjectTemplate::getItemsPerContainer() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getItemsPerContainer(true);
#endif
}
if (!m_itemsPerContainer.isLoaded())
@@ -678,31 +622,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getItemsPerContainer
int ServerDraftSchematicObjectTemplate::getItemsPerContainerMin(bool testData) const
int ServerDraftSchematicObjectTemplate::getItemsPerContainerMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getItemsPerContainerMin(true);
#endif
}
if (!m_itemsPerContainer.isLoaded())
@@ -742,31 +673,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getItemsPerContainerMin
int ServerDraftSchematicObjectTemplate::getItemsPerContainerMax(bool testData) const
int ServerDraftSchematicObjectTemplate::getItemsPerContainerMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getItemsPerContainerMax(true);
#endif
}
if (!m_itemsPerContainer.isLoaded())
@@ -806,31 +724,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getItemsPerContainerMax
float ServerDraftSchematicObjectTemplate::getManufactureTime(bool testData) const
float ServerDraftSchematicObjectTemplate::getManufactureTime() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getManufactureTime(true);
#endif
}
if (!m_manufactureTime.isLoaded())
@@ -870,31 +775,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getManufactureTime
float ServerDraftSchematicObjectTemplate::getManufactureTimeMin(bool testData) const
float ServerDraftSchematicObjectTemplate::getManufactureTimeMin() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getManufactureTimeMin(true);
#endif
}
if (!m_manufactureTime.isLoaded())
@@ -934,31 +826,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getManufactureTimeMin
float ServerDraftSchematicObjectTemplate::getManufactureTimeMax(bool testData) const
float ServerDraftSchematicObjectTemplate::getManufactureTimeMax() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getManufactureTimeMax(true);
#endif
}
if (!m_manufactureTime.isLoaded())
@@ -998,31 +877,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getManufactureTimeMax
float ServerDraftSchematicObjectTemplate::getPrototypeTime(bool testData) const
float ServerDraftSchematicObjectTemplate::getPrototypeTime() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getPrototypeTime(true);
#endif
}
if (!m_prototypeTime.isLoaded())
@@ -1062,31 +928,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getPrototypeTime
float ServerDraftSchematicObjectTemplate::getPrototypeTimeMin(bool testData) const
float ServerDraftSchematicObjectTemplate::getPrototypeTimeMin() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getPrototypeTimeMin(true);
#endif
}
if (!m_prototypeTime.isLoaded())
@@ -1126,31 +979,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getPrototypeTimeMin
float ServerDraftSchematicObjectTemplate::getPrototypeTimeMax(bool testData) const
float ServerDraftSchematicObjectTemplate::getPrototypeTimeMax() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getPrototypeTimeMax(true);
#endif
}
if (!m_prototypeTime.isLoaded())
@@ -1190,32 +1030,10 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::getPrototypeTimeMax
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerDraftSchematicObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getCategory(true));
IGNORE_RETURN(getDestroyIngredients(true));
IGNORE_RETURN(getItemsPerContainerMin(true));
IGNORE_RETURN(getItemsPerContainerMax(true));
IGNORE_RETURN(getManufactureTimeMin(true));
IGNORE_RETURN(getManufactureTimeMax(true));
IGNORE_RETURN(getPrototypeTimeMin(true));
IGNORE_RETURN(getPrototypeTimeMax(true));
ServerIntangibleObjectTemplate::testValues();
} // ServerDraftSchematicObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -1258,8 +1076,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,7))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -1410,22 +1228,14 @@ Tag ServerDraftSchematicObjectTemplate::_IngredientSlot::getId(void) const
return _IngredientSlot_tag;
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::getId
bool ServerDraftSchematicObjectTemplate::_IngredientSlot::getOptional(bool versionOk, bool testData) const
bool ServerDraftSchematicObjectTemplate::_IngredientSlot::getOptional(bool versionOk) const
{
#ifdef _DEBUG
bool testDataValue = false;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate::_IngredientSlot *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getOptional(true);
#endif
}
if (!m_optional.isLoaded())
@@ -1443,31 +1253,18 @@ UNREF(testData);
}
bool value = m_optional.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::getOptional
const StringId ServerDraftSchematicObjectTemplate::_IngredientSlot::getName(bool versionOk, bool testData) const
const StringId ServerDraftSchematicObjectTemplate::_IngredientSlot::getName(bool versionOk) const
{
#ifdef _DEBUG
StringId testDataValue = DefaultStringId;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate::_IngredientSlot *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getName(true);
#endif
}
if (!m_name.isLoaded())
@@ -1485,11 +1282,6 @@ UNREF(testData);
}
const StringId value = m_name.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::getName
@@ -1671,22 +1463,14 @@ size_t ServerDraftSchematicObjectTemplate::_IngredientSlot::getOptionsCount(void
return count;
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::getOptionsCount
const std::string & ServerDraftSchematicObjectTemplate::_IngredientSlot::getOptionalSkillCommand(bool versionOk, bool testData) const
const std::string & ServerDraftSchematicObjectTemplate::_IngredientSlot::getOptionalSkillCommand(bool versionOk) const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate::_IngredientSlot *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getOptionalSkillCommand(true);
#endif
}
if (!m_optionalSkillCommand.isLoaded())
@@ -1704,31 +1488,18 @@ UNREF(testData);
}
const std::string & value = m_optionalSkillCommand.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::getOptionalSkillCommand
float ServerDraftSchematicObjectTemplate::_IngredientSlot::getComplexity(bool versionOk, bool testData) const
float ServerDraftSchematicObjectTemplate::_IngredientSlot::getComplexity(bool versionOk) const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate::_IngredientSlot *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getComplexity(true);
#endif
}
if (!m_complexity.isLoaded())
@@ -1768,31 +1539,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::getComplexity
float ServerDraftSchematicObjectTemplate::_IngredientSlot::getComplexityMin(bool versionOk, bool testData) const
float ServerDraftSchematicObjectTemplate::_IngredientSlot::getComplexityMin(bool versionOk) const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate::_IngredientSlot *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getComplexityMin(true);
#endif
}
if (!m_complexity.isLoaded())
@@ -1832,31 +1590,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::getComplexityMin
float ServerDraftSchematicObjectTemplate::_IngredientSlot::getComplexityMax(bool versionOk, bool testData) const
float ServerDraftSchematicObjectTemplate::_IngredientSlot::getComplexityMax(bool versionOk) const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate::_IngredientSlot *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getComplexityMax(true);
#endif
}
if (!m_complexity.isLoaded())
@@ -1896,31 +1641,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::getComplexityMax
const std::string & ServerDraftSchematicObjectTemplate::_IngredientSlot::getAppearance(bool versionOk, bool testData) const
const std::string & ServerDraftSchematicObjectTemplate::_IngredientSlot::getAppearance(bool versionOk) const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerDraftSchematicObjectTemplate::_IngredientSlot * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerDraftSchematicObjectTemplate::_IngredientSlot *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getAppearance(true);
#endif
}
if (!m_appearance.isLoaded())
@@ -1938,29 +1670,10 @@ UNREF(testData);
}
const std::string & value = m_appearance.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::getAppearance
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerDraftSchematicObjectTemplate::_IngredientSlot::testValues(void) const
{
IGNORE_RETURN(getOptional(true));
IGNORE_RETURN(getName(true));
IGNORE_RETURN(getOptionalSkillCommand(true));
IGNORE_RETURN(getComplexityMin(true));
IGNORE_RETURN(getComplexityMax(true));
IGNORE_RETURN(getAppearance(true));
} // ServerDraftSchematicObjectTemplate::_IngredientSlot::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -73,23 +73,18 @@ protected:
virtual Tag getId(void) const;
public:
bool getOptional(bool versionOk, bool testData = false) const;
const StringId getName(bool versionOk, bool testData = false) const;
bool getOptional(bool versionOk) const;
const StringId getName(bool versionOk) const;
void getOptions(Ingredient &data, int index, bool versionOk) const;
void getOptionsMin(Ingredient &data, int index, bool versionOk) const;
void getOptionsMax(Ingredient &data, int index, bool versionOk) const;
size_t getOptionsCount(void) const;
const std::string & getOptionalSkillCommand(bool versionOk, bool testData = false) const;
float getComplexity(bool versionOk, bool testData = false) const;
float getComplexityMin(bool versionOk, bool testData = false) const;
float getComplexityMax(bool versionOk, bool testData = false) const;
const std::string & getAppearance(bool versionOk, bool testData = false) const;
const std::string & getOptionalSkillCommand(bool versionOk) const;
float getComplexity(bool versionOk) const;
float getComplexityMin(bool versionOk) const;
float getComplexityMax(bool versionOk) const;
const std::string & getAppearance(bool versionOk) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -113,7 +108,7 @@ private:
friend class ServerDraftSchematicObjectTemplate::_IngredientSlot;
public:
CraftingType getCategory(bool testData = false) const;
CraftingType getCategory() const;
const ServerObjectTemplate * getCraftedObjectTemplate() const;
const ServerFactoryObjectTemplate * getCrateObjectTemplate() const;
void getSlots(IngredientSlot &data, int index) const;
@@ -122,24 +117,19 @@ public:
size_t getSlotsCount(void) const;
const std::string & getSkillCommands(int index) const;
size_t getSkillCommandsCount(void) const;
bool getDestroyIngredients(bool testData = false) const;
bool getDestroyIngredients() const;
const std::string & getManufactureScripts(int index) const;
size_t getManufactureScriptsCount(void) const;
int getItemsPerContainer(bool testData = false) const;
int getItemsPerContainerMin(bool testData = false) const;
int getItemsPerContainerMax(bool testData = false) const;
float getManufactureTime(bool testData = false) const;
float getManufactureTimeMin(bool testData = false) const;
float getManufactureTimeMax(bool testData = false) const;
float getPrototypeTime(bool testData = false) const;
float getPrototypeTimeMin(bool testData = false) const;
float getPrototypeTimeMax(bool testData = false) const;
int getItemsPerContainer() const;
int getItemsPerContainerMin() const;
int getItemsPerContainerMax() const;
float getManufactureTime() const;
float getManufactureTimeMin() const;
float getManufactureTimeMax() const;
float getPrototypeTime() const;
float getPrototypeTimeMin() const;
float getPrototypeTimeMax() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,15 +112,6 @@ Object * ServerFactoryObjectTemplate::createObject(void) const
} // ServerFactoryObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerFactoryObjectTemplate::testValues(void) const
{
ServerTangibleObjectTemplate::testValues();
} // ServerFactoryObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -163,8 +154,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -114,15 +114,6 @@ Object * ServerGroupObjectTemplate::createObject(void) const
} // ServerGroupObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerGroupObjectTemplate::testValues(void) const
{
ServerUniverseObjectTemplate::testValues();
} // ServerGroupObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -165,8 +156,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -114,15 +114,6 @@ Object * ServerGuildObjectTemplate::createObject(void) const
} // ServerGuildObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerGuildObjectTemplate::testValues(void) const
{
ServerUniverseObjectTemplate::testValues();
} // ServerGuildObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -165,8 +156,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,22 +112,14 @@ Object * ServerHarvesterInstallationObjectTemplate::createObject(void) const
} // ServerHarvesterInstallationObjectTemplate::createObject
//@BEGIN TFD
int ServerHarvesterInstallationObjectTemplate::getMaxExtractionRate(bool testData) const
int ServerHarvesterInstallationObjectTemplate::getMaxExtractionRate() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerHarvesterInstallationObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxExtractionRate(true);
#endif
}
if (!m_maxExtractionRate.isLoaded())
@@ -167,31 +159,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerHarvesterInstallationObjectTemplate::getMaxExtractionRate
int ServerHarvesterInstallationObjectTemplate::getMaxExtractionRateMin(bool testData) const
int ServerHarvesterInstallationObjectTemplate::getMaxExtractionRateMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerHarvesterInstallationObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxExtractionRateMin(true);
#endif
}
if (!m_maxExtractionRate.isLoaded())
@@ -231,31 +210,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerHarvesterInstallationObjectTemplate::getMaxExtractionRateMin
int ServerHarvesterInstallationObjectTemplate::getMaxExtractionRateMax(bool testData) const
int ServerHarvesterInstallationObjectTemplate::getMaxExtractionRateMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerHarvesterInstallationObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxExtractionRateMax(true);
#endif
}
if (!m_maxExtractionRate.isLoaded())
@@ -295,31 +261,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerHarvesterInstallationObjectTemplate::getMaxExtractionRateMax
int ServerHarvesterInstallationObjectTemplate::getCurrentExtractionRate(bool testData) const
int ServerHarvesterInstallationObjectTemplate::getCurrentExtractionRate() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerHarvesterInstallationObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCurrentExtractionRate(true);
#endif
}
if (!m_currentExtractionRate.isLoaded())
@@ -359,31 +312,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerHarvesterInstallationObjectTemplate::getCurrentExtractionRate
int ServerHarvesterInstallationObjectTemplate::getCurrentExtractionRateMin(bool testData) const
int ServerHarvesterInstallationObjectTemplate::getCurrentExtractionRateMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerHarvesterInstallationObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCurrentExtractionRateMin(true);
#endif
}
if (!m_currentExtractionRate.isLoaded())
@@ -423,31 +363,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerHarvesterInstallationObjectTemplate::getCurrentExtractionRateMin
int ServerHarvesterInstallationObjectTemplate::getCurrentExtractionRateMax(bool testData) const
int ServerHarvesterInstallationObjectTemplate::getCurrentExtractionRateMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerHarvesterInstallationObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCurrentExtractionRateMax(true);
#endif
}
if (!m_currentExtractionRate.isLoaded())
@@ -487,31 +414,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerHarvesterInstallationObjectTemplate::getCurrentExtractionRateMax
int ServerHarvesterInstallationObjectTemplate::getMaxHopperSize(bool testData) const
int ServerHarvesterInstallationObjectTemplate::getMaxHopperSize() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerHarvesterInstallationObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxHopperSize(true);
#endif
}
if (!m_maxHopperSize.isLoaded())
@@ -551,31 +465,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerHarvesterInstallationObjectTemplate::getMaxHopperSize
int ServerHarvesterInstallationObjectTemplate::getMaxHopperSizeMin(bool testData) const
int ServerHarvesterInstallationObjectTemplate::getMaxHopperSizeMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerHarvesterInstallationObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxHopperSizeMin(true);
#endif
}
if (!m_maxHopperSize.isLoaded())
@@ -615,31 +516,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerHarvesterInstallationObjectTemplate::getMaxHopperSizeMin
int ServerHarvesterInstallationObjectTemplate::getMaxHopperSizeMax(bool testData) const
int ServerHarvesterInstallationObjectTemplate::getMaxHopperSizeMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerHarvesterInstallationObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxHopperSizeMax(true);
#endif
}
if (!m_maxHopperSize.isLoaded())
@@ -679,31 +567,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerHarvesterInstallationObjectTemplate::getMaxHopperSizeMax
const std::string & ServerHarvesterInstallationObjectTemplate::getMasterClassName(bool testData) const
const std::string & ServerHarvesterInstallationObjectTemplate::getMasterClassName() const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerHarvesterInstallationObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMasterClassName(true);
#endif
}
if (!m_masterClassName.isLoaded())
@@ -721,31 +596,10 @@ UNREF(testData);
}
const std::string & value = m_masterClassName.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerHarvesterInstallationObjectTemplate::getMasterClassName
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerHarvesterInstallationObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getMaxExtractionRateMin(true));
IGNORE_RETURN(getMaxExtractionRateMax(true));
IGNORE_RETURN(getCurrentExtractionRateMin(true));
IGNORE_RETURN(getCurrentExtractionRateMax(true));
IGNORE_RETURN(getMaxHopperSizeMin(true));
IGNORE_RETURN(getMaxHopperSizeMax(true));
IGNORE_RETURN(getMasterClassName(true));
ServerInstallationObjectTemplate::testValues();
} // ServerHarvesterInstallationObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -788,8 +642,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -44,22 +44,17 @@ public:
//@BEGIN TFD
public:
int getMaxExtractionRate(bool testData = false) const;
int getMaxExtractionRateMin(bool testData = false) const;
int getMaxExtractionRateMax(bool testData = false) const;
int getCurrentExtractionRate(bool testData = false) const;
int getCurrentExtractionRateMin(bool testData = false) const;
int getCurrentExtractionRateMax(bool testData = false) const;
int getMaxHopperSize(bool testData = false) const;
int getMaxHopperSizeMin(bool testData = false) const;
int getMaxHopperSizeMax(bool testData = false) const;
const std::string & getMasterClassName(bool testData = false) const;
int getMaxExtractionRate() const;
int getMaxExtractionRateMin() const;
int getMaxExtractionRateMax() const;
int getCurrentExtractionRate() const;
int getCurrentExtractionRateMin() const;
int getCurrentExtractionRateMax() const;
int getMaxHopperSize() const;
int getMaxHopperSizeMin() const;
int getMaxHopperSizeMax() const;
const std::string & getMasterClassName() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -113,15 +113,6 @@ Object * ServerInstallationObjectTemplate::createObject(void) const
} // ServerInstallationObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerInstallationObjectTemplate::testValues(void) const
{
ServerTangibleObjectTemplate::testValues();
} // ServerInstallationObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -164,8 +155,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,1))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,22 +112,14 @@ Object * ServerIntangibleObjectTemplate::createObject(void) const
} // ServerIntangibleObjectTemplate::createObject
//@BEGIN TFD
int ServerIntangibleObjectTemplate::getCount(bool testData) const
int ServerIntangibleObjectTemplate::getCount() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCount(true);
#endif
}
if (!m_count.isLoaded())
@@ -167,31 +159,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::getCount
int ServerIntangibleObjectTemplate::getCountMin(bool testData) const
int ServerIntangibleObjectTemplate::getCountMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCountMin(true);
#endif
}
if (!m_count.isLoaded())
@@ -231,31 +210,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::getCountMin
int ServerIntangibleObjectTemplate::getCountMax(bool testData) const
int ServerIntangibleObjectTemplate::getCountMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCountMax(true);
#endif
}
if (!m_count.isLoaded())
@@ -295,26 +261,10 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::getCountMax
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerIntangibleObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getCountMin(true));
IGNORE_RETURN(getCountMax(true));
ServerObjectTemplate::testValues();
} // ServerIntangibleObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -357,8 +307,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,1))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -440,22 +390,14 @@ Tag ServerIntangibleObjectTemplate::_Ingredient::getId(void) const
return _Ingredient_tag;
} // ServerIntangibleObjectTemplate::_Ingredient::getId
ServerIntangibleObjectTemplate::IngredientType ServerIntangibleObjectTemplate::_Ingredient::getIngredientType(bool versionOk, bool testData) const
ServerIntangibleObjectTemplate::IngredientType ServerIntangibleObjectTemplate::_Ingredient::getIngredientType(bool versionOk) const
{
#ifdef _DEBUG
ServerIntangibleObjectTemplate::IngredientType testDataValue = static_cast<ServerIntangibleObjectTemplate::IngredientType>(0);
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_Ingredient * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_Ingredient *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getIngredientType(true);
#endif
}
if (!m_ingredientType.isLoaded())
@@ -473,11 +415,6 @@ UNREF(testData);
}
IngredientType value = static_cast<IngredientType>(m_ingredientType.getValue());
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_Ingredient::getIngredientType
@@ -638,22 +575,14 @@ size_t ServerIntangibleObjectTemplate::_Ingredient::getIngredientsCount(void) co
return count;
} // ServerIntangibleObjectTemplate::_Ingredient::getIngredientsCount
float ServerIntangibleObjectTemplate::_Ingredient::getComplexity(bool versionOk, bool testData) const
float ServerIntangibleObjectTemplate::_Ingredient::getComplexity(bool versionOk) const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_Ingredient * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_Ingredient *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getComplexity(true);
#endif
}
if (!m_complexity.isLoaded())
@@ -693,31 +622,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_Ingredient::getComplexity
float ServerIntangibleObjectTemplate::_Ingredient::getComplexityMin(bool versionOk, bool testData) const
float ServerIntangibleObjectTemplate::_Ingredient::getComplexityMin(bool versionOk) const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_Ingredient * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_Ingredient *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getComplexityMin(true);
#endif
}
if (!m_complexity.isLoaded())
@@ -757,31 +673,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_Ingredient::getComplexityMin
float ServerIntangibleObjectTemplate::_Ingredient::getComplexityMax(bool versionOk, bool testData) const
float ServerIntangibleObjectTemplate::_Ingredient::getComplexityMax(bool versionOk) const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_Ingredient * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_Ingredient *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getComplexityMax(true);
#endif
}
if (!m_complexity.isLoaded())
@@ -821,31 +724,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_Ingredient::getComplexityMax
const std::string & ServerIntangibleObjectTemplate::_Ingredient::getSkillCommand(bool versionOk, bool testData) const
const std::string & ServerIntangibleObjectTemplate::_Ingredient::getSkillCommand(bool versionOk) const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_Ingredient * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_Ingredient *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getSkillCommand(true);
#endif
}
if (!m_skillCommand.isLoaded())
@@ -863,27 +753,10 @@ UNREF(testData);
}
const std::string & value = m_skillCommand.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_Ingredient::getSkillCommand
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerIntangibleObjectTemplate::_Ingredient::testValues(void) const
{
IGNORE_RETURN(getIngredientType(true));
IGNORE_RETURN(getComplexityMin(true));
IGNORE_RETURN(getComplexityMax(true));
IGNORE_RETURN(getSkillCommand(true));
} // ServerIntangibleObjectTemplate::_Ingredient::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -984,22 +857,14 @@ Tag ServerIntangibleObjectTemplate::_SchematicAttribute::getId(void) const
return _SchematicAttribute_tag;
} // ServerIntangibleObjectTemplate::_SchematicAttribute::getId
const StringId ServerIntangibleObjectTemplate::_SchematicAttribute::getName(bool versionOk, bool testData) const
const StringId ServerIntangibleObjectTemplate::_SchematicAttribute::getName(bool versionOk) const
{
#ifdef _DEBUG
StringId testDataValue = DefaultStringId;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_SchematicAttribute * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_SchematicAttribute *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getName(true);
#endif
}
if (!m_name.isLoaded())
@@ -1017,31 +882,18 @@ UNREF(testData);
}
const StringId value = m_name.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_SchematicAttribute::getName
int ServerIntangibleObjectTemplate::_SchematicAttribute::getValue(bool versionOk, bool testData) const
int ServerIntangibleObjectTemplate::_SchematicAttribute::getValue(bool versionOk) const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_SchematicAttribute * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_SchematicAttribute *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getValue(true);
#endif
}
if (!m_value.isLoaded())
@@ -1081,31 +933,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_SchematicAttribute::getValue
int ServerIntangibleObjectTemplate::_SchematicAttribute::getValueMin(bool versionOk, bool testData) const
int ServerIntangibleObjectTemplate::_SchematicAttribute::getValueMin(bool versionOk) const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_SchematicAttribute * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_SchematicAttribute *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getValueMin(true);
#endif
}
if (!m_value.isLoaded())
@@ -1145,31 +984,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_SchematicAttribute::getValueMin
int ServerIntangibleObjectTemplate::_SchematicAttribute::getValueMax(bool versionOk, bool testData) const
int ServerIntangibleObjectTemplate::_SchematicAttribute::getValueMax(bool versionOk) const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_SchematicAttribute * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_SchematicAttribute *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getValueMax(true);
#endif
}
if (!m_value.isLoaded())
@@ -1209,26 +1035,10 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_SchematicAttribute::getValueMax
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerIntangibleObjectTemplate::_SchematicAttribute::testValues(void) const
{
IGNORE_RETURN(getName(true));
IGNORE_RETURN(getValueMin(true));
IGNORE_RETURN(getValueMax(true));
} // ServerIntangibleObjectTemplate::_SchematicAttribute::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -1308,22 +1118,14 @@ Tag ServerIntangibleObjectTemplate::_SimpleIngredient::getId(void) const
return _SimpleIngredient_tag;
} // ServerIntangibleObjectTemplate::_SimpleIngredient::getId
const StringId ServerIntangibleObjectTemplate::_SimpleIngredient::getName(bool versionOk, bool testData) const
const StringId ServerIntangibleObjectTemplate::_SimpleIngredient::getName(bool versionOk) const
{
#ifdef _DEBUG
StringId testDataValue = DefaultStringId;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_SimpleIngredient * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_SimpleIngredient *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getName(true);
#endif
}
if (!m_name.isLoaded())
@@ -1341,31 +1143,18 @@ UNREF(testData);
}
const StringId value = m_name.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_SimpleIngredient::getName
const std::string & ServerIntangibleObjectTemplate::_SimpleIngredient::getIngredient(bool versionOk, bool testData) const
const std::string & ServerIntangibleObjectTemplate::_SimpleIngredient::getIngredient(bool versionOk) const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_SimpleIngredient * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_SimpleIngredient *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getIngredient(true);
#endif
}
if (!m_ingredient.isLoaded())
@@ -1383,31 +1172,18 @@ UNREF(testData);
}
const std::string & value = m_ingredient.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_SimpleIngredient::getIngredient
int ServerIntangibleObjectTemplate::_SimpleIngredient::getCount(bool versionOk, bool testData) const
int ServerIntangibleObjectTemplate::_SimpleIngredient::getCount(bool versionOk) const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_SimpleIngredient * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_SimpleIngredient *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCount(true);
#endif
}
if (!m_count.isLoaded())
@@ -1447,31 +1223,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_SimpleIngredient::getCount
int ServerIntangibleObjectTemplate::_SimpleIngredient::getCountMin(bool versionOk, bool testData) const
int ServerIntangibleObjectTemplate::_SimpleIngredient::getCountMin(bool versionOk) const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_SimpleIngredient * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_SimpleIngredient *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCountMin(true);
#endif
}
if (!m_count.isLoaded())
@@ -1511,31 +1274,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_SimpleIngredient::getCountMin
int ServerIntangibleObjectTemplate::_SimpleIngredient::getCountMax(bool versionOk, bool testData) const
int ServerIntangibleObjectTemplate::_SimpleIngredient::getCountMax(bool versionOk) const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerIntangibleObjectTemplate::_SimpleIngredient * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerIntangibleObjectTemplate::_SimpleIngredient *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCountMax(true);
#endif
}
if (!m_count.isLoaded())
@@ -1575,27 +1325,10 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerIntangibleObjectTemplate::_SimpleIngredient::getCountMax
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerIntangibleObjectTemplate::_SimpleIngredient::testValues(void) const
{
IGNORE_RETURN(getName(true));
IGNORE_RETURN(getIngredient(true));
IGNORE_RETURN(getCountMin(true));
IGNORE_RETURN(getCountMax(true));
} // ServerIntangibleObjectTemplate::_SimpleIngredient::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -96,17 +96,12 @@ protected:
virtual Tag getId(void) const;
public:
const StringId getName(bool versionOk, bool testData = false) const;
const std::string & getIngredient(bool versionOk, bool testData = false) const;
int getCount(bool versionOk, bool testData = false) const;
int getCountMin(bool versionOk, bool testData = false) const;
int getCountMax(bool versionOk, bool testData = false) const;
const StringId getName(bool versionOk) const;
const std::string & getIngredient(bool versionOk) const;
int getCount(bool versionOk) const;
int getCountMin(bool versionOk) const;
int getCountMax(bool versionOk) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -140,21 +135,16 @@ private:
virtual Tag getId(void) const;
public:
IngredientType getIngredientType(bool versionOk, bool testData = false) const;
IngredientType getIngredientType(bool versionOk) const;
void getIngredients(SimpleIngredient &data, int index, bool versionOk) const;
void getIngredientsMin(SimpleIngredient &data, int index, bool versionOk) const;
void getIngredientsMax(SimpleIngredient &data, int index, bool versionOk) const;
size_t getIngredientsCount(void) const;
float getComplexity(bool versionOk, bool testData = false) const;
float getComplexityMin(bool versionOk, bool testData = false) const;
float getComplexityMax(bool versionOk, bool testData = false) const;
const std::string & getSkillCommand(bool versionOk, bool testData = false) const;
float getComplexity(bool versionOk) const;
float getComplexityMin(bool versionOk) const;
float getComplexityMax(bool versionOk) const;
const std::string & getSkillCommand(bool versionOk) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -191,16 +181,11 @@ private:
virtual Tag getId(void) const;
public:
const StringId getName(bool versionOk, bool testData = false) const;
int getValue(bool versionOk, bool testData = false) const;
int getValueMin(bool versionOk, bool testData = false) const;
int getValueMax(bool versionOk, bool testData = false) const;
const StringId getName(bool versionOk) const;
int getValue(bool versionOk) const;
int getValueMin(bool versionOk) const;
int getValueMax(bool versionOk) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -218,15 +203,10 @@ private:
friend class ServerIntangibleObjectTemplate::_SchematicAttribute;
public:
int getCount(bool testData = false) const;
int getCountMin(bool testData = false) const;
int getCountMax(bool testData = false) const;
int getCount() const;
int getCountMin() const;
int getCountMax() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,15 +112,6 @@ Object * ServerManufactureInstallationObjectTemplate::createObject(void) const
} // ServerManufactureInstallationObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerManufactureInstallationObjectTemplate::testValues(void) const
{
ServerInstallationObjectTemplate::testValues();
} // ServerManufactureInstallationObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -163,8 +154,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -170,22 +170,14 @@ Object * ServerManufactureSchematicObjectTemplate::createObject(const DraftSchem
} // ServerManufactureSchematicObjectTemplate::createObject
//@BEGIN TFD
const std::string & ServerManufactureSchematicObjectTemplate::getDraftSchematic(bool testData) const
const std::string & ServerManufactureSchematicObjectTemplate::getDraftSchematic() const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerManufactureSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerManufactureSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getDraftSchematic(true);
#endif
}
if (!m_draftSchematic.isLoaded())
@@ -203,31 +195,18 @@ UNREF(testData);
}
const std::string & value = m_draftSchematic.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerManufactureSchematicObjectTemplate::getDraftSchematic
const std::string & ServerManufactureSchematicObjectTemplate::getCreator(bool testData) const
const std::string & ServerManufactureSchematicObjectTemplate::getCreator() const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerManufactureSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerManufactureSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCreator(true);
#endif
}
if (!m_creator.isLoaded())
@@ -245,11 +224,6 @@ UNREF(testData);
}
const std::string & value = m_creator.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerManufactureSchematicObjectTemplate::getCreator
@@ -407,22 +381,14 @@ size_t ServerManufactureSchematicObjectTemplate::getIngredientsCount(void) const
return count;
} // ServerManufactureSchematicObjectTemplate::getIngredientsCount
int ServerManufactureSchematicObjectTemplate::getItemCount(bool testData) const
int ServerManufactureSchematicObjectTemplate::getItemCount() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerManufactureSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerManufactureSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getItemCount(true);
#endif
}
if (!m_itemCount.isLoaded())
@@ -462,31 +428,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerManufactureSchematicObjectTemplate::getItemCount
int ServerManufactureSchematicObjectTemplate::getItemCountMin(bool testData) const
int ServerManufactureSchematicObjectTemplate::getItemCountMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerManufactureSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerManufactureSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getItemCountMin(true);
#endif
}
if (!m_itemCount.isLoaded())
@@ -526,31 +479,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerManufactureSchematicObjectTemplate::getItemCountMin
int ServerManufactureSchematicObjectTemplate::getItemCountMax(bool testData) const
int ServerManufactureSchematicObjectTemplate::getItemCountMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerManufactureSchematicObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerManufactureSchematicObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getItemCountMax(true);
#endif
}
if (!m_itemCount.isLoaded())
@@ -590,11 +530,6 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerManufactureSchematicObjectTemplate::getItemCountMax
@@ -752,19 +687,6 @@ size_t ServerManufactureSchematicObjectTemplate::getAttributesCount(void) const
return count;
} // ServerManufactureSchematicObjectTemplate::getAttributesCount
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerManufactureSchematicObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getDraftSchematic(true));
IGNORE_RETURN(getCreator(true));
IGNORE_RETURN(getItemCountMin(true));
IGNORE_RETURN(getItemCountMax(true));
ServerIntangibleObjectTemplate::testValues();
} // ServerManufactureSchematicObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -807,8 +729,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -921,22 +843,14 @@ Tag ServerManufactureSchematicObjectTemplate::_IngredientSlot::getId(void) const
return _IngredientSlot_tag;
} // ServerManufactureSchematicObjectTemplate::_IngredientSlot::getId
const StringId ServerManufactureSchematicObjectTemplate::_IngredientSlot::getName(bool versionOk, bool testData) const
const StringId ServerManufactureSchematicObjectTemplate::_IngredientSlot::getName(bool versionOk) const
{
#ifdef _DEBUG
StringId testDataValue = DefaultStringId;
#else
UNREF(testData);
#endif
const ServerManufactureSchematicObjectTemplate::_IngredientSlot * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerManufactureSchematicObjectTemplate::_IngredientSlot *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getName(true);
#endif
}
if (!m_name.isLoaded())
@@ -954,11 +868,6 @@ UNREF(testData);
}
const StringId value = m_name.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerManufactureSchematicObjectTemplate::_IngredientSlot::getName
@@ -1080,15 +989,6 @@ void ServerManufactureSchematicObjectTemplate::_IngredientSlot::getIngredientMax
data.skillCommand = param->getSkillCommand(versionOk);
} // ServerManufactureSchematicObjectTemplate::_IngredientSlot::getIngredientMax
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerManufactureSchematicObjectTemplate::_IngredientSlot::testValues(void) const
{
IGNORE_RETURN(getName(true));
} // ServerManufactureSchematicObjectTemplate::_IngredientSlot::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -68,16 +68,11 @@ protected:
virtual Tag getId(void) const;
public:
const StringId getName(bool versionOk, bool testData = false) const;
const StringId getName(bool versionOk) const;
void getIngredient(Ingredient &data, bool versionOk) const;
void getIngredientMin(Ingredient &data, bool versionOk) const;
void getIngredientMax(Ingredient &data, bool versionOk) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -95,25 +90,20 @@ private:
friend class ServerManufactureSchematicObjectTemplate::_IngredientSlot;
public:
const std::string & getDraftSchematic(bool testData = false) const;
const std::string & getCreator(bool testData = false) const;
const std::string & getDraftSchematic() const;
const std::string & getCreator() const;
void getIngredients(IngredientSlot &data, int index) const;
void getIngredientsMin(IngredientSlot &data, int index) const;
void getIngredientsMax(IngredientSlot &data, int index) const;
size_t getIngredientsCount(void) const;
int getItemCount(bool testData = false) const;
int getItemCountMin(bool testData = false) const;
int getItemCountMax(bool testData = false) const;
int getItemCount() const;
int getItemCountMin() const;
int getItemCountMax() const;
void getAttributes(SchematicAttribute &data, int index) const;
void getAttributesMin(SchematicAttribute &data, int index) const;
void getAttributesMax(SchematicAttribute &data, int index) const;
size_t getAttributesCount(void) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,15 +112,6 @@ Object * ServerMissionObjectTemplate::createObject(void) const
} // ServerMissionObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerMissionObjectTemplate::testValues(void) const
{
ServerIntangibleObjectTemplate::testValues();
} // ServerMissionObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -163,8 +154,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
File diff suppressed because it is too large Load Diff
@@ -317,25 +317,20 @@ protected:
virtual Tag getId(void) const;
public:
Attributes getTarget(bool versionOk, bool testData = false) const;
int getValue(bool versionOk, bool testData = false) const;
int getValueMin(bool versionOk, bool testData = false) const;
int getValueMax(bool versionOk, bool testData = false) const;
float getTime(bool versionOk, bool testData = false) const;
float getTimeMin(bool versionOk, bool testData = false) const;
float getTimeMax(bool versionOk, bool testData = false) const;
float getTimeAtValue(bool versionOk, bool testData = false) const;
float getTimeAtValueMin(bool versionOk, bool testData = false) const;
float getTimeAtValueMax(bool versionOk, bool testData = false) const;
float getDecay(bool versionOk, bool testData = false) const;
float getDecayMin(bool versionOk, bool testData = false) const;
float getDecayMax(bool versionOk, bool testData = false) const;
Attributes getTarget(bool versionOk) const;
int getValue(bool versionOk) const;
int getValueMin(bool versionOk) const;
int getValueMax(bool versionOk) const;
float getTime(bool versionOk) const;
float getTimeMin(bool versionOk) const;
float getTimeMax(bool versionOk) const;
float getTimeAtValue(bool versionOk) const;
float getTimeAtValueMin(bool versionOk) const;
float getTimeAtValueMax(bool versionOk) const;
float getDecay(bool versionOk) const;
float getDecayMin(bool versionOk) const;
float getDecayMax(bool versionOk) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -371,25 +366,20 @@ private:
virtual Tag getId(void) const;
public:
MentalStates getTarget(bool versionOk, bool testData = false) const;
float getValue(bool versionOk, bool testData = false) const;
float getValueMin(bool versionOk, bool testData = false) const;
float getValueMax(bool versionOk, bool testData = false) const;
float getTime(bool versionOk, bool testData = false) const;
float getTimeMin(bool versionOk, bool testData = false) const;
float getTimeMax(bool versionOk, bool testData = false) const;
float getTimeAtValue(bool versionOk, bool testData = false) const;
float getTimeAtValueMin(bool versionOk, bool testData = false) const;
float getTimeAtValueMax(bool versionOk, bool testData = false) const;
float getDecay(bool versionOk, bool testData = false) const;
float getDecayMin(bool versionOk, bool testData = false) const;
float getDecayMax(bool versionOk, bool testData = false) const;
MentalStates getTarget(bool versionOk) const;
float getValue(bool versionOk) const;
float getValueMin(bool versionOk) const;
float getValueMax(bool versionOk) const;
float getTime(bool versionOk) const;
float getTimeMin(bool versionOk) const;
float getTimeMax(bool versionOk) const;
float getTimeAtValue(bool versionOk) const;
float getTimeAtValueMin(bool versionOk) const;
float getTimeAtValueMax(bool versionOk) const;
float getDecay(bool versionOk) const;
float getDecayMin(bool versionOk) const;
float getDecayMax(bool versionOk) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -425,15 +415,10 @@ private:
virtual Tag getId(void) const;
public:
const std::string & getSlotName(bool versionOk, bool testData = false) const;
bool getEquipObject(bool versionOk, bool testData = false) const;
const std::string & getSlotName(bool versionOk) const;
bool getEquipObject(bool versionOk) const;
const ServerObjectTemplate * getContent(bool versionOk) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -467,19 +452,14 @@ private:
virtual Tag getId(void) const;
public:
XpTypes getType(bool versionOk, bool testData = false) const;
int getLevel(bool versionOk, bool testData = false) const;
int getLevelMin(bool versionOk, bool testData = false) const;
int getLevelMax(bool versionOk, bool testData = false) const;
int getValue(bool versionOk, bool testData = false) const;
int getValueMin(bool versionOk, bool testData = false) const;
int getValueMax(bool versionOk, bool testData = false) const;
XpTypes getType(bool versionOk) const;
int getLevel(bool versionOk) const;
int getLevelMin(bool versionOk) const;
int getLevelMax(bool versionOk) const;
int getValue(bool versionOk) const;
int getValueMin(bool versionOk) const;
int getValueMax(bool versionOk) const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -498,26 +478,26 @@ private:
friend class ServerObjectTemplate::_Xp;
public:
const std::string & getSharedTemplate(bool testData = false) const;
const std::string & getSharedTemplate() const;
const std::string & getScripts(int index) const;
size_t getScriptsCount(void) const;
void getObjvars(DynamicVariableList &list) const;
int getVolume(bool testData = false) const;
int getVolumeMin(bool testData = false) const;
int getVolumeMax(bool testData = false) const;
int getVolume() const;
int getVolumeMin() const;
int getVolumeMax() const;
VisibleFlags getVisibleFlags(int index) const;
size_t getVisibleFlagsCount(void) const;
DeleteFlags getDeleteFlags(int index) const;
size_t getDeleteFlagsCount(void) const;
MoveFlags getMoveFlags(int index) const;
size_t getMoveFlagsCount(void) const;
bool getInvulnerable(bool testData = false) const;
float getComplexity(bool testData = false) const;
float getComplexityMin(bool testData = false) const;
float getComplexityMax(bool testData = false) const;
int getTintIndex(bool testData = false) const;
int getTintIndexMin(bool testData = false) const;
int getTintIndexMax(bool testData = false) const;
bool getInvulnerable() const;
float getComplexity() const;
float getComplexityMin() const;
float getComplexityMax() const;
int getTintIndex() const;
int getTintIndexMin() const;
int getTintIndexMax() const;
float getUpdateRanges(UpdateRanges index) const;
float getUpdateRangesMin(UpdateRanges index) const;
float getUpdateRangesMax(UpdateRanges index) const;
@@ -529,14 +509,9 @@ public:
void getXpPointsMin(Xp &data, int index) const;
void getXpPointsMax(Xp &data, int index) const;
size_t getXpPointsCount(void) const;
bool getPersistByDefault(bool testData = false) const;
bool getPersistContents(bool testData = false) const;
bool getPersistByDefault() const;
bool getPersistContents() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,22 +112,14 @@ Object * ServerPlanetObjectTemplate::createObject(void) const
} // ServerPlanetObjectTemplate::createObject
//@BEGIN TFD
const std::string & ServerPlanetObjectTemplate::getPlanetName(bool testData) const
const std::string & ServerPlanetObjectTemplate::getPlanetName() const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerPlanetObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerPlanetObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getPlanetName(true);
#endif
}
if (!m_planetName.isLoaded())
@@ -145,25 +137,10 @@ UNREF(testData);
}
const std::string & value = m_planetName.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerPlanetObjectTemplate::getPlanetName
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerPlanetObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getPlanetName(true));
ServerUniverseObjectTemplate::testValues();
} // ServerPlanetObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -206,8 +183,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -44,13 +44,8 @@ public:
//@BEGIN TFD
public:
const std::string & getPlanetName(bool testData = false) const;
const std::string & getPlanetName() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -12,7 +12,7 @@
#include "serverGame/FirstServerGame.h"
#include "ServerPlayerObjectTemplate.h"
#include "sharedDebug/DataLint.h"
#include "sharedFile/Iff.h"
#include "sharedObject/ObjectTemplate.h"
#include "sharedObject/ObjectTemplateList.h"
@@ -114,15 +114,6 @@ Object * ServerPlayerObjectTemplate::createObject(void) const
} // ServerPlayerObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerPlayerObjectTemplate::testValues(void) const
{
ServerIntangibleObjectTemplate::testValues();
} // ServerPlayerObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -165,8 +156,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -48,11 +48,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -13,7 +13,7 @@
#include "serverGame/FirstServerGame.h"
#include "serverGame/PlayerQuestObject.h"
#include "ServerPlayerQuestObjectTemplate.h"
#include "sharedDebug/DataLint.h"
#include "sharedFile/Iff.h"
#include "sharedMath/Vector.h"
#include "sharedObject/ObjectTemplate.h"
@@ -115,15 +115,6 @@ Object * ServerPlayerQuestObjectTemplate::createObject(void) const
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerPlayerQuestObjectTemplate::testValues(void) const
{
ServerTangibleObjectTemplate::testValues();
} // ServerPlayerQuestObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -166,8 +157,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,22 +112,14 @@ Object * ServerResourceContainerObjectTemplate::createObject(void) const
} // ServerResourceContainerObjectTemplate::createObject
//@BEGIN TFD
int ServerResourceContainerObjectTemplate::getMaxResources(bool testData) const
int ServerResourceContainerObjectTemplate::getMaxResources() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerResourceContainerObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerResourceContainerObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxResources(true);
#endif
}
if (!m_maxResources.isLoaded())
@@ -167,31 +159,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerResourceContainerObjectTemplate::getMaxResources
int ServerResourceContainerObjectTemplate::getMaxResourcesMin(bool testData) const
int ServerResourceContainerObjectTemplate::getMaxResourcesMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerResourceContainerObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerResourceContainerObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxResourcesMin(true);
#endif
}
if (!m_maxResources.isLoaded())
@@ -231,31 +210,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerResourceContainerObjectTemplate::getMaxResourcesMin
int ServerResourceContainerObjectTemplate::getMaxResourcesMax(bool testData) const
int ServerResourceContainerObjectTemplate::getMaxResourcesMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerResourceContainerObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerResourceContainerObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxResourcesMax(true);
#endif
}
if (!m_maxResources.isLoaded())
@@ -295,26 +261,10 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerResourceContainerObjectTemplate::getMaxResourcesMax
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerResourceContainerObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getMaxResourcesMin(true));
IGNORE_RETURN(getMaxResourcesMax(true));
ServerTangibleObjectTemplate::testValues();
} // ServerResourceContainerObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -357,8 +307,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -44,15 +44,10 @@ public:
//@BEGIN TFD
public:
int getMaxResources(bool testData = false) const;
int getMaxResourcesMin(bool testData = false) const;
int getMaxResourcesMax(bool testData = false) const;
int getMaxResources() const;
int getMaxResourcesMin() const;
int getMaxResourcesMax() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -13,7 +13,7 @@
#include "serverGame/FirstServerGame.h"
#include "ServerShipObjectTemplate.h"
#include "serverGame/ShipObject.h"
#include "sharedDebug/DataLint.h"
#include "sharedFile/Iff.h"
#include "sharedObject/ObjectTemplate.h"
#include "sharedObject/ObjectTemplateList.h"
@@ -113,22 +113,14 @@ Object * ServerShipObjectTemplate::createObject(void) const
} // ServerShipObjectTemplate::createObject
//@BEGIN TFD
const std::string & ServerShipObjectTemplate::getShipType(bool testData) const
const std::string & ServerShipObjectTemplate::getShipType() const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerShipObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerShipObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getShipType(true);
#endif
}
if (!m_shipType.isLoaded())
@@ -146,25 +138,10 @@ UNREF(testData);
}
const std::string & value = m_shipType.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerShipObjectTemplate::getShipType
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerShipObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getShipType(true));
ServerTangibleObjectTemplate::testValues();
} // ServerShipObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -207,8 +184,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,1))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -44,13 +44,8 @@ public:
//@BEGIN TFD
public:
const std::string & getShipType(bool testData = false) const;
const std::string & getShipType() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,22 +112,14 @@ Object * ServerStaticObjectTemplate::createObject(void) const
} // ServerStaticObjectTemplate::createObject
//@BEGIN TFD
bool ServerStaticObjectTemplate::getClientOnlyBuildout(bool testData) const
bool ServerStaticObjectTemplate::getClientOnlyBuildout() const
{
#ifdef _DEBUG
bool testDataValue = false;
#else
UNREF(testData);
#endif
const ServerStaticObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerStaticObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getClientOnlyBuildout(true);
#endif
}
if (!m_clientOnlyBuildout.isLoaded())
@@ -145,25 +137,10 @@ UNREF(testData);
}
bool value = m_clientOnlyBuildout.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerStaticObjectTemplate::getClientOnlyBuildout
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerStaticObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getClientOnlyBuildout(true));
ServerObjectTemplate::testValues();
} // ServerStaticObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -206,8 +183,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,1))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -44,13 +44,8 @@ public:
//@BEGIN TFD
public:
bool getClientOnlyBuildout(bool testData = false) const;
bool getClientOnlyBuildout() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -184,22 +184,14 @@ size_t ServerTangibleObjectTemplate::getTriggerVolumesCount(void) const
return count;
} // ServerTangibleObjectTemplate::getTriggerVolumesCount
ServerTangibleObjectTemplate::CombatSkeleton ServerTangibleObjectTemplate::getCombatSkeleton(bool testData) const
ServerTangibleObjectTemplate::CombatSkeleton ServerTangibleObjectTemplate::getCombatSkeleton() const
{
#ifdef _DEBUG
ServerTangibleObjectTemplate::CombatSkeleton testDataValue = static_cast<ServerTangibleObjectTemplate::CombatSkeleton>(0);
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCombatSkeleton(true);
#endif
}
if (!m_combatSkeleton.isLoaded())
@@ -217,31 +209,18 @@ UNREF(testData);
}
CombatSkeleton value = static_cast<CombatSkeleton>(m_combatSkeleton.getValue());
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getCombatSkeleton
int ServerTangibleObjectTemplate::getMaxHitPoints(bool testData) const
int ServerTangibleObjectTemplate::getMaxHitPoints() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxHitPoints(true);
#endif
}
if (!m_maxHitPoints.isLoaded())
@@ -281,31 +260,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getMaxHitPoints
int ServerTangibleObjectTemplate::getMaxHitPointsMin(bool testData) const
int ServerTangibleObjectTemplate::getMaxHitPointsMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxHitPointsMin(true);
#endif
}
if (!m_maxHitPoints.isLoaded())
@@ -345,31 +311,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getMaxHitPointsMin
int ServerTangibleObjectTemplate::getMaxHitPointsMax(bool testData) const
int ServerTangibleObjectTemplate::getMaxHitPointsMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxHitPointsMax(true);
#endif
}
if (!m_maxHitPoints.isLoaded())
@@ -409,11 +362,6 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getMaxHitPointsMax
@@ -451,22 +399,14 @@ const ServerArmorTemplate * ServerTangibleObjectTemplate::getArmor() const
return returnValue;
} // ServerTangibleObjectTemplate::getArmor
int ServerTangibleObjectTemplate::getInterestRadius(bool testData) const
int ServerTangibleObjectTemplate::getInterestRadius() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getInterestRadius(true);
#endif
}
if (!m_interestRadius.isLoaded())
@@ -506,31 +446,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getInterestRadius
int ServerTangibleObjectTemplate::getInterestRadiusMin(bool testData) const
int ServerTangibleObjectTemplate::getInterestRadiusMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getInterestRadiusMin(true);
#endif
}
if (!m_interestRadius.isLoaded())
@@ -570,31 +497,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getInterestRadiusMin
int ServerTangibleObjectTemplate::getInterestRadiusMax(bool testData) const
int ServerTangibleObjectTemplate::getInterestRadiusMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getInterestRadiusMax(true);
#endif
}
if (!m_interestRadius.isLoaded())
@@ -634,31 +548,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getInterestRadiusMax
int ServerTangibleObjectTemplate::getCount(bool testData) const
int ServerTangibleObjectTemplate::getCount() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCount(true);
#endif
}
if (!m_count.isLoaded())
@@ -698,31 +599,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getCount
int ServerTangibleObjectTemplate::getCountMin(bool testData) const
int ServerTangibleObjectTemplate::getCountMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCountMin(true);
#endif
}
if (!m_count.isLoaded())
@@ -762,31 +650,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getCountMin
int ServerTangibleObjectTemplate::getCountMax(bool testData) const
int ServerTangibleObjectTemplate::getCountMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCountMax(true);
#endif
}
if (!m_count.isLoaded())
@@ -826,31 +701,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getCountMax
int ServerTangibleObjectTemplate::getCondition(bool testData) const
int ServerTangibleObjectTemplate::getCondition() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCondition(true);
#endif
}
if (!m_condition.isLoaded())
@@ -890,31 +752,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getCondition
int ServerTangibleObjectTemplate::getConditionMin(bool testData) const
int ServerTangibleObjectTemplate::getConditionMin() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getConditionMin(true);
#endif
}
if (!m_condition.isLoaded())
@@ -954,31 +803,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getConditionMin
int ServerTangibleObjectTemplate::getConditionMax(bool testData) const
int ServerTangibleObjectTemplate::getConditionMax() const
{
#ifdef _DEBUG
int testDataValue = 0;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getConditionMax(true);
#endif
}
if (!m_condition.isLoaded())
@@ -1018,31 +854,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<int>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getConditionMax
bool ServerTangibleObjectTemplate::getWantSawAttackTriggers(bool testData) const
bool ServerTangibleObjectTemplate::getWantSawAttackTriggers() const
{
#ifdef _DEBUG
bool testDataValue = false;
#else
UNREF(testData);
#endif
const ServerTangibleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getWantSawAttackTriggers(true);
#endif
}
if (!m_wantSawAttackTriggers.isLoaded())
@@ -1060,34 +883,10 @@ UNREF(testData);
}
bool value = m_wantSawAttackTriggers.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerTangibleObjectTemplate::getWantSawAttackTriggers
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerTangibleObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getCombatSkeleton(true));
IGNORE_RETURN(getMaxHitPointsMin(true));
IGNORE_RETURN(getMaxHitPointsMax(true));
IGNORE_RETURN(getInterestRadiusMin(true));
IGNORE_RETURN(getInterestRadiusMax(true));
IGNORE_RETURN(getCountMin(true));
IGNORE_RETURN(getCountMax(true));
IGNORE_RETURN(getConditionMin(true));
IGNORE_RETURN(getConditionMax(true));
IGNORE_RETURN(getWantSawAttackTriggers(true));
ServerObjectTemplate::testValues();
} // ServerTangibleObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -1130,8 +929,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,4))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -86,27 +86,22 @@ public:
public:
const TriggerVolumeData getTriggerVolumes(int index) const;
size_t getTriggerVolumesCount(void) const;
CombatSkeleton getCombatSkeleton(bool testData = false) const;
int getMaxHitPoints(bool testData = false) const;
int getMaxHitPointsMin(bool testData = false) const;
int getMaxHitPointsMax(bool testData = false) const;
CombatSkeleton getCombatSkeleton() const;
int getMaxHitPoints() const;
int getMaxHitPointsMin() const;
int getMaxHitPointsMax() const;
const ServerArmorTemplate * getArmor() const;
int getInterestRadius(bool testData = false) const;
int getInterestRadiusMin(bool testData = false) const;
int getInterestRadiusMax(bool testData = false) const;
int getCount(bool testData = false) const;
int getCountMin(bool testData = false) const;
int getCountMax(bool testData = false) const;
int getCondition(bool testData = false) const;
int getConditionMin(bool testData = false) const;
int getConditionMax(bool testData = false) const;
bool getWantSawAttackTriggers(bool testData = false) const;
int getInterestRadius() const;
int getInterestRadiusMin() const;
int getInterestRadiusMax() const;
int getCount() const;
int getCountMin() const;
int getCountMax() const;
int getCondition() const;
int getConditionMin() const;
int getConditionMax() const;
bool getWantSawAttackTriggers() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,15 +112,6 @@ Object * ServerUniverseObjectTemplate::createObject(void) const
} // ServerUniverseObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerUniverseObjectTemplate::testValues(void) const
{
ServerObjectTemplate::testValues();
} // ServerUniverseObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -163,8 +154,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -112,22 +112,14 @@ Object * ServerVehicleObjectTemplate::createObject(void) const
} // ServerVehicleObjectTemplate::createObject
//@BEGIN TFD
const std::string & ServerVehicleObjectTemplate::getFuelType(bool testData) const
const std::string & ServerVehicleObjectTemplate::getFuelType() const
{
#ifdef _DEBUG
std::string testDataValue = DefaultString;
#else
UNREF(testData);
#endif
const ServerVehicleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getFuelType(true);
#endif
}
if (!m_fuelType.isLoaded())
@@ -145,31 +137,18 @@ UNREF(testData);
}
const std::string & value = m_fuelType.getValue();
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerVehicleObjectTemplate::getFuelType
float ServerVehicleObjectTemplate::getCurrentFuel(bool testData) const
float ServerVehicleObjectTemplate::getCurrentFuel() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerVehicleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCurrentFuel(true);
#endif
}
if (!m_currentFuel.isLoaded())
@@ -209,31 +188,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerVehicleObjectTemplate::getCurrentFuel
float ServerVehicleObjectTemplate::getCurrentFuelMin(bool testData) const
float ServerVehicleObjectTemplate::getCurrentFuelMin() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerVehicleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCurrentFuelMin(true);
#endif
}
if (!m_currentFuel.isLoaded())
@@ -273,31 +239,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerVehicleObjectTemplate::getCurrentFuelMin
float ServerVehicleObjectTemplate::getCurrentFuelMax(bool testData) const
float ServerVehicleObjectTemplate::getCurrentFuelMax() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerVehicleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getCurrentFuelMax(true);
#endif
}
if (!m_currentFuel.isLoaded())
@@ -337,31 +290,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerVehicleObjectTemplate::getCurrentFuelMax
float ServerVehicleObjectTemplate::getMaxFuel(bool testData) const
float ServerVehicleObjectTemplate::getMaxFuel() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerVehicleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxFuel(true);
#endif
}
if (!m_maxFuel.isLoaded())
@@ -401,31 +341,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerVehicleObjectTemplate::getMaxFuel
float ServerVehicleObjectTemplate::getMaxFuelMin(bool testData) const
float ServerVehicleObjectTemplate::getMaxFuelMin() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerVehicleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxFuelMin(true);
#endif
}
if (!m_maxFuel.isLoaded())
@@ -465,31 +392,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerVehicleObjectTemplate::getMaxFuelMin
float ServerVehicleObjectTemplate::getMaxFuelMax(bool testData) const
float ServerVehicleObjectTemplate::getMaxFuelMax() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerVehicleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getMaxFuelMax(true);
#endif
}
if (!m_maxFuel.isLoaded())
@@ -529,31 +443,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerVehicleObjectTemplate::getMaxFuelMax
float ServerVehicleObjectTemplate::getConsumpsion(bool testData) const
float ServerVehicleObjectTemplate::getConsumpsion() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerVehicleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getConsumpsion(true);
#endif
}
if (!m_consumpsion.isLoaded())
@@ -593,31 +494,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerVehicleObjectTemplate::getConsumpsion
float ServerVehicleObjectTemplate::getConsumpsionMin(bool testData) const
float ServerVehicleObjectTemplate::getConsumpsionMin() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerVehicleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getConsumpsionMin(true);
#endif
}
if (!m_consumpsion.isLoaded())
@@ -657,31 +545,18 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerVehicleObjectTemplate::getConsumpsionMin
float ServerVehicleObjectTemplate::getConsumpsionMax(bool testData) const
float ServerVehicleObjectTemplate::getConsumpsionMax() const
{
#ifdef _DEBUG
float testDataValue = 0.0f;
#else
UNREF(testData);
#endif
const ServerVehicleObjectTemplate * base = nullptr;
if (m_baseData != nullptr)
{
base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
#ifdef _DEBUG
if (testData && base != nullptr)
testDataValue = base->getConsumpsionMax(true);
#endif
}
if (!m_consumpsion.isLoaded())
@@ -721,31 +596,10 @@ UNREF(testData);
else if (delta == '_')
value = baseValue - static_cast<float>(baseValue * (value / 100.0f));
}
#ifdef _DEBUG
if (testData && base != nullptr)
{
}
#endif
return value;
} // ServerVehicleObjectTemplate::getConsumpsionMax
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerVehicleObjectTemplate::testValues(void) const
{
IGNORE_RETURN(getFuelType(true));
IGNORE_RETURN(getCurrentFuelMin(true));
IGNORE_RETURN(getCurrentFuelMax(true));
IGNORE_RETURN(getMaxFuelMin(true));
IGNORE_RETURN(getMaxFuelMax(true));
IGNORE_RETURN(getConsumpsionMin(true));
IGNORE_RETURN(getConsumpsionMax(true));
ServerTangibleObjectTemplate::testValues();
} // ServerVehicleObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -788,8 +642,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -44,22 +44,17 @@ public:
//@BEGIN TFD
public:
const std::string & getFuelType(bool testData = false) const;
float getCurrentFuel(bool testData = false) const;
float getCurrentFuelMin(bool testData = false) const;
float getCurrentFuelMax(bool testData = false) const;
float getMaxFuel(bool testData = false) const;
float getMaxFuelMin(bool testData = false) const;
float getMaxFuelMax(bool testData = false) const;
float getConsumpsion(bool testData = false) const;
float getConsumpsionMin(bool testData = false) const;
float getConsumpsionMax(bool testData = false) const;
const std::string & getFuelType() const;
float getCurrentFuel() const;
float getCurrentFuelMin() const;
float getCurrentFuelMax() const;
float getMaxFuel() const;
float getMaxFuelMin() const;
float getMaxFuelMax() const;
float getConsumpsion() const;
float getConsumpsionMin() const;
float getConsumpsionMax() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -78,49 +78,44 @@ public:
};
public:
WeaponType getWeaponType(bool testData = false) const;
AttackType getAttackType(bool testData = false) const;
DamageType getDamageType(bool testData = false) const;
DamageType getElementalType(bool testData = false) const;
int getElementalValue(bool testData = false) const;
int getElementalValueMin(bool testData = false) const;
int getElementalValueMax(bool testData = false) const;
int getMinDamageAmount(bool testData = false) const;
int getMinDamageAmountMin(bool testData = false) const;
int getMinDamageAmountMax(bool testData = false) const;
int getMaxDamageAmount(bool testData = false) const;
int getMaxDamageAmountMin(bool testData = false) const;
int getMaxDamageAmountMax(bool testData = false) const;
float getAttackSpeed(bool testData = false) const;
float getAttackSpeedMin(bool testData = false) const;
float getAttackSpeedMax(bool testData = false) const;
float getAudibleRange(bool testData = false) const;
float getAudibleRangeMin(bool testData = false) const;
float getAudibleRangeMax(bool testData = false) const;
float getMinRange(bool testData = false) const;
float getMinRangeMin(bool testData = false) const;
float getMinRangeMax(bool testData = false) const;
float getMaxRange(bool testData = false) const;
float getMaxRangeMin(bool testData = false) const;
float getMaxRangeMax(bool testData = false) const;
float getDamageRadius(bool testData = false) const;
float getDamageRadiusMin(bool testData = false) const;
float getDamageRadiusMax(bool testData = false) const;
float getWoundChance(bool testData = false) const;
float getWoundChanceMin(bool testData = false) const;
float getWoundChanceMax(bool testData = false) const;
int getAttackCost(bool testData = false) const;
int getAttackCostMin(bool testData = false) const;
int getAttackCostMax(bool testData = false) const;
int getAccuracy(bool testData = false) const;
int getAccuracyMin(bool testData = false) const;
int getAccuracyMax(bool testData = false) const;
WeaponType getWeaponType() const;
AttackType getAttackType() const;
DamageType getDamageType() const;
DamageType getElementalType() const;
int getElementalValue() const;
int getElementalValueMin() const;
int getElementalValueMax() const;
int getMinDamageAmount() const;
int getMinDamageAmountMin() const;
int getMinDamageAmountMax() const;
int getMaxDamageAmount() const;
int getMaxDamageAmountMin() const;
int getMaxDamageAmountMax() const;
float getAttackSpeed() const;
float getAttackSpeedMin() const;
float getAttackSpeedMax() const;
float getAudibleRange() const;
float getAudibleRangeMin() const;
float getAudibleRangeMax() const;
float getMinRange() const;
float getMinRangeMin() const;
float getMinRangeMax() const;
float getMaxRange() const;
float getMaxRangeMin() const;
float getMaxRangeMax() const;
float getDamageRadius() const;
float getDamageRadiusMin() const;
float getDamageRadiusMax() const;
float getWoundChance() const;
float getWoundChanceMin() const;
float getWoundChanceMax() const;
int getAttackCost() const;
int getAttackCostMin() const;
int getAttackCostMax() const;
int getAccuracy() const;
int getAccuracyMin() const;
int getAccuracyMax() const;
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);
@@ -12,7 +12,7 @@
#include "serverGame/FirstServerGame.h"
#include "ServerXpManagerObjectTemplate.h"
#include "sharedDebug/DataLint.h"
#include "sharedFile/Iff.h"
#include "sharedObject/ObjectTemplate.h"
#include "sharedObject/ObjectTemplateList.h"
@@ -115,15 +115,6 @@ Object * ServerXpManagerObjectTemplate::createObject(void) const
} // ServerXpManagerObjectTemplate::createObject
//@BEGIN TFD
#ifdef _DEBUG
/**
* Special function used by datalint. Checks for duplicate values in base and derived templates.
*/
void ServerXpManagerObjectTemplate::testValues(void) const
{
ServerUniverseObjectTemplate::testValues();
} // ServerXpManagerObjectTemplate::testValues
#endif
/**
* Loads the template data from an iff file. We should already be in the form
@@ -166,8 +157,8 @@ char paramName[MAX_NAME_SIZE];
}
if (getHighestTemplateVersion() != TAG(0,0,0,0))
{
if (DataLint::isEnabled())
DEBUG_WARNING(true, ("template %s version out of date", file.getFileName()));
m_versionOk = false;
}
@@ -45,11 +45,6 @@ public:
//@BEGIN TFD
public:
#ifdef _DEBUG
public:
// special code used by datalint
virtual void testValues(void) const;
#endif
protected:
virtual void load(Iff &file);