mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix heart + bubble bar size on different texture packs
Add DPI support for statbar Move heart+bubble bar to Lua HUD Add statbar size (based upon an idea by blue42u) Add support for customizing breath and statbar
This commit is contained in:
parent
c80d67f48e
commit
d3ee617f37
15 changed files with 325 additions and 51 deletions
|
@ -58,6 +58,24 @@ void ScriptApiEnv::environment_Step(float dtime)
|
|||
}
|
||||
}
|
||||
|
||||
void ScriptApiEnv::player_event(ServerActiveObject* player, std::string type)
|
||||
{
|
||||
SCRIPTAPI_PRECHECKHEADER
|
||||
|
||||
// Get minetest.registered_playerevents
|
||||
lua_getglobal(L, "minetest");
|
||||
lua_getfield(L, -1, "registered_playerevents");
|
||||
|
||||
// Call callbacks
|
||||
objectrefGetOrCreate(player); // player
|
||||
lua_pushstring(L,type.c_str()); // event type
|
||||
try {
|
||||
script_run_callbacks(L, 2, RUN_CALLBACKS_MODE_FIRST);
|
||||
} catch (LuaError &e) {
|
||||
getServer()->setAsyncFatalError(e.what());
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptApiEnv::environment_OnMapgenInit(MapgenParams *mgparams)
|
||||
{
|
||||
SCRIPTAPI_PRECHECKHEADER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue