Stop treating map header bools as strings

This commit is contained in:
GriffinR
2022-10-14 18:11:11 -04:00
parent 614242f1fe
commit 239f3935bf
7 changed files with 57 additions and 85 deletions

View File

@@ -815,7 +815,7 @@ void MainWindow::setLocation(QString location) {
bool MainWindow::getRequiresFlash() {
if (!this->editor || !this->editor->map)
return false;
return ParseUtil::gameStringToBool(this->editor->map->requiresFlash);
return this->editor->map->requiresFlash;
}
void MainWindow::setRequiresFlash(bool require) {
@@ -875,7 +875,7 @@ void MainWindow::setBattleScene(QString battleScene) {
bool MainWindow::getShowLocationName() {
if (!this->editor || !this->editor->map)
return false;
return ParseUtil::gameStringToBool(this->editor->map->show_location);
return this->editor->map->show_location;
}
void MainWindow::setShowLocationName(bool show) {
@@ -887,7 +887,7 @@ void MainWindow::setShowLocationName(bool show) {
bool MainWindow::getAllowRunning() {
if (!this->editor || !this->editor->map)
return false;
return ParseUtil::gameStringToBool(this->editor->map->allowRunning);
return this->editor->map->allowRunning;
}
void MainWindow::setAllowRunning(bool allow) {
@@ -899,7 +899,7 @@ void MainWindow::setAllowRunning(bool allow) {
bool MainWindow::getAllowBiking() {
if (!this->editor || !this->editor->map)
return false;
return ParseUtil::gameStringToBool(this->editor->map->allowBiking);
return this->editor->map->allowBiking;
}
void MainWindow::setAllowBiking(bool allow) {
@@ -911,13 +911,13 @@ void MainWindow::setAllowBiking(bool allow) {
bool MainWindow::getAllowEscaping() {
if (!this->editor || !this->editor->map)
return false;
return ParseUtil::gameStringToBool(this->editor->map->allowEscapeRope);
return this->editor->map->allowEscaping;
}
void MainWindow::setAllowEscaping(bool allow) {
if (!this->ui)
return;
this->ui->checkBox_AllowEscapeRope->setChecked(allow);
this->ui->checkBox_AllowEscaping->setChecked(allow);
}
int MainWindow::getFloorNumber() {