summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-12-08 13:10:21 -0300
committerJesusaves <cpntb1@ymail.com>2022-12-08 13:10:21 -0300
commitad791e2b81a9781cf7e3e3f28914667df0e610cc (patch)
tree65da8a8515e4a7eebef047f2079930c18d499c13
parente45243576e5775cb241fa79cbe2dba8b074e4ee8 (diff)
downloadtmwa-ad791e2b81a9781cf7e3e3f28914667df0e610cc.tar.gz
tmwa-ad791e2b81a9781cf7e3e3f28914667df0e610cc.tar.bz2
tmwa-ad791e2b81a9781cf7e3e3f28914667df0e610cc.tar.xz
tmwa-ad791e2b81a9781cf7e3e3f28914667df0e610cc.zip
Add l() function for compatibility with Evol2 scripts
-rw-r--r--src/map/script-fun.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp
index ce80417..316d8e2 100644
--- a/src/map/script-fun.cpp
+++ b/src/map/script-fun.cpp
@@ -4292,6 +4292,19 @@ void builtin_getpartnerid2(ScriptState *st)
}
/*==========================================
+ * Translatable string
+ *------------------------------------------
+ */
+static
+void builtin_l(ScriptState *st)
+{
+ RString mes = conv_str(st, &AARG(0));
+ // TODO: Format: src/map/script.c:5720
+ // TODO: Translation Table Lookup: src/emap/lang.c:161
+ push_str<ScriptDataStr>(st->stack, mes);
+}
+
+/*==========================================
*
*------------------------------------------
*/
@@ -5658,6 +5671,7 @@ BuiltinFunction builtin_functions[] =
BUILTIN(distance, "ii?"_s, 'i'),
BUILTIN(chr, "i"_s, 's'),
BUILTIN(ord, "s"_s, 'i'),
+ BUILTIN(l, "s*"_s, 's'),
{nullptr, ""_s, ""_s, '\0'},
};
} // namespace map