mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
Refactoring of H3M loader to make HotA format support easier
- extracted low-level reader from MapFormatH3M class - added separate structure to define version-specific values - cleared up some H3M format edge cases - replaced witch hut skill vector with set - converted several fields to enum type
This commit is contained in:
@@ -131,7 +131,7 @@ protected:
|
||||
class DLL_LINKAGE CGWitchHut : public CTeamVisited
|
||||
{
|
||||
public:
|
||||
std::vector<si32> allowedAbilities;
|
||||
std::set<si32> allowedAbilities;
|
||||
ui32 ability;
|
||||
|
||||
std::string getHoverText(PlayerColor player) const override;
|
||||
@@ -265,6 +265,7 @@ class DLL_LINKAGE CGMine : public CArmedInstance
|
||||
public:
|
||||
GameResID producedResource;
|
||||
ui32 producedQuantity;
|
||||
std::set<GameResID> abandonedMineResources;
|
||||
|
||||
private:
|
||||
void onHeroVisit(const CGHeroInstance * h) const override;
|
||||
@@ -285,6 +286,7 @@ public:
|
||||
h & static_cast<CArmedInstance&>(*this);
|
||||
h & producedResource;
|
||||
h & producedQuantity;
|
||||
h & abandonedMineResources;
|
||||
}
|
||||
ui32 defaultResProduction() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user