mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
Fix formatting
This commit is contained in:
@ -1348,11 +1348,6 @@ si32 CArtifactSet::getArtTypeId(ArtifactPosition pos) const
|
|||||||
return a->artType->id;
|
return a->artType->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
CArtifactSet::~CArtifactSet()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ArtSlotInfo & CArtifactSet::retreiveNewArtSlot(ArtifactPosition slot)
|
ArtSlotInfo & CArtifactSet::retreiveNewArtSlot(ArtifactPosition slot)
|
||||||
{
|
{
|
||||||
assert(!vstd::contains(artifactsWorn, slot));
|
assert(!vstd::contains(artifactsWorn, slot));
|
||||||
|
@ -324,7 +324,7 @@ public:
|
|||||||
si32 getArtTypeId(ArtifactPosition pos) const;
|
si32 getArtTypeId(ArtifactPosition pos) const;
|
||||||
|
|
||||||
virtual ArtBearer::ArtBearer bearerType() const = 0;
|
virtual ArtBearer::ArtBearer bearerType() const = 0;
|
||||||
virtual ~CArtifactSet();
|
virtual ~CArtifactSet() = default;
|
||||||
|
|
||||||
template <typename Handler> void serialize(Handler &h, const int version)
|
template <typename Handler> void serialize(Handler &h, const int version)
|
||||||
{
|
{
|
||||||
|
@ -30,6 +30,7 @@ public:
|
|||||||
CStackBasicDescriptor();
|
CStackBasicDescriptor();
|
||||||
CStackBasicDescriptor(CreatureID id, TQuantity Count);
|
CStackBasicDescriptor(CreatureID id, TQuantity Count);
|
||||||
CStackBasicDescriptor(const CCreature *c, TQuantity Count);
|
CStackBasicDescriptor(const CCreature *c, TQuantity Count);
|
||||||
|
virtual ~CStackBasicDescriptor() = default;
|
||||||
|
|
||||||
template <typename Handler> void serialize(Handler &h, const int version)
|
template <typename Handler> void serialize(Handler &h, const int version)
|
||||||
{
|
{
|
||||||
@ -84,7 +85,7 @@ public:
|
|||||||
CStackInstance();
|
CStackInstance();
|
||||||
CStackInstance(CreatureID id, TQuantity count);
|
CStackInstance(CreatureID id, TQuantity count);
|
||||||
CStackInstance(const CCreature *cre, TQuantity count);
|
CStackInstance(const CCreature *cre, TQuantity count);
|
||||||
~CStackInstance();
|
virtual ~CStackInstance();
|
||||||
|
|
||||||
void setType(CreatureID creID);
|
void setType(CreatureID creID);
|
||||||
void setType(const CCreature *c);
|
void setType(const CCreature *c);
|
||||||
@ -111,7 +112,7 @@ public:
|
|||||||
void init() override;
|
void init() override;
|
||||||
CCommanderInstance();
|
CCommanderInstance();
|
||||||
CCommanderInstance (CreatureID id);
|
CCommanderInstance (CreatureID id);
|
||||||
~CCommanderInstance();
|
virtual ~CCommanderInstance();
|
||||||
void setAlive (bool alive);
|
void setAlive (bool alive);
|
||||||
void giveStackExp (TExpType exp) override;
|
void giveStackExp (TExpType exp) override;
|
||||||
void levelUp ();
|
void levelUp ();
|
||||||
|
@ -298,7 +298,7 @@ bool CLegacyConfigParser::endLine()
|
|||||||
return curr < end;
|
return curr < end;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGeneralTextHandler::readToVector(std::string sourceName, std::vector<std::string> & dest)
|
void CGeneralTextHandler::readToVector(std::string sourceName, std::vector<std::string> &dest)
|
||||||
{
|
{
|
||||||
CLegacyConfigParser parser(sourceName);
|
CLegacyConfigParser parser(sourceName);
|
||||||
do
|
do
|
||||||
|
@ -111,7 +111,7 @@ public:
|
|||||||
std::vector<std::string> tavernInfo;
|
std::vector<std::string> tavernInfo;
|
||||||
std::vector<std::string> tavernRumors;
|
std::vector<std::string> tavernRumors;
|
||||||
|
|
||||||
std::vector<std::pair<std::string,std::string> > zelp;
|
std::vector<std::pair<std::string,std::string>> zelp;
|
||||||
std::vector<std::string> lossCondtions;
|
std::vector<std::string> lossCondtions;
|
||||||
std::vector<std::string> victoryConditions;
|
std::vector<std::string> victoryConditions;
|
||||||
|
|
||||||
@ -123,23 +123,26 @@ public:
|
|||||||
std::vector<std::string> restypes; //names of resources
|
std::vector<std::string> restypes; //names of resources
|
||||||
std::vector<std::string> terrainNames;
|
std::vector<std::string> terrainNames;
|
||||||
std::vector<std::string> randsign;
|
std::vector<std::string> randsign;
|
||||||
std::vector<std::pair<std::string,std::string> > mines; //first - name; second - event description
|
std::vector<std::pair<std::string,std::string>> mines; //first - name; second - event description
|
||||||
std::vector<std::string> seerEmpty;
|
std::vector<std::string> seerEmpty;
|
||||||
std::vector <std::vector <std::vector <std::string> > > quests; //[quest][type][index]
|
std::vector<std::vector<std::vector<std::string>>> quests; //[quest][type][index]
|
||||||
//type: quest, progress, complete, rollover, log OR time limit //index: 0-2 seer hut, 3-5 border guard
|
//type: quest, progress, complete, rollover, log OR time limit //index: 0-2 seer hut, 3-5 border guard
|
||||||
std::vector<std::string> seerNames;
|
std::vector<std::string> seerNames;
|
||||||
std::vector<std::string> tentColors;
|
std::vector<std::string> tentColors;
|
||||||
|
|
||||||
//sec skills
|
//sec skills
|
||||||
std::vector <std::string> skillName;
|
std::vector<std::string> skillName;
|
||||||
std::vector <std::vector <std::string> > skillInfoTexts; //[id][level] : level 0 - basic; 2 - advanced
|
std::vector<std::vector<std::string>> skillInfoTexts; //[id][level] : level 0 - basic; 2 - advanced
|
||||||
std::vector<std::string> levels;
|
std::vector<std::string> levels;
|
||||||
std::vector<std::string> zcrexp; //more or less useful content of that file
|
std::vector<std::string> zcrexp; //more or less useful content of that file
|
||||||
|
|
||||||
//campaigns
|
//campaigns
|
||||||
std::vector <std::string> campaignMapNames;
|
std::vector<std::string> campaignMapNames;
|
||||||
std::vector < std::vector <std::string> > campaignRegionNames;
|
std::vector<std::vector<std::string>> campaignRegionNames;
|
||||||
|
|
||||||
|
static void readToVector(std::string sourceName, std::vector<std::string> &dest);
|
||||||
|
|
||||||
void readToVector(std::string sourceName, std::vector<std::string> & dest);
|
|
||||||
CGeneralTextHandler();
|
CGeneralTextHandler();
|
||||||
|
CGeneralTextHandler(const CGeneralTextHandler&) = delete;
|
||||||
|
CGeneralTextHandler operator=(const CGeneralTextHandler&) = delete;
|
||||||
};
|
};
|
||||||
|
@ -122,7 +122,7 @@ DLL_LINKAGE void SetCommanderProperty::applyGs(CGameState *gs)
|
|||||||
commander->setAlive(false);
|
commander->setAlive(false);
|
||||||
break;
|
break;
|
||||||
case EXPERIENCE:
|
case EXPERIENCE:
|
||||||
commander->giveStackExp (amount); //TODO: allow setting exp for stacks via netpacks
|
commander->giveStackExp(amount); //TODO: allow setting exp for stacks via netpacks
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -137,7 +137,7 @@ void CQuest::getVisitText(MetaString &iwText, std::vector<Component> &components
|
|||||||
switch (missionType)
|
switch (missionType)
|
||||||
{
|
{
|
||||||
case MISSION_LEVEL:
|
case MISSION_LEVEL:
|
||||||
components.push_back(Component (Component::EXPERIENCE, 0, m13489val, 0));
|
components.push_back(Component(Component::EXPERIENCE, 0, m13489val, 0));
|
||||||
if(!isCustom)
|
if(!isCustom)
|
||||||
iwText.addReplacement(m13489val);
|
iwText.addReplacement(m13489val);
|
||||||
break;
|
break;
|
||||||
@ -148,7 +148,7 @@ void CQuest::getVisitText(MetaString &iwText, std::vector<Component> &components
|
|||||||
{
|
{
|
||||||
if(m2stats[i])
|
if(m2stats[i])
|
||||||
{
|
{
|
||||||
components.push_back(Component (Component::PRIM_SKILL, i, m2stats[i], 0));
|
components.push_back(Component(Component::PRIM_SKILL, i, m2stats[i], 0));
|
||||||
loot << "%d %s";
|
loot << "%d %s";
|
||||||
loot.addReplacement(m2stats[i]);
|
loot.addReplacement(m2stats[i]);
|
||||||
loot.addReplacement(VLC->generaltexth->primarySkillNames[i]);
|
loot.addReplacement(VLC->generaltexth->primarySkillNames[i]);
|
||||||
@ -165,7 +165,7 @@ void CQuest::getVisitText(MetaString &iwText, std::vector<Component> &components
|
|||||||
break;
|
break;
|
||||||
case MISSION_HERO:
|
case MISSION_HERO:
|
||||||
//FIXME: portrait may not match hero, if custom portrait was set in map editor
|
//FIXME: portrait may not match hero, if custom portrait was set in map editor
|
||||||
components.push_back(Component (Component::HERO_PORTRAIT, VLC->heroh->heroes[m13489val]->imageIndex, 0, 0));
|
components.push_back(Component(Component::HERO_PORTRAIT, VLC->heroh->heroes[m13489val]->imageIndex, 0, 0));
|
||||||
if(!isCustom)
|
if(!isCustom)
|
||||||
iwText.addReplacement(VLC->heroh->heroes[m13489val]->name);
|
iwText.addReplacement(VLC->heroh->heroes[m13489val]->name);
|
||||||
break;
|
break;
|
||||||
@ -183,7 +183,7 @@ void CQuest::getVisitText(MetaString &iwText, std::vector<Component> &components
|
|||||||
MetaString loot;
|
MetaString loot;
|
||||||
for(auto & elem : m5arts)
|
for(auto & elem : m5arts)
|
||||||
{
|
{
|
||||||
components.push_back(Component (Component::ARTIFACT, elem, 0, 0));
|
components.push_back(Component(Component::ARTIFACT, elem, 0, 0));
|
||||||
loot << "%s";
|
loot << "%s";
|
||||||
loot.addReplacement(MetaString::ART_NAMES, elem);
|
loot.addReplacement(MetaString::ART_NAMES, elem);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user