aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_entity.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix entity related bugssfan52022-06-151-2/+5
| | | | | * Make minetest.add_entity() binary-safe * Fix on_death pushing dummy ObjectRef instead of nil
* on_deactivate: distinguish removal and unloading (#11931)Lars Müller2022-06-111-3/+3
| | | Sometimes you need to be able to do removal-related cleanup, such as removing files from disk, or entries from a database. staticdata obviously isn't suitable for large data. The data shouldn't be removed if the entity is unloaded, only if it is removed.
* Fix damage wraparound if very high damage (#11872)Wuzzy2022-01-061-1/+1
|
* Add on_deactivate callback for luaentities (#10723)hecks2021-01-021-0/+26
|
* Expose collision information to LuaEntity on_stepsfan52020-04-271-4/+8
|
* Move the clamping of hp/breath when their maximums change to ↵Beha2019-07-301-3/+3
| | | | | read_object_properties(). (#8689) This prevents set_properties() calls that have nothing to do with hp_max or breath_max overriding the saved hp before another mod has the chance to set a player's intended hp_max (such as in on_joinplayer).
* Consistent HP and damage types (#8167)SmallJoker2019-02-101-18/+0
| | | | | Remove deprecated HUDs and chat message handling. Remove unused m_damage variable (compat break). HP: s32 for setter/calculations, u16 for getter.
* Modernize lua read (part 2 & 3): C++ templating assurance (#7410)Loïc Blot2018-06-301-2/+2
| | | | | | | | | * Modernize lua read (part 2 & 3): C++ templating assurance Implement the boolean reader Implement the string reader Also remove unused & unimplemented script_error_handler Add a reader with default value
* Allow damage for attached objects, add attach/detach callbacks (#6786)SmallJoker2018-04-301-28/+25
| | | * Allow right-clicking on attached LuaEntities
* on_death: Fix callback number of pushed arguments (Fixes #6451)SmallJoker2017-09-211-1/+1
|
* Add LuaEntity on_death callback (#6177)Loïc Blot2017-07-271-0/+28
| | | | | | Add LuaEntity on_death callback This fixes #5474
* [CSM] Add event on_place_node API lua (#5548)Vincent Glize2017-04-291-1/+1
| | | | * [CSM] Add event on_place_node API lua
* Hardware coloring for itemstacksDániel Juhász2017-04-081-2/+3
| | | | | | | | | | Adds the possibility to colorize item stacks based on their metadata. In the item/node definition you can specify palette (an image file) and color (fallback color if the item has no palette or metadata). Then you can add palette_index to the metadata. Dropped itemstacks with different colors do not merge.
* Tell on_punch to expect a return valueDuane Robertson2017-02-011-1/+1
| | | | | The return value should be interpreted as a boolean saying whether the lua on_punch function handled damage or the system needs to.
* Make entity on_punch have same signature and behaviour as player on_punchsapier2017-01-281-6/+9
|
* Push error handler afresh each time lua_pcall is usedKahrl2015-08-271-10/+21
| | | | | Fixes "double fault" / "error in error handling" messages (issue #1423) and instead shows a complete backtrace.
* SAPI: Track last executed mod and include in error messageskwolekr2015-08-121-6/+14
|
* Improve Script CPP API diagnosticskwolekr2015-08-051-10/+5
|
* Fix object reference pushing functions when called from coroutinesShadowNinja2014-10-071-4/+4
|
* Use "core" namespace internallyShadowNinja2014-05-081-13/+13
|
* Only push the Lua error handler onceShadowNinja2014-04-271-43/+32
|
* Pass a errfunc to lua_pcall to get a tracebackShadowNinja2013-11-151-19/+41
|
* Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenuKahrl2013-08-141-4/+1
|
* Add an option to disable object <-> object collision for Lua entitiesPilzAdam2013-07-201-0/+1
|
* Move scriptapi to separate folder (by sapier)sapier2013-05-251-0/+267
On the lua side, notably minetest.env:<function>(<args>) should now be replaced by minetest.<function>(<args>). The old way is and will stay supported for a long time. Also: Update and clean up lua_api.txt (by celeron55) Move EnvRef to lua and remove add_rat and add_firefly (by kahrl) Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)