1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

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
This commit is contained in:
SmallJoker 2021-08-21 20:04:04 +02:00 committed by GitHub
parent a72d13064f
commit 0c1e9603db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 86 additions and 44 deletions

View file

@ -193,12 +193,12 @@ void read_json_value (lua_State *L, Json::Value &root,
void push_pointed_thing(lua_State *L, const PointedThing &pointed, bool csm =
false, bool hitpoint = false);
void push_objectRef (lua_State *L, const u16 id);
void push_objectRef (lua_State *L, const u16 id);
void read_hud_element (lua_State *L, HudElement *elem);
void read_hud_element (lua_State *L, HudElement *elem);
void push_hud_element (lua_State *L, HudElement *elem);
void push_hud_element (lua_State *L, HudElement *elem);
HudElementStat read_hud_change (lua_State *L, HudElement *elem, void **value);
bool read_hud_change (lua_State *L, HudElementStat &stat, HudElement *elem, void **value);
void push_collision_move_result(lua_State *L, const collisionMoveResult &res);
void push_collision_move_result(lua_State *L, const collisionMoveResult &res);