From ad791e2b81a9781cf7e3e3f28914667df0e610cc Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 8 Dec 2022 13:10:21 -0300 Subject: Add l() function for compatibility with Evol2 scripts --- src/map/script-fun.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 @@ -4291,6 +4291,19 @@ void builtin_getpartnerid2(ScriptState *st) push_int(st->stack, unwrap(sd->status.partner_id)); } +/*========================================== + * 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(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 -- cgit v1.2.3-60-g2f50