summaryrefslogtreecommitdiff
path: root/src/script/common/c_internal.h
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2021-08-21 20:04:04 +0200
committerGitHub <noreply@github.com>2021-08-21 20:04:04 +0200
commit0c1e9603db32b4281974fdd8b8e3b505148be47e (patch)
tree376b6f04d1c27388fbb453694827976a9a6d39a0 /src/script/common/c_internal.h
parenta72d13064fcbddaf332c7d53e6f34b74d8781586 (diff)
downloadminetest-0c1e9603db32b4281974fdd8b8e3b505148be47e.tar.gz
minetest-0c1e9603db32b4281974fdd8b8e3b505148be47e.tar.bz2
minetest-0c1e9603db32b4281974fdd8b8e3b505148be47e.zip
HUD: Reject and warn on invalid stat types (#11548)
This comes into play on older servers which do not know the "stat" type. Warnings are only logged once to avoid spam within globalstep callbacks
Diffstat (limited to 'src/script/common/c_internal.h')
-rw-r--r--src/script/common/c_internal.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/script/common/c_internal.h b/src/script/common/c_internal.h
index 452c2dd5e..4ddbed232 100644
--- a/src/script/common/c_internal.h
+++ b/src/script/common/c_internal.h
@@ -114,6 +114,9 @@ void script_error(lua_State *L, int pcall_result, const char *mod, const char *f
void script_run_callbacks_f(lua_State *L, int nargs,
RunCallbacksMode mode, const char *fxn);
+bool script_log_unique(lua_State *L, std::string message, std::ostream &log_to,
+ int stack_depth = 1);
+
enum class DeprecatedHandlingMode {
Ignore,
Log,
@@ -134,5 +137,4 @@ DeprecatedHandlingMode get_deprecated_handling_mode();
* @param message The deprecation method
* @param stack_depth How far on the stack to the first user function (ie: not builtin or core)
*/
-void log_deprecated(lua_State *L, const std::string &message,
- int stack_depth=1);
+void log_deprecated(lua_State *L, std::string message, int stack_depth = 1);