Commit Graph

21 Commits

Author SHA1 Message Date
sfan5 3cac17d23e
Lua on each mapgen thread (#13092) 2024-02-13 22:47:30 +01:00
Jude Melton-Houghton 7632af3c73
Consolidate API object code (#12728)
Co-authored-by: sfan5 <sfan5@live.de>
2022-10-04 08:31:36 -04:00
rubenwardy 89dd05fdf3
Fix segfault in deprecation logging due to tail call, log by default (#10174) 2020-10-31 18:19:23 +00:00
Loïc Blot 454dbf83a9
Server class code cleanups (#9769)
* Server::overrideDayNightRatio doesn't require to return bool
There is no sense to sending null player, the caller should send a valid object

* Server::init: make private & cleanup
This function is always called before start() and loads some variables which can be loaded in constructor directly.
Make it private and call it directly in start

* Split Server inventory responsibility to a dedicated object

This splits permit to found various historical issues:
* duplicate lookups on player connection
* sending inventory to non related player when a player connects
* non friendly lookups on detached inventories ownership

This reduce the detached inventory complexity and also increased the
lookup performance in a quite interesting way for servers with thousands
of inventories.
2020-05-07 22:38:41 +02:00
sfan5 8a03097450 script: Put getGuiEngine() inside a client-only #ifdef 2020-04-27 06:58:34 +02:00
SmallJoker 49509d2f74
Log deprecated Lua function calls (#7491) 2018-07-01 12:31:49 +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 180e551c56
Modernize lua read (part 1): C++ templating insurance (#7394)
* Modernize lua read (part 1): C++ templating assurance

Implement the float reader
2018-06-04 22:38:07 +02:00
Loïc Blot 162ffd7fba
Fix isNan on setYaw Lua call (#7380)
* Fix isNan on setYaw Lua call
2018-05-31 22:52:08 +02:00
Loïc Blot 921151d97a C++ modernize: Pragma once (#6264)
* Migrate cpp headers to pragma once
2017-08-17 22:19:39 +02:00
Loïc Blot 85511a642f Cleanup various headers to reduce compilation times (#6255)
* Cleanup various headers to reduce compilation times
2017-08-16 22:11:45 +02:00
ShadowNinja 43d1f375d1 Use a settings object for the main settings
This unifies the settings APIs.

This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.
2017-05-06 15:33:19 -04:00
red-001 88df9fb5b6 Add `get_wielded_item` 2017-03-13 23:56:05 +01:00
red-001 cb3a61f8db [CSM] Add method that display chat to client-sided lua. (#5089) (#5091)
* squashed: [Client-sided scripting] Don't register functions that don't work. (#5091)
2017-03-13 23:56:05 +01:00
est31 0a413265cb Document for api functions that rely on current_modname, that it doesn't work when not loading mods 2015-04-08 23:05:26 +02:00
kwolekr 0df736173e Schematics: Prepend mod path to relative schematic filepaths 2015-04-08 00:28:56 -04:00
ShadowNinja 31fe72dbac Remove lua_State parameter from LuaError::LuaError 2014-03-15 16:28:59 -04:00
ShadowNinja 49cec3f782 Handle LuaErrors in Lua -> C++ calls on LuaJIT 2013-12-18 16:35:55 -05:00
ShadowNinja 371b39a09a Pass a errfunc to lua_pcall to get a traceback 2013-11-15 14:13:31 -05:00
Kahrl 4e1f50035e Omnicleanup: header cleanup, add ModApiUtil shared between game and mainmenu 2013-08-14 21:03:33 +02: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