aboutsummaryrefslogtreecommitdiff
path: root/builtin/game/misc.lua
AgeCommit message (Collapse)Author
2022-11-09Fix typos and en_US/en_GB inconsistency in various files (#12902)Abdou-31
2022-05-10Use native packer to transfer globals into async env(s)sfan5
2022-05-02Async environment for mods to do concurrent tasks (#11131)sfan5
2022-05-02Reorganize some builtin functions in preparation for async envsfan5
2021-12-18Don't let HTTP API pass through untrusted functionsfan5
This has been a problem since the first day, oops.
2021-11-26Implemented disconnect_player (#10492)Corey Powell
Co-authored-by: rubenwardy <rw@rubenwardy.com>
2021-10-22Fix incorrect error message in core.encode_pngsfan5
2021-09-09Dynamic_Add_Media v2 (#11550)sfan5
2021-08-09Remove statement semicolons from a lua scripthecks
2021-07-29Add a simple PNG image encoder with Lua API (#11485)hecks
* Add a simple PNG image encoder with Lua API Add ColorSpec to RGBA converter Make a safety wrapper for the encoder Create devtest examples Co-authored-by: hecktest <> Co-authored-by: sfan5 <sfan5@live.de>
2021-06-04Add metatables to lua vectors (#11039)DS
Add backwards-compatible metatable functions for vectors.
2021-03-19Builtin: Translatable join, leave, profiler msgs (#11064)Wuzzy
2021-02-01Revise dynamic_add_media API to better accomodate future changessfan5
2020-10-06Add minetest.get_artificial_light and minetest.get_natural_light (#5680)HybridDog
Add more detailed light detection functions, a function to get the artificial light (torches) and a function to get the sunlight as seen by the player (you can specify timeofday). Co-authored-by: rubenwardy <rw@rubenwardy.com>
2020-05-29Add minetest.is_creative_enabledWuzzy
2020-02-23Move core.get_connected_players() implementation to C++sfan5
Keeping the ObjectRefs around in a table isn't ideal and this allows removing the somewhat nonsensical is_player_connected() added in 86ef7147.
2019-08-06Add luacheck to check builtin (#7895)rubenwardy
2018-07-17Builtin: Replace deprecated function calls (#7561)SmallJoker
2018-07-09Builtin/../misc.lua: Replace minetest. with core., improve codestyle (#7540)ClobberXD
2018-07-01Make the server status message customizable (#7357)SmallJoker
Remove now redundant setting show_statusline_on_connect Improve documentation of `minetest.get_server_status`
2018-02-25is_area_protected: Rename from intersects_protection (#7073)SmallJoker
* is_area_protected: Rename from intersects_protection Return first protected position Clarify docs: Mods may overwrite the function
2018-02-05Add minetest.is_player (#7013)you
* Add minetest.is_player * First use for is_player
2018-01-23Intersects_protection(): Move from Minetest Game to builtin (#6952)Paramat
A useful function that applies 'core.is_protected()' to a 3D lattice of points evenly spaced throughout a defined volume, with a parameter for the maximum spacing of points.
2017-09-11Allow the join/leave message to be overridden by mods.red-001
2017-05-06Use a settings object for the main settingsShadowNinja
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-04-15Implement delayed server shutdown with cancelation (#4664)Loïc Blot
2017-03-17Give CSM access to use `core.colorize()` (#5113)red-001
2017-03-13[CSM] sound_play & sound_stop support + client_lua_api doc (#5096)Loïc Blot
* squashed: CSM: Implement register_globalstep * Re-use fatal error mechanism from server to disconnect client on CSM error * Little client functions cleanups * squashed: CSM: add core.after function * core.after is shared code between client & server * ModApiUtil get_us_time feature enabled for client
2017-01-18Add minetest.player_exists() (#5064)rubenwardy
2016-12-03Don't send a join message in singleplayer mode.red-001
2016-11-23Make supplying empty formspec strings close the formspec (#4737)orwell96
This will only happen if the formname matches or if formname is "".
2016-10-01Fix typo in core.after (#4560)Rui
2016-08-22Move on join and on leave messages to lua (#4460)Xunto
2016-07-26Builtin: Fix check for a player object in core.check_player_privsTim
core.check_player_privs accepts as first argument a name or player object, but just tested for a string. This caused crashes inside builtin, when being passed any unexpected types. This provides a better (duck-typing like) test, better error reporting.
2016-05-31Add colored text (not only colored chat).Ekdohibs
Add documentation, move files to a proper place and avoid memory leaks. Make it work with most kind of texts, and allow backgrounds too.
2016-05-31Colored chat working as expected for both freetype and non-freetype builds. ↵TriBlade9
@nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/
2016-04-21Fix timer initialization.Auke Kok
This fixes the problem that the first timer tick is an overrun and causes all timers to expire immediately. replaces #4003
2016-03-06Faster insertion into tableRui914
2016-02-22Add Lua interface to HTTPFetchRequestJeija
This allows mods to perform both asynchronous and synchronous HTTP requests. Mods are only granted access to HTTP APIs if either mod security is disabled or if they are whitelisted in any of the the secure.http_mods and secure.trusted_mods settings. Adds httpfetch_caller_alloc_secure to generate random, non-predictable caller IDs so that lua mods cannot spy on each others HTTP queries.
2016-01-29New timer design.Auke Kok
I could honestly not make much sense of the timer implementation that was here. Instead I've implemented the type of timer algorithm that I've used before, and tested it instead. The concept is extremely simple: all timers are put in an ordered list. We check every server tick if any of the timers have elapsed, and execute the function associated with this timer. We know that many timers by themselves cause new timers to be added to this list, so we iterate *backwards* over the timer list. This means that new timers being added while timers are being executed, can never be executed in the same function pass, as they are always appended to the table *after* the end of the table, which we will never reach in the current pass over all the table elements. We switch time keeping to minetest.get_us_time(). dtime is likely unreliable and we have our own high-res timer that we can fix if it is indeed broken. This removes the need to do any sort of time keeping.
2015-10-22Add more ways to pass data to check_player_privsRobert Zenz
The callback can now be invoked with either the player object or name as the first parameter, and with either a table or a list of strings, like this: minetest.check_player_privs(player_name, { shout = true, fly = true }) minetest.check_player_privs(player_name, "shout", "fly") minetest.check_player_privs(player, { shout = true, fly = true }) minetest.check_player_privs(player, "shout", "fly")
2015-09-23Add /emergeblocks command and core.emerge_area() Lua APIkwolekr
2015-08-12SAPI: Track last executed mod and include in error messageskwolekr
2015-06-06Decrease minetest.after globalstep lagHybridDog
* abort if theres no active timer * only reduce the timer.time of all timers when its necessary * move updating timers_to_add into a seperate function
2015-05-12Add code to support raillike group namesNovatux
2015-01-15Simplify deleteblocks chat command argument parsingkwolekr
Add optional core.pos_to_string decimal place rounding Move core.string_to_pos to builtin/common/misc_helpers.lua for consistency
2014-07-16Fix indexing error in timer processingZefram
2014-05-08Use "core" namespace internallyShadowNinja
2014-05-07Organize builtin into subdirectoriesShadowNinja