mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix text duplicating
This commit is contained in:
parent
f6093a84f0
commit
65e63bdf69
@ -531,7 +531,7 @@ void Inspector::setProperty(CGPandoraBox * o, const QString & key, const QVarian
|
||||
if(!o) return;
|
||||
|
||||
if(key == "Message")
|
||||
o->message.appendTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("guards", o->instanceName, "message"), value.toString().toStdString()));
|
||||
o->message = MetaString::createFromTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("guards", o->instanceName, "message"), value.toString().toStdString()));
|
||||
}
|
||||
|
||||
void Inspector::setProperty(CGEvent * o, const QString & key, const QVariant & value)
|
||||
@ -561,7 +561,7 @@ void Inspector::setProperty(CGSignBottle * o, const QString & key, const QVarian
|
||||
if(!o) return;
|
||||
|
||||
if(key == "Message")
|
||||
o->message.appendTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("sign", o->instanceName, "message"), value.toString().toStdString()));
|
||||
o->message = MetaString::createFromTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("sign", o->instanceName, "message"), value.toString().toStdString()));
|
||||
}
|
||||
|
||||
void Inspector::setProperty(CGMine * o, const QString & key, const QVariant & value)
|
||||
@ -577,7 +577,7 @@ void Inspector::setProperty(CGArtifact * o, const QString & key, const QVariant
|
||||
if(!o) return;
|
||||
|
||||
if(key == "Message")
|
||||
o->message.appendTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("guards", o->instanceName, "message"), value.toString().toStdString()));
|
||||
o->message = MetaString::createFromTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("guards", o->instanceName, "message"), value.toString().toStdString()));
|
||||
|
||||
if(o->storedArtifact && key == "Spell")
|
||||
{
|
||||
@ -646,7 +646,7 @@ void Inspector::setProperty(CGCreature * o, const QString & key, const QVariant
|
||||
if(!o) return;
|
||||
|
||||
if(key == "Message")
|
||||
o->message.appendTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("monster", o->instanceName, "message"), value.toString().toStdString()));
|
||||
o->message = MetaString::createFromTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("monster", o->instanceName, "message"), value.toString().toStdString()));
|
||||
if(key == "Character")
|
||||
o->character = CGCreature::Character(value.toInt());
|
||||
if(key == "Never flees")
|
||||
@ -664,11 +664,11 @@ void Inspector::setProperty(CGSeerHut * o, const QString & key, const QVariant &
|
||||
if(key == "Mission type")
|
||||
o->quest->missionType = CQuest::Emission(value.toInt());
|
||||
if(key == "First visit text")
|
||||
o->quest->firstVisitText.appendTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("quest", o->instanceName, "firstVisit"), value.toString().toStdString()));
|
||||
o->quest->firstVisitText = MetaString::createFromTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("quest", o->instanceName, "firstVisit"), value.toString().toStdString()));
|
||||
if(key == "Next visit text")
|
||||
o->quest->nextVisitText.appendTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("quest", o->instanceName, "nextVisit"), value.toString().toStdString()));
|
||||
o->quest->nextVisitText = MetaString::createFromTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("quest", o->instanceName, "nextVisit"), value.toString().toStdString()));
|
||||
if(key == "Completed text")
|
||||
o->quest->completedText.appendTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("quest", o->instanceName, "completed"), value.toString().toStdString()));
|
||||
o->quest->completedText = MetaString::createFromTextID(mapRegisterLocalizedString("map", *map, TextIdentifier("quest", o->instanceName, "completed"), value.toString().toStdString()));
|
||||
}
|
||||
|
||||
|
||||
|
@ -59,8 +59,8 @@ void GeneralSettings::initialize(MapController & c)
|
||||
|
||||
void GeneralSettings::update()
|
||||
{
|
||||
controller->map()->name.appendTextID(mapRegisterLocalizedString("map", *controller->map(), TextIdentifier("header", "name"), ui->mapNameEdit->text().toStdString()));
|
||||
controller->map()->description.appendTextID(mapRegisterLocalizedString("map", *controller->map(), TextIdentifier("header", "description"), ui->mapDescriptionEdit->toPlainText().toStdString()));
|
||||
controller->map()->name = MetaString::createFromTextID(mapRegisterLocalizedString("map", *controller->map(), TextIdentifier("header", "name"), ui->mapNameEdit->text().toStdString()));
|
||||
controller->map()->description = MetaString::createFromTextID(mapRegisterLocalizedString("map", *controller->map(), TextIdentifier("header", "description"), ui->mapDescriptionEdit->toPlainText().toStdString()));
|
||||
if(ui->heroLevelLimitCheck->isChecked())
|
||||
controller->map()->levelLimit = ui->heroLevelLimit->value();
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user