- bugfix for lua strings
This commit is contained in:
parent
435e06db20
commit
f7423608ce
|
@ -680,7 +680,6 @@ void ScriptManager::addConsoleLangText(const char *fmt, ...){
|
||||||
char szBuf[max_debug_buffer_size]="";
|
char szBuf[max_debug_buffer_size]="";
|
||||||
vsnprintf(szBuf,max_debug_buffer_size-1,fmt, argList);
|
vsnprintf(szBuf,max_debug_buffer_size-1,fmt, argList);
|
||||||
|
|
||||||
//displayText= wrapString(Lang::getInstance().getScenarioString(text), displayTextWrapCount);
|
|
||||||
world->addConsoleTextWoLang(szBuf);
|
world->addConsoleTextWoLang(szBuf);
|
||||||
va_end(argList);
|
va_end(argList);
|
||||||
|
|
||||||
|
@ -698,7 +697,6 @@ void ScriptManager::DisplayFormattedText(const char *fmt, ...) {
|
||||||
char szBuf[max_debug_buffer_size]="";
|
char szBuf[max_debug_buffer_size]="";
|
||||||
vsnprintf(szBuf,max_debug_buffer_size-1,fmt, argList);
|
vsnprintf(szBuf,max_debug_buffer_size-1,fmt, argList);
|
||||||
|
|
||||||
//displayText= wrapString(Lang::getInstance().getScenarioString(text), displayTextWrapCount);
|
|
||||||
displayText=szBuf;
|
displayText=szBuf;
|
||||||
|
|
||||||
va_end(argList);
|
va_end(argList);
|
||||||
|
@ -716,7 +714,6 @@ void ScriptManager::DisplayFormattedLangText(const char *fmt, ...) {
|
||||||
char szBuf[max_debug_buffer_size]="";
|
char szBuf[max_debug_buffer_size]="";
|
||||||
vsnprintf(szBuf,max_debug_buffer_size-1,fmt, argList);
|
vsnprintf(szBuf,max_debug_buffer_size-1,fmt, argList);
|
||||||
|
|
||||||
//displayText= wrapString(Lang::getInstance().getScenarioString(text), displayTextWrapCount);
|
|
||||||
displayText=szBuf;
|
displayText=szBuf;
|
||||||
|
|
||||||
va_end(argList);
|
va_end(argList);
|
||||||
|
@ -2062,6 +2059,9 @@ void ScriptManager::saveGame(XmlNode *rootNode) {
|
||||||
for(std::list<ScriptManagerMessage>::iterator it = messageQueue.begin(); it != messageQueue.end(); ++it) {
|
for(std::list<ScriptManagerMessage>::iterator it = messageQueue.begin(); it != messageQueue.end(); ++it) {
|
||||||
(*it).saveGame(scriptManagerNode);
|
(*it).saveGame(scriptManagerNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//printf("==== ScriptManager Savegame messageBox [%d][%s][%s] displayText [%s]\n",messageBox.getEnabled(),messageBox.getText().c_str(),messageBox.getHeader().c_str(),displayText.c_str());
|
||||||
|
|
||||||
// GraphicMessageBox messageBox;
|
// GraphicMessageBox messageBox;
|
||||||
scriptManagerNode->addAttribute("messageBox_enabled",intToStr(messageBox.getEnabled()), mapTagReplacements);
|
scriptManagerNode->addAttribute("messageBox_enabled",intToStr(messageBox.getEnabled()), mapTagReplacements);
|
||||||
scriptManagerNode->addAttribute("messageBox_text",messageBox.getText(), mapTagReplacements);
|
scriptManagerNode->addAttribute("messageBox_text",messageBox.getText(), mapTagReplacements);
|
||||||
|
|
|
@ -283,9 +283,9 @@ void LuaScript::saveGame(XmlNode *rootNode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// enclose the value in "" if it is a string
|
// enclose the value in "" if it is a string
|
||||||
if (value_type == LUA_TSTRING) {
|
//if (value_type == LUA_TSTRING) {
|
||||||
value_string = "\"" + value_string + "\"";
|
//value_string = "\"" + value_string + "\"";
|
||||||
}
|
//}
|
||||||
|
|
||||||
if(skipTable == true) {
|
if(skipTable == true) {
|
||||||
if(debugLuaDump == true) printf("#2 SKIPPING TABLE\n");
|
if(debugLuaDump == true) printf("#2 SKIPPING TABLE\n");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user