mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-11 19:35:38 -05:00
Merge branch 'master' of https://github.com/huderlem/porymap into slam
This commit is contained in:
@@ -27,7 +27,7 @@ Map::~Map() {
|
||||
void Map::setName(QString mapName) {
|
||||
name = mapName;
|
||||
constantName = mapConstantFromName(mapName);
|
||||
scriptsFileLabels = ParseUtil::getGlobalScriptLabels(this->getScriptsFilePath());
|
||||
scriptsLoaded = false;
|
||||
}
|
||||
|
||||
void Map::setLayout(Layout *layout) {
|
||||
@@ -117,7 +117,12 @@ QList<Event *> Map::getAllEvents() const {
|
||||
return all_events;
|
||||
}
|
||||
|
||||
QStringList Map::getScriptLabels(Event::Group group) const {
|
||||
QStringList Map::getScriptLabels(Event::Group group) {
|
||||
if (!this->scriptsLoaded) {
|
||||
this->scriptsFileLabels = ParseUtil::getGlobalScriptLabels(this->getScriptsFilePath());
|
||||
this->scriptsLoaded = true;
|
||||
}
|
||||
|
||||
QStringList scriptLabels;
|
||||
|
||||
// Get script labels currently in-use by the map's events
|
||||
@@ -136,7 +141,7 @@ QStringList Map::getScriptLabels(Event::Group group) const {
|
||||
}
|
||||
|
||||
// Add scripts from map's scripts file, and empty names.
|
||||
scriptLabels.append(scriptsFileLabels);
|
||||
scriptLabels.append(this->scriptsFileLabels);
|
||||
scriptLabels.sort(Qt::CaseInsensitive);
|
||||
scriptLabels.prepend("0x0");
|
||||
scriptLabels.prepend("NULL");
|
||||
|
||||
Reference in New Issue
Block a user