2016-07-09 04:18:40 +02:00
|
|
|
#ifndef AQUARIA_MOD_H
|
|
|
|
#define AQUARIA_MOD_H
|
|
|
|
|
|
|
|
#include "GameEnums.h"
|
|
|
|
#include "Precacher.h"
|
|
|
|
|
|
|
|
namespace tinyxml2
|
|
|
|
{
|
|
|
|
class XMLDocument;
|
|
|
|
class XMLElement;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
enum ModType
|
|
|
|
{
|
|
|
|
MODTYPE_MOD,
|
2017-01-20 04:51:38 +01:00
|
|
|
MODTYPE_PATCH
|
2016-07-09 04:18:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct ModEntry
|
|
|
|
{
|
|
|
|
unsigned int id; // index in vector
|
|
|
|
ModType type;
|
|
|
|
std::string path;
|
|
|
|
};
|
|
|
|
|
|
|
|
class ModSelectorScreen;
|
|
|
|
|
|
|
|
class Mod
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Mod();
|
|
|
|
~Mod();
|
|
|
|
void clear();
|
|
|
|
void setActive(bool v);
|
|
|
|
void start();
|
|
|
|
void stop();
|
|
|
|
void load(const std::string &path);
|
2017-01-21 02:06:44 +01:00
|
|
|
bool loadSavedGame(const std::string& path);
|
2016-07-09 04:18:40 +02:00
|
|
|
|
|
|
|
void update(float dt);
|
|
|
|
|
|
|
|
void recache();
|
|
|
|
|
|
|
|
const std::string& getBaseModPath() const;
|
|
|
|
|
|
|
|
bool isActive();
|
|
|
|
bool isDebugMenu();
|
|
|
|
bool hasWorldMap();
|
|
|
|
bool isEditorBlocked();
|
|
|
|
|
|
|
|
const std::string& getPath() const;
|
|
|
|
const std::string& getName() const;
|
|
|
|
|
|
|
|
void shutdown();
|
|
|
|
bool isShuttingDown();
|
|
|
|
|
|
|
|
static bool loadModXML(tinyxml2::XMLDocument *d, std::string modName);
|
|
|
|
static ModType getTypeFromXML(tinyxml2::XMLElement *xml);
|
|
|
|
|
|
|
|
WorldMapRevealMethod mapRevealMethod;
|
|
|
|
|
|
|
|
protected:
|
2017-01-21 02:06:44 +01:00
|
|
|
bool loadCompatScript();
|
2016-07-09 04:18:40 +02:00
|
|
|
bool shuttingDown;
|
|
|
|
bool active;
|
|
|
|
bool hasMap;
|
|
|
|
bool blockEditor;
|
|
|
|
int doRecache;
|
|
|
|
int debugMenu;
|
|
|
|
int enqueueModStart;
|
|
|
|
void applyStart();
|
|
|
|
|
|
|
|
std::string name;
|
|
|
|
std::string path;
|
|
|
|
Precacher modcache;
|
2017-01-21 02:06:44 +01:00
|
|
|
std::string compatScript;
|
2016-07-09 04:18:40 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|