mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-19 23:25:09 -05:00
Add custom_scripts project config, and cleanup scripts when switching projects
This commit is contained in:
@@ -113,6 +113,7 @@ public:
|
||||
this->baseGameVersion = BaseGameVersion::pokeemerald;
|
||||
this->useEncounterJson = true;
|
||||
this->useCustomBorderSize = false;
|
||||
this->customScripts.clear();
|
||||
}
|
||||
void setBaseGameVersion(BaseGameVersion baseGameVersion);
|
||||
BaseGameVersion getBaseGameVersion();
|
||||
@@ -121,8 +122,11 @@ public:
|
||||
void setUsePoryScript(bool usePoryScript);
|
||||
bool getUsePoryScript();
|
||||
void setProjectDir(QString projectDir);
|
||||
QString getProjectDir();
|
||||
void setUseCustomBorderSize(bool enable);
|
||||
bool getUseCustomBorderSize();
|
||||
void setCustomScripts(QList<QString> scripts);
|
||||
QList<QString> getCustomScripts();
|
||||
protected:
|
||||
virtual QString getConfigFilepath() override;
|
||||
virtual void parseConfigKeyValue(QString key, QString value) override;
|
||||
@@ -134,6 +138,7 @@ private:
|
||||
bool useEncounterJson;
|
||||
bool usePoryScript;
|
||||
bool useCustomBorderSize;
|
||||
QList<QString> customScripts;
|
||||
};
|
||||
|
||||
extern ProjectConfig projectConfig;
|
||||
|
||||
@@ -253,6 +253,8 @@ private:
|
||||
DraggablePixmapItem *selectedBG;
|
||||
DraggablePixmapItem *selectedHealspot;
|
||||
|
||||
QList<QAction *> registeredActions;
|
||||
|
||||
bool isProgrammaticEventTabChange;
|
||||
bool projectHasUnsavedChanges;
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
enum CallbackType {
|
||||
OnProjectOpened,
|
||||
OnProjectClosed,
|
||||
OnBlockChanged,
|
||||
OnMapOpened,
|
||||
};
|
||||
@@ -25,6 +26,7 @@ public:
|
||||
static int numRegisteredActions();
|
||||
static void invokeAction(QString actionName);
|
||||
static void cb_ProjectOpened(QString projectPath);
|
||||
static void cb_ProjectClosed(QString projectPath);
|
||||
static void cb_MetatileChanged(int x, int y, Block prevBlock, Block newBlock);
|
||||
static void cb_MapOpened(QString mapName);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user