From 302390388ba9b1c6cb4c6aa7cd5614c89286a254 Mon Sep 17 00:00:00 2001 From: Ryan Williams Date: Thu, 4 Jan 2024 05:58:55 -0800 Subject: [PATCH] Update LuaApi.cpp --- library/LuaApi.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index 1769baa90..c92fcf3ca 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -1450,6 +1450,7 @@ static std::string df2utf(std::string s) { return DF2UTF(s); } static std::string utf2df(std::string s) { return UTF2DF(s); } static std::string df2console(color_ostream &out, std::string s) { return DF2CONSOLE(out, s); } static std::string toSearchNormalized(std::string s) { return to_search_normalized(s); } +static std::string capitalizeStringWords(std::string s) { return capitalize_string_words(s); } #define WRAP_VERSION_FUNC(name, function) WRAPN(name, DFHack::Version::function) @@ -1468,6 +1469,7 @@ static const LuaWrapper::FunctionReg dfhack_module[] = { WRAP(utf2df), WRAP(df2console), WRAP(toSearchNormalized), + WRAP(capitalizeStringWords), WRAP_VERSION_FUNC(getDFHackVersion, dfhack_version), WRAP_VERSION_FUNC(getDFHackRelease, dfhack_release), WRAP_VERSION_FUNC(getDFHackBuildID, dfhack_build_id), @@ -1903,6 +1905,7 @@ static const LuaWrapper::FunctionReg dfhack_units_module[] = { WRAPM(Units, isDemon), WRAPM(Units, isDanger), WRAPM(Units, isGreatDanger), + WRAPM(Units, getUnitFromHFID), WRAPM(Units, teleport), WRAPM(Units, getGeneralRef), WRAPM(Units, getSpecificRef),