Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Robosturm committed May 28, 2024
1 parent e6d1856 commit fa7c56a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions coreengine/gameconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const char* const GameConsole::functions[] =
"printObjectDetails",
"resetMapsGameRules",
"updateTerrainPaletteMasks",
"loadScript"
""
};
const char* const GameConsole::compileTime = __TIME__;
Expand Down Expand Up @@ -213,6 +214,11 @@ void GameConsole::updateTerrainPaletteMasks(const QString& folder, const QString
SpriteCreator::updateTerrainPaletteMasks(folder, filter, originalPaletteSize, newPaletteSize, xOffset, yOffset);
}

void GameConsole::loadScript(QString & filepath)
{
Interpreter::getInstance()->openScript(filepath, false);
}

void GameConsole::dotask(QString message)
{
print(message, GameConsole::eINFO);
Expand Down
5 changes: 5 additions & 0 deletions coreengine/gameconsole.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,11 @@ public slots:
* @param newPaletteSize
*/
void updateTerrainPaletteMasks(const QString& folder, const QString& filter, qint32 originalPaletteSize, qint32 newPaletteSize, qint32 xOffset = 0, qint32 yOffset = 0);
/**
* @brief loadScript
* @param filepath
*/
void loadScript(QString & filepath);
/**
* @brief help shows the helps messages between given indexes or all as default
* @param start
Expand Down

0 comments on commit fa7c56a

Please sign in to comment.