v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
52
source/game/StarTechDatabase.hpp
Normal file
52
source/game/StarTechDatabase.hpp
Normal file
|
@ -0,0 +1,52 @@
|
|||
#ifndef STAR_TECH_DATABASE_HPP
|
||||
#define STAR_TECH_DATABASE_HPP
|
||||
|
||||
#include "StarJson.hpp"
|
||||
#include "StarBiMap.hpp"
|
||||
#include "StarGameTypes.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
STAR_EXCEPTION(TechDatabaseException, StarException);
|
||||
|
||||
STAR_CLASS(TechDatabase);
|
||||
|
||||
enum class TechType {
|
||||
Head,
|
||||
Body,
|
||||
Legs
|
||||
};
|
||||
extern EnumMap<TechType> const TechTypeNames;
|
||||
|
||||
struct TechConfig {
|
||||
String name;
|
||||
String path;
|
||||
Json parameters;
|
||||
|
||||
TechType type;
|
||||
|
||||
StringList scripts;
|
||||
Maybe<String> animationConfig;
|
||||
|
||||
String description;
|
||||
String shortDescription;
|
||||
Rarity rarity;
|
||||
String icon;
|
||||
};
|
||||
|
||||
class TechDatabase {
|
||||
public:
|
||||
TechDatabase();
|
||||
|
||||
bool contains(String const& techName) const;
|
||||
TechConfig tech(String const& techName) const;
|
||||
|
||||
private:
|
||||
TechConfig parseTech(Json const& config, String const& path) const;
|
||||
|
||||
StringMap<TechConfig> m_tech;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue