mirror of
https://github.com/huderlem/porymap.git
synced 2026-10-01 20:36:42 -05:00
Add 'Open in JSON' actions
This commit is contained in:
@@ -82,9 +82,12 @@ public:
|
||||
bool hasEvent(Event *) const;
|
||||
|
||||
QStringList getScriptLabels(Event::Group group = Event::Group::None);
|
||||
QString getScriptsFilePath() const;
|
||||
QString getScriptsFilepath() const;
|
||||
void openScript(const QString &label);
|
||||
|
||||
static QString getJsonFilepath(const QString &mapName);
|
||||
QString getJsonFilepath() const { return getJsonFilepath(m_name); }
|
||||
|
||||
void deleteConnections();
|
||||
QList<MapConnection*> getConnections() const { return m_connections; }
|
||||
MapConnection* getConnection(const QString &direction) const;
|
||||
|
||||
@@ -73,6 +73,8 @@ public:
|
||||
bool tryParseJsonFile(QJsonDocument *out, const QString &filepath, QString *error = nullptr);
|
||||
bool tryParseOrderedJsonFile(poryjson::Json::object *out, const QString &filepath, QString *error = nullptr);
|
||||
|
||||
static int getJsonLineNumber(const QString &filepath, const QString &searchText);
|
||||
|
||||
// Returns the 1-indexed line number for the definition of scriptLabel in the scripts file at filePath.
|
||||
// Returns 0 if a definition for scriptLabel cannot be found.
|
||||
static int getScriptLineNumber(const QString &filePath, const QString &scriptLabel);
|
||||
|
||||
Reference in New Issue
Block a user