Commit Graph

27 Commits

Author SHA1 Message Date
sfan5 766e885a1b
Clean up/improve some scriptapi error handling code 2021-09-10 23:16:46 +02:00
Warr1024 52128ae11e
Add API for mods to hook liquid transformation events (#11405)
Add API for mods to hook liquid transformation events

Without this API, there is no reliable way for mods to be
notified when liquid transform modifies nodes and mods are
forced to poll for changes.  This allows mods to detect
changes to flowing liquid nodes and liquid renewal using
event-driven logic.
2021-07-09 09:08:40 -04:00
sfence b10091be9b
Add min_y and max_y checks for Active Block Modifiers (ABM) (#11333)
This check can be used by ABM to reduce CPU usage.
2021-06-20 17:21:35 +02:00
sfan5 de73f989eb
Overall improvements to log messages (#9598)
Hide some unnecessarily verbose ones behind --trace or disable them entirely.
Remove duplicate ones. Improve their contents in some places.
2020-04-08 20:13:23 +02:00
SmallJoker 8efa1de835 Check for 'action' field in ABMs & LBMs 2019-07-27 21:13:47 +02:00
Loïc Blot eef62c82a2
Modernize lua read (part 2 & 3): C++ templating assurance (#7410)
* 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
2018-06-30 17:11:38 +02:00
Loïc Blot d88c4e1822
LINT: add clang-tidy step (#6295)
* Implement new travis clang-tidy build step

* This step enable some rules and enforce one rule as error
* This permits to have some C++ quality rules based on clang & clang contributor guidelines

* Fix clang-tidy reported problems on push_back -> emplace_back
2018-04-01 23:57:55 +02:00
Vitaliy 20a85d76d9 Move files to subdirectories (#6599)
* Move files around
2017-11-08 23:56:20 +01:00
Kahrl 17fd5fe935 Make INodeDefManager::getIds return a vector, not a set 2017-09-12 19:31:46 +02:00
sapier f5070b4454 Added lua tracebacks to some errors where you have been blind to what… (#5043)
* Added lua tracebacks to some errors where you have been blind to what actually went wrong
2017-01-15 13:36:53 +01:00
Rogier 4b17105dc4 Emergeblocks: Fix occasional crash
Modification of the emergeblocks internal state was not protected
by a lock, causing a race condition.
This can be reproduced by repeatedly running emergeblocks for an
already-generated section of the map (with multiple emerge threads).
2016-10-16 01:13:16 +01:00
est31 725cb4eb07 s_env.{cpp, h} cleanups
* Replace string by-val passing with const reference
* Fix code style
* Remove redundant `int table` definition and indentation level
2016-03-07 19:54:26 +01:00
est31 d494733839 Add minetest.register_lbm() to run code on block load only 2016-03-07 19:54:26 +01:00
kwolekr c2b5da735e Add callback parameter for core.emerge_area() 2015-11-02 18:43:09 -05:00
paramat 3b9f99e0d6 ABMs: Make catch-up behaviour optional
Default is true for backwards compatibility
Update lua_api.txt
2015-10-18 16:42:59 +01:00
kwolekr 2b04ab874d SAPI: Track last executed mod and include in error messages 2015-08-12 23:56:12 -04:00
kwolekr 5e2753c712 Expose mapgen parameters on scripting init
Add minetest.get_mapgen_params()
Deprecate minetest.register_on_mapgen_init()
2014-12-29 12:59:59 -05:00
kwolekr 8fe1d3fc2e Expose mapgen chunksize in on_mapgen_init callbacks 2014-12-14 18:46:46 -05:00
ShadowNinja 741df993ff Fix object reference pushing functions when called from coroutines 2014-10-07 16:37:45 -04:00
sapier 2a5c88bde1 Don't call a player event without having player to do a event for 2014-08-21 17:29:26 +02:00
ShadowNinja c4359ff65c Use "core" namespace internally 2014-05-08 13:02:04 -04:00
sapier d3ee617f37 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
2014-05-07 21:46:27 +02:00
kwolekr 83bafbe08b Make flag strings clear specified flag with 'no' prefix
Remove flagmask field from set_mapgen_params table
Add small bits of needed documentation
2014-02-08 17:50:59 -05:00
ShadowNinja 458045d49f Fix crash when a error occurs in a globalstep callback 2014-02-03 18:15:03 -05:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02:00
kwolekr 2e292b67a0 Add Lua on_mapgen_init callback, and minetest.set_mapgen_params API 2013-06-27 22:35:35 -04:00
sapier ab43377577 Move scriptapi to separate folder (by sapier)
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)
2013-05-25 00:51:02 +02:00