1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-30 23:18:08 +02:00
vcmi/lib/CObjectConstructor.cpp
Ivan Savenko b5160acbac Finalization of object type handler interface
- updated code to use new interface
- removed old DefObjHandler (todo - rename file)

Summary:
- most code but loading is now in place
- type names may deserve improvements (some of them are too similar)
- still barely compiles and not tested
2014-05-16 23:50:02 +03:00

89 lines
1.6 KiB
C++

#include "StdInc.h"
#include "CObjectConstructor.h"
/*
* CObjectConstructor.cpp, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
void CRandomRewardObjectInfo::init(const JsonNode & objectConfig)
{
parameters = objectConfig;
}
void CRandomRewardObjectInfo::configureObject(CObjectWithReward * object) const
{
}
bool CRandomRewardObjectInfo::givesResources() const
{
}
bool CRandomRewardObjectInfo::givesExperience() const
{
}
bool CRandomRewardObjectInfo::givesMana() const
{
}
bool CRandomRewardObjectInfo::givesMovement() const
{
}
bool CRandomRewardObjectInfo::givesPrimarySkills() const
{
}
bool CRandomRewardObjectInfo::givesSecondarySkills() const
{
}
bool CRandomRewardObjectInfo::givesArtifacts() const
{
}
bool CRandomRewardObjectInfo::givesCreatures() const
{
}
bool CRandomRewardObjectInfo::givesSpells() const
{
}
bool CRandomRewardObjectInfo::givesBonuses() const
{
}
CObjectWithRewardConstructor::CObjectWithRewardConstructor()
{
}
void CObjectWithRewardConstructor::init(const JsonNode & config)
{
objectInfo.init(config);
}
CGObjectInstance * CObjectWithRewardConstructor::create(ObjectTemplate tmpl) const
{
auto ret = new CObjectWithReward();
ret->appearance = tmpl;
return ret;
}
void CObjectWithRewardConstructor::configureObject(CGObjectInstance * object) const
{
objectInfo.configureObject(dynamic_cast<CObjectWithReward*>(object));
}
const IObjectInfo * CObjectWithRewardConstructor::getObjectInfo(ObjectTemplate tmpl) const
{
return &objectInfo;
}