Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/scripting/StarUtilityLuaBindings.hpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-03-15 21:28:11 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-03-15 21:28:11 +1100
commit6fa0afd758a6351873df813cd7e70b1904714ed6 (patch)
treefbf45f18af0962a1d9ed3a2f44d8bb208c032645 /source/core/scripting/StarUtilityLuaBindings.hpp
parent696abcca71274fbda2470f1941cb2e06b6ff8c61 (diff)
experimental asset load scripts
Diffstat (limited to 'source/core/scripting/StarUtilityLuaBindings.hpp')
-rw-r--r--source/core/scripting/StarUtilityLuaBindings.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/source/core/scripting/StarUtilityLuaBindings.hpp b/source/core/scripting/StarUtilityLuaBindings.hpp
new file mode 100644
index 0000000..8435ecd
--- /dev/null
+++ b/source/core/scripting/StarUtilityLuaBindings.hpp
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "StarLua.hpp"
+
+namespace Star {
+
+namespace LuaBindings {
+ LuaCallbacks makeUtilityCallbacks();
+
+ String formatLua(String const& string, List<LuaValue> const& args);
+
+ namespace UtilityCallbacks {
+ double nrand(Maybe<double> const& stdev, Maybe<double> const& mean);
+ String makeUuid();
+ void logInfo(String const& str, LuaVariadic<LuaValue> const& args);
+ void logWarn(String const& str, LuaVariadic<LuaValue> const& args);
+ void logError(String const& str, LuaVariadic<LuaValue> const& args);
+ void setLogMap(String const& key, String const& value, LuaVariadic<LuaValue> const& args);
+ String printJson(Json const& arg, Maybe<int> pretty);
+ String print(LuaValue const& arg);
+ LuaValue interpolateSinEase(LuaEngine& engine, double offset, LuaValue const& value1, LuaValue const& value2);
+ String replaceTags(String const& str, StringMap<String> const& tags);
+ }
+}
+}