mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Update docs, fix sonar
This commit is contained in:
@@ -119,7 +119,16 @@ These are fields that are present only in local mod.json file
|
|||||||
],
|
],
|
||||||
|
|
||||||
// List of configuration files for skills
|
// List of configuration files for skills
|
||||||
skills
|
"skills" :
|
||||||
|
[
|
||||||
|
"config/skills.json"
|
||||||
|
],
|
||||||
|
|
||||||
|
// List of configuration files for campaign regions for h3c campaigns
|
||||||
|
"campaignRegions" :
|
||||||
|
[
|
||||||
|
"config/campaignRegions.json"
|
||||||
|
],
|
||||||
|
|
||||||
// list of creature configuration files
|
// list of creature configuration files
|
||||||
"creatures" :
|
"creatures" :
|
||||||
|
|||||||
@@ -55,8 +55,6 @@ const QueryID QueryID::NONE(-1);
|
|||||||
const QueryID QueryID::CLIENT(-2);
|
const QueryID QueryID::CLIENT(-2);
|
||||||
const HeroTypeID HeroTypeID::NONE(-1);
|
const HeroTypeID HeroTypeID::NONE(-1);
|
||||||
const HeroTypeID HeroTypeID::RANDOM(-2);
|
const HeroTypeID HeroTypeID::RANDOM(-2);
|
||||||
const HeroTypeID HeroTypeID::GEM(27);
|
|
||||||
const HeroTypeID HeroTypeID::SOLMYR(45);
|
|
||||||
const HeroTypeID HeroTypeID::CAMP_STRONGEST(-3);
|
const HeroTypeID HeroTypeID::CAMP_STRONGEST(-3);
|
||||||
const HeroTypeID HeroTypeID::CAMP_GENERATED(-2);
|
const HeroTypeID HeroTypeID::CAMP_GENERATED(-2);
|
||||||
const HeroTypeID HeroTypeID::CAMP_RANDOM(-1);
|
const HeroTypeID HeroTypeID::CAMP_RANDOM(-1);
|
||||||
|
|||||||
@@ -115,9 +115,6 @@ public:
|
|||||||
|
|
||||||
static const HeroTypeID NONE;
|
static const HeroTypeID NONE;
|
||||||
static const HeroTypeID RANDOM;
|
static const HeroTypeID RANDOM;
|
||||||
static const HeroTypeID GEM; // aka Gem, Sorceress in campaign
|
|
||||||
static const HeroTypeID SOLMYR; // aka Young Yog in campaigns
|
|
||||||
|
|
||||||
static const HeroTypeID CAMP_STRONGEST;
|
static const HeroTypeID CAMP_STRONGEST;
|
||||||
static const HeroTypeID CAMP_GENERATED;
|
static const HeroTypeID CAMP_GENERATED;
|
||||||
static const HeroTypeID CAMP_RANDOM;
|
static const HeroTypeID CAMP_RANDOM;
|
||||||
|
|||||||
@@ -577,9 +577,10 @@ void CGameStateCampaign::initHeroes()
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto campaignState = gameState->scenarioOps->campState;
|
auto campaignState = gameState->scenarioOps->campState;
|
||||||
auto * yog = gameState->getUsedHero(HeroTypeID::SOLMYR);
|
if (campaignState->getYogWizardID().hasValue() && boost::starts_with(campaignState->getFilename(), "DATA/YOG") && campaignState->currentScenario()->getNum() == 2)
|
||||||
if (yog && boost::starts_with(campaignState->getFilename(), "DATA/YOG") && campaignState->currentScenario()->getNum() == 2)
|
|
||||||
{
|
{
|
||||||
|
auto * yog = gameState->getUsedHero(campaignState->getYogWizardID());
|
||||||
|
assert(yog);
|
||||||
assert(yog->isCampaignYog());
|
assert(yog->isCampaignYog());
|
||||||
gameState->giveHeroArtifact(yog, ArtifactID::ANGELIC_ALLIANCE);
|
gameState->giveHeroArtifact(yog, ArtifactID::ANGELIC_ALLIANCE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ std::unique_ptr<IMapPatcher> CMapService::getMapPatcher(std::string scenarioName
|
|||||||
{
|
{
|
||||||
boost::to_lower(scenarioName);
|
boost::to_lower(scenarioName);
|
||||||
logGlobal->debug("Request to patch map %s", scenarioName);
|
logGlobal->debug("Request to patch map %s", scenarioName);
|
||||||
return std::unique_ptr<IMapPatcher>(new CMapPatcher(LIBRARY->mapFormat->mapOverrides(scenarioName)));
|
return std::make_unique<CMapPatcher>(LIBRARY->mapFormat->mapOverrides(scenarioName));
|
||||||
}
|
}
|
||||||
|
|
||||||
VCMI_LIB_NAMESPACE_END
|
VCMI_LIB_NAMESPACE_END
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ enum class EMapFormat : uint8_t;
|
|||||||
|
|
||||||
struct MapFormatFeaturesH3M
|
struct MapFormatFeaturesH3M
|
||||||
{
|
{
|
||||||
|
private:
|
||||||
static MapFormatFeaturesH3M getFeaturesROE();
|
static MapFormatFeaturesH3M getFeaturesROE();
|
||||||
static MapFormatFeaturesH3M getFeaturesAB();
|
static MapFormatFeaturesH3M getFeaturesAB();
|
||||||
static MapFormatFeaturesH3M getFeaturesSOD();
|
static MapFormatFeaturesH3M getFeaturesSOD();
|
||||||
@@ -23,12 +24,11 @@ struct MapFormatFeaturesH3M
|
|||||||
static MapFormatFeaturesH3M getFeaturesWOG();
|
static MapFormatFeaturesH3M getFeaturesWOG();
|
||||||
static MapFormatFeaturesH3M getFeaturesHOTA(uint32_t hotaVersion);
|
static MapFormatFeaturesH3M getFeaturesHOTA(uint32_t hotaVersion);
|
||||||
|
|
||||||
|
public:
|
||||||
MapFormatFeaturesH3M() = default;
|
MapFormatFeaturesH3M() = default;
|
||||||
|
|
||||||
public:
|
|
||||||
static MapFormatFeaturesH3M find(EMapFormat format, uint32_t hotaVersion);
|
static MapFormatFeaturesH3M find(EMapFormat format, uint32_t hotaVersion);
|
||||||
|
|
||||||
|
|
||||||
// number of bytes in bitmask of appropriate type
|
// number of bytes in bitmask of appropriate type
|
||||||
|
|
||||||
int factionsBytes;
|
int factionsBytes;
|
||||||
|
|||||||
@@ -51,12 +51,12 @@ public:
|
|||||||
return mapping.at(campaignToMap.at(format));
|
return mapping.at(campaignToMap.at(format));
|
||||||
}
|
}
|
||||||
|
|
||||||
const JsonNode & campaignOverrides(std::string & campaignName)
|
const JsonNode & campaignOverrides(const std::string & campaignName)
|
||||||
{
|
{
|
||||||
return campaignOverridesConfig[campaignName];
|
return campaignOverridesConfig[campaignName];
|
||||||
}
|
}
|
||||||
|
|
||||||
const JsonNode & mapOverrides(std::string & mapName)
|
const JsonNode & mapOverrides(const std::string & mapName)
|
||||||
{
|
{
|
||||||
return mapOverridesConfig[mapName];
|
return mapOverridesConfig[mapName];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user