49 Commits
Author SHA1 Message Date
proller 069677c93d Merge tag '5.11.0' into wip5.11.0
5.11.0
2025-03-23 17:12:49 +01:00
grorp eeb6cab4c4 In-game settings menu using separate Lua environment (#15614) 2025-01-19 13:07:04 -05:00
proller 60bda83c1b Merge tag '5.10.0-rc1' into wip5.10.0 2024-11-10 16:41:17 +01:00
proller 1316346fce Merge 5.9.0 2024-11-03 17:00:40 +01:00
Wuzzy ad4b13a0e9 Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
kromka-chleba a6ba5304c4 Add new vector utils (ceil, sign, abs, random_in_area) (#14807) 2024-08-31 11:43:52 +02:00
sfan5 f87994edc7 Use better randomseed for Lua too
see e985b7a0bf

This solves a concrete issue with async workers generating the same
random numbers (as discovered in #14518).
2024-04-06 12:10:21 +02:00
fc80f65a6d Try to preserve metatable when exchanging data with the async env (#14369)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-03-06 18:04:49 +01:00
sfan5 3cac17d23e Lua on each mapgen thread (#13092) 2024-02-13 22:47:30 +01:00
proller ccb9ab5952 Merge commit 'b8aaad4f1' into wip5.7.0 2023-03-25 17:56:12 +03:00
Jude Melton-Houghton 0fc97a1483 Use a Lua error handler that calls tostring (#11913) 2022-12-15 07:37:49 -05:00
Jude Melton-Houghton aac1635bf7 Have minetest.debug call tostring (#13004) 2022-11-29 07:12:08 -05:00
proller 81051b5653 Merge tag '5.6.0' into wip5.6
5.6.0
2022-08-06 21:01:11 +03:00
proller 944d304199 wip lua 2022-07-08 04:53:55 +03:00
proller e54e8e0ec5 wip 2022-06-17 21:45:32 +03:00
sfan5 e7659883cc Async environment for mods to do concurrent tasks (#11131) 2022-05-02 20:56:06 +02:00
proller d92ac070c8 initial with conflicts 2022-03-08 20:13:09 +03:00
ShadowNinja 44c489d7bd 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.

 Author:    ShadowNinja <shadowninja@minetest.net>
 Date:      Fri Dec 12 14:49:19 2014 -0500
 You are currently cherry-picking commit 43d1f375d.
2021-11-14 03:15:12 +03:00
DS 8f085e02a1 Add metatables to lua vectors (#11039)
Add backwards-compatible metatable functions for vectors.
2021-06-04 21:22:33 +02:00
Wuzzy c12e9cdcba Fail gracefully if main_menu_script has bad value (#10938)
Builtin: Move :close() before dofile
2021-02-19 19:59:48 +01:00
rubenwardy 60bab8b2d7 Add HTTP API to main menu (#9998) 2020-06-06 17:17:08 +01:00
red-001 1e94a7feaf Move setlocale from Lua to C++. 2018-02-08 15:38:34 +01:00
red-001 f3ad75691a Create a filesystem abstraction layer for CSM and only allow accessing files that are scanned into it. (#5965)
* Load client-side mods into memory before executing them.

This removes the remaining filesystem access that client-sided mods had and it will hopefully make then more secure.

* Lua Virtual filesystem: don't load the files into memory just scan the filenames into memory.

* Fix the issues with backtrace

* fix most of the issues

* fix code style.

* add a comment
2017-06-30 20:14:39 +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 a50d07d39a [CSM] Improve security for client-sided mods (#5100) 2017-03-13 23:56:05 +01:00
Loic Blot 2efae3ffd7 [CSM] Client side modding
* rename GameScripting to ServerScripting
* Make getBuiltinLuaPath static serverside
* Add on_shutdown callback
* Add on_receiving_chat_message & on_sending_chat_message callbacks
* ScriptApiBase: use IGameDef instead of Server
  This permits to share common attribute between client & server
* Enable mod security in client side modding without conditions
2017-03-13 23:56:05 +01:00
ShadowNinja bb154c2e1c Main menu tweaks 2017-01-13 18:13:43 -05:00
proller ca11f77895 fix 2016-10-29 14:59:18 +03:00
proller 40026cd9b5 android fixes 2016-10-29 14:31:24 +03:00
proller b4edee0d14 lua: enable strict 2016-09-17 16:21:51 +03:00
proller 133c73cc93 Merge remote-tracking branch 'minetest/master' 2016-04-08 18:16:42 +03:00
Rui914 92d4a73843 Mainmenu: Refactor tab UI code
- Use local variables for tabs in place of globals
 - Merge together if statements where possible
 - Replace manual table searching code with indexof where possible
2016-04-08 02:25:04 -04:00
proller 214bac50da Merge remote-tracking branch 'minetest/master' 2016-02-08 12:00:03 +03:00
Diego Martinez 430195381d builtin: Fix print crashing on nil "holes".
The engine implementation of `print` packs the varargs into a
table and passes the table directly to `table.concat`. If you
pass any value not supported by `table.concat` (particularly
`nil`), the server crashes. This is unexpected behavior, as
`print` is supposed to be able to work with anything.

This patch changes the implementation so it first converts
all arguments using `tostring`, which fixes the issue and
makes the custom `print` function compatible with the stock
Lua behavior.
2016-02-08 01:55:02 +01:00
proller 52fe7de610 Merge remote-tracking branch 'minetest/master' 2015-11-08 00:23:15 +03:00
est31 5e507c9829 Add server side ncurses terminal
This adds a chat console the server owner can use for administration
or to talk with players.
It runs in its own thread, which makes the user interface immune to
the server's lag, behaving just like a client, except timeout.
As it uses the same console code as the f10 console, things like nick
completion or a scroll buffer basically come for free.
The terminal itself is written in a general way so that adding a
client version later on is just about implementing an interface.

Fatal errors are printed after the console exists and the ncurses
terminal buffer gets cleaned up with endwin(), so that the error still
remains visible.

The server owner can chose their username their entered text will
have in chat and where players can send PMs to.
Once the username is secured with a password to prevent anybody to
take over the server, the owner can execute admin tasks over the
console.

This change includes a contribution by @kahrl who has improved ncurses
library detection.
2015-11-06 08:51:14 +01:00
proller 4c656b052b port freeminer settings 2015-10-21 21:17:06 +03:00
proller a5ef0bc92e Merge commit '2139d7d'
Conflicts:
	src/log.cpp
	src/log.h
	src/logoutputbuffer.h
2015-10-16 21:04:52 +03:00
ShadowNinja 2139d7d45f Refactor logging
- Add warning log level
- Change debug_log_level setting to enumeration string
- Map Irrlicht log events to MT log events
- Encapsulate log_* functions and global variables into a class, Logger
- Unify dstream with standard logging mechanism
- Unify core.debug() with standard core.log() script API
2015-10-14 01:03:54 -04:00
proller c097ec193f add multicraft support 2015-05-21 02:07:54 +03:00
proller 89ac278ff2 use mt menu in android (while fm broken) 2015-01-10 02:41:18 +03:00
proller 36a41abb30 allow run mt menu 2015-01-10 02:00:18 +03:00
proller f5c9cfa324 Merge remote-tracking branch 'minetest/master'
Conflicts:
	.travis.yml
	builtin/init.lua
	src/client.cpp
	src/defaultsettings.cpp
2014-11-20 18:35:40 +03:00
ShadowNinja a6ba042cf7 Add strict module
Also fix leaking globals found by it.
2014-11-19 12:40:54 -05:00
proller 85cd95d0ed Merge commit '9ffa88b' into merge3
Conflicts:
	src/guiEngine.cpp
2014-06-22 05:16:21 +04:00
sapier 9ffa88b558 Fix regression main_menu_script setting not working any longer 2014-06-14 21:20:09 +02:00
proller c8a88063d1 Merge remote-tracking branch 'minetest/master'
Conflicts:
	builtin/auth.lua
	builtin/builtin.lua
	builtin/chatcommands.lua
	builtin/game/falling.lua
	builtin/game/item.lua
	builtin/game/item_entity.lua
	builtin/misc.lua
	src/script/lua_api/l_env.cpp
	src/script/lua_api/l_env.h
2014-05-12 00:48:09 +04:00
ShadowNinja c4359ff65c Use "core" namespace internally 2014-05-08 13:02:04 -04:00
ShadowNinja 1cd512913e Organize builtin into subdirectories 2014-05-07 17:14:23 -04:00