mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Fix build
This commit is contained in:
@@ -47,7 +47,7 @@ int BattleLogMessageProxy::addText(lua_State * L)
|
||||
{
|
||||
if(object->lines.empty())
|
||||
object->lines.emplace_back();
|
||||
object->lines.back() << text;
|
||||
object->lines.back().appendRawString(text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,17 +56,17 @@ int InfoWindowProxy::addReplacement(lua_State * L)
|
||||
const auto *raw = lua_tolstring(L, 2, &len);
|
||||
std::string text(raw, len);
|
||||
|
||||
object->text.addReplacement(text);
|
||||
object->text.replaceRawString(text);
|
||||
}
|
||||
else if(lua_isnumber(L, 2))
|
||||
{
|
||||
object->text.addReplacement(lua_tointeger(L, 2));
|
||||
object->text.replaceNumber(lua_tointeger(L, 2));
|
||||
}
|
||||
}
|
||||
else if(top >= 3)
|
||||
{
|
||||
if(lua_isnumber(L, 2) && lua_isnumber(L, 3))
|
||||
object->text.addReplacement(lua_tointeger(L, 2), lua_tointeger(L, 3));
|
||||
object->text.replaceLocalString(static_cast<EMetaText>(lua_tointeger(L, 2)), lua_tointeger(L, 3));
|
||||
}
|
||||
|
||||
return S.retVoid();
|
||||
@@ -90,18 +90,18 @@ int InfoWindowProxy::addText(lua_State * L)
|
||||
const auto *raw = lua_tolstring(L, 2, &len);
|
||||
std::string text(raw, len);
|
||||
|
||||
object->text << text;
|
||||
object->text.appendRawString(text);
|
||||
}
|
||||
else if(lua_isnumber(L, 2))
|
||||
{
|
||||
object->text << (lua_tointeger(L, 2));
|
||||
object->text.appendNumber(lua_tointeger(L, 2));
|
||||
}
|
||||
}
|
||||
|
||||
if(top >= 3)
|
||||
{
|
||||
if(lua_isnumber(L, 2) && lua_isnumber(L, 3))
|
||||
object->text.addTxt(lua_tointeger(L, 2), lua_tointeger(L, 3));
|
||||
object->text.appendLocalString(static_cast<EMetaText>(lua_tointeger(L, 2)), lua_tointeger(L, 3));
|
||||
}
|
||||
|
||||
return S.retVoid();
|
||||
|
||||
Reference in New Issue
Block a user