aboutsummaryrefslogtreecommitdiff
path: root/doc/lua_api.txt
Commit message (Expand)AuthorAge
* Bump formspec version (#11980)Vincent Robinson2022-01-23
* Fix consistency of sky sun/moon texture behavioursfan52022-01-22
* Allow resetting celestial vault elements by leaving its arguments empty (#11922)Zughy2022-01-22
* Fix damage wraparound if very high damage (#11872)Wuzzy2022-01-06
* Fix incorrect bit positions in paramtype documentationAritz Erkiaga2022-01-06
* Better document sky_color scope (#11892)Zughy2022-01-01
* Add padding[] element to formspecs (#11821)Vincent Robinson2021-12-30
* Remove wrong function from lua_api.txtsfan52021-12-19
* Disable inventory if player's inventory formspec is blank (#11827)ROllerozxa2021-12-13
* Add pauloue's ItemStack example to docs (#9853)Francisco2021-12-10
* Implemented disconnect_player (#10492)Corey Powell2021-11-26
* Add Lua bitop library (#9847)Lejo2021-11-26
* Add backwards-compatible behaviour if too few CAO textures specifiedsfan52021-11-22
* Allow for Game-Specific Menu Music (#11241)ExeVirus2021-11-22
* Lua API: Add `rmdir`, `cpdir` and `mvdir` (#9638)Elijah Duffy2021-11-10
* Fix number of tool uses being off by 1..32767 (#11110)Wuzzy2021-10-31
* Fix item duplication if player dies during interact callback (alternative) (#...sfan52021-10-25
* Add embedded PNG texture modifier (#11498)hecks2021-10-13
* Add get_server_max_lag() (#11671)Wuzzy2021-10-05
* Split liquid_viscosity to liquid_viscosity and move_resistance (#10810)Wuzzy2021-10-01
* Add feature table entry for new dynamic media APIsfan52021-09-19
* Split vector.new into 3 constructorsDS2021-09-10
* Dynamic_Add_Media v2 (#11550)sfan52021-09-09
* Add group-based tool filtering for node drops (#10141)Treer2021-08-27
* Fix 6th line of infotext being cut off in half (#11456)Wuzzy2021-08-23
* Clarify the meaning of "rightclick"/"use" in documentation (#11471)Wuzzy2021-08-16
* Add disable_settings to game.conf to get rid of "Enable Damage"/"Creative Mod...Hugues Ross2021-08-12
* Add a simple PNG image encoder with Lua API (#11485)hecks2021-07-29
* Add bold, italic and monospace font styling for HUD text elements (#11478)sfan52021-07-27
* Improve documentation of tools (#11128)Wuzzy2021-07-27
* Document glasslikeliquidlevel merge bits (#11479)random-geek2021-07-25
* Add wallmounted support for plantlike and plantlike_rooted nodes (#11379)Wuzzy2021-07-15
* Fix documented default colors for set_skyHugues Ross2021-07-14
* Fix typo in lua_api.txthecktest2021-07-10
* Use `persistence` instead of `persist` in NoiseParams examplesLean Rada2021-07-10
* Add API for mods to hook liquid transformation events (#11405)Warr10242021-07-09
* Document hypertext escaping (#11374)Wuzzy2021-06-22
* Add min_y and max_y checks for Active Block Modifiers (ABM) (#11333)sfence2021-06-20
* Add metatables to lua vectors (#11039)DS2021-06-04
* Add core.compare_block_status function (#11247)SmallJoker2021-05-30
* Fix base64 validation and add unittests (#10515)Lars Müller2021-05-30
* UnitSAO: Prevent circular attachmentsSmallJoker2021-05-29
* Improve liquid documentation (#11158)Wuzzy2021-05-06
* Add `minetest.colorspec_to_colorstring` (#10425)Vincent Robinson2021-04-23
* Put torch/signlike node on floor if no paramtype2 (#11074)Wuzzy2021-04-20
* Also return the ObjectRef from minetest.spawn_falling_node() (#11184)benrob03292021-04-13
* Modifying fall damage via armor group (#11080)Wuzzy2021-04-11
* Add vector.to_string and vector.from_string (#10323)DS2021-04-05
* Sort out cURL timeouts and increase defaultsfan52021-04-02
* Add `math.round` and fix `vector.round` (#10803)Vincent Robinson2021-04-02
"hl opt">= 2 * scaleToDefault(player, "breath") if hud.id_breathbar == nil then local hud_def = table.copy(breath_bar_definition) hud_def.number = number hud.id_breathbar = player:hud_add(hud_def) else player:hud_change(hud.id_breathbar, "number", number) end elseif hud.id_breathbar then player:hud_remove(hud.id_breathbar) hud.id_breathbar = nil end end local function cleanup_builtin_statbars(player) local name = player:get_player_name() if name == "" then return end hud_ids[name] = nil end local function player_event_handler(player,eventname) assert(player:is_player()) local name = player:get_player_name() if name == "" or not hud_ids[name] then return end if eventname == "health_changed" then update_builtin_statbars(player) if hud_ids[name].id_healthbar then return true end end if eventname == "breath_changed" then update_builtin_statbars(player) if hud_ids[name].id_breathbar then return true end end if eventname == "hud_changed" or eventname == "properties_changed" then update_builtin_statbars(player) return true end return false end function core.hud_replace_builtin(hud_name, definition) if type(definition) ~= "table" or definition.hud_elem_type ~= "statbar" then return false end if hud_name == "health" then health_bar_definition = definition for name, ids in pairs(hud_ids) do local player = core.get_player_by_name(name) if player and ids.id_healthbar then player:hud_remove(ids.id_healthbar) ids.id_healthbar = nil update_builtin_statbars(player) end end return true end if hud_name == "breath" then breath_bar_definition = definition for name, ids in pairs(hud_ids) do local player = core.get_player_by_name(name) if player and ids.id_breathbar then player:hud_remove(ids.id_breathbar) ids.id_breathbar = nil update_builtin_statbars(player) end end return true end return false end -- Append "update_builtin_statbars" as late as possible -- This ensures that the HUD is hidden when the flags are updated in this callback core.register_on_mods_loaded(function() core.register_on_joinplayer(update_builtin_statbars) end) core.register_on_leaveplayer(cleanup_builtin_statbars) core.register_playerevent(player_event_handler)