aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
AgeCommit message (Collapse)Author
2020-04-11Move serveractiveobject & unitsaoLoic Blot
Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h} Move UnitSAO class to dedicated files
2020-04-11Various features and fixessfan5
2020-04-11Implement minetest.sound_fade()sfan5
2020-04-11scriptapi: Sort out ServerEnvironment / Environment distinction properlysfan5
The API implementation is shared between CSM and SSM. Functions should retrieve a plain env when they do not need any server-specific functions.
2020-04-08Work around LuaJIT issues on aarch64 (#9614)sfan5
- Move the text segment below the 47-bit limit, needed for script_exception_wrapper which must be lightuserdata - Replace CUSTOM_RIDX_SCRIPTAPI with full userdata
2020-04-08Overall improvements to log messages (#9598)sfan5
Hide some unnecessarily verbose ones behind --trace or disable them entirely. Remove duplicate ones. Improve their contents in some places.
2020-03-11minetest.get_content_id: error if the node does not exist (#9458)HybridDog
If a mod creator makes a typing mistake, this function now causes an error instead of returning the id of "ignore".
2020-03-10minetest,get_connected_players: Return empty table at load time (#9493)sfan5
2020-03-08Fix star visilibity and documentation (since 946c03c6)Jordan Snelling
Fix memory leak (unused allocation) Fix star rendering Rename sky color struct Fix stars on android Remove extraneous .data() from android star draw
2020-03-05set_sky improvements, set_sun, set_moon and set_starsJordach
2020-03-05Fix pathfinder bugs: returning nil frequently, broken A*, jump through solid ↵Wuzzy
nodes (#9339) * Fix pathfinder fail when startpos is over air * Note down pathfinder restrictions * Implement real A* search * Pathfinder: Implement buildPath non-recursively * Update find_path documentation * Pathfinder: Check if jump path is unobstructed * Pathfinder: Fix drop check first checking upwards * Pathfinder: Return nil if source or dest are solid * Pathfinder: Use priority queue for open list
2020-03-03Fix core.get_player_by_name() returning unusable ObjectRefsfan5
Followup to the previous commit.
2020-03-03Fix core.get_connected_players() returning unusable ObjectRefssfan5
This bug is only exposed by 91eef646a59575bd9ae792e257bb6ad12fafc0b1 independent of the move of get_connected_players from Lua to C++. Previously, there would be a small time window where the SAO had its peer ID set to PEER_ID_INEXISTENT but the RemotePlayer was still linked to the SAO, resulting in an ObjectRef that crashed on certain function calls (#9387).
2020-02-25Fix potential problem with core.get_connected_players()sfan5
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.
2020-02-23Refactor Script API's log_deprecatedsfan5
2020-02-11Script API: Check that SAOs are still usable before attempting to use themsfan5
2020-02-01Improve core.sound_play with ephemeral sounds and player exclusionsfan5
2020-01-25Settings: Add get_flags API for mapgen flags (mg_flags, mgv6_spflags, ...) ↵SmallJoker
(#9284) Unified flags handling in C++ and Lua Settings API -> Reading only, for now. Writing can be implemented later, if needed. API function to read the currently active flags -> was impossible from Lua Co-authored-by: Wuzzy <wuzzy2@mail.ru>
2019-12-24Use appropriate LC_ locale macro for Windows (#9230)Montandalar
* Wrap LC_ macro in ifdef Windows does not have LC_MESSAGES in locale.h, so use LC_ALL on that platform
2019-12-07Attachments: Fix interpolation from (0,0,0) after detachSmallJoker
GenericCAO::getPosition() did not take the camera offset into account LocalPlayer attachment cleanup: Use sane getParent() function Make that getPosition() (GenericCAO and LocalPlayer) always return the absolute position
2019-11-11[CSM] Fix and improve minetest.get_language()sfan5
Previously this method would accidentally reset the locale and break everything.
2019-11-11[CSM] Implement minetest.get_csm_restrictions()sfan5
fixes #8068
2019-11-11Fix camera:get_offset() in CSMsfan5
2019-11-11[CSM] Expose more env functionssfan5
2019-11-11Refactor CSM restriction code a bitsfan5
This also fixes find_node_near restrictions being ineffective.
2019-11-09[CSM] Remove non-functional minetest.get_day_count()sfan5
2019-11-09Introduce get_modpath() for CSMsfan5
2019-10-29Change some usages of "deprecated" to "obsolete" (#9062)random-geek
"Deprecated" means that something is still in use, but is unsupported and needs to be removed. "Obsolete" means it is already out of use.
2019-10-23Allow calling ItemStack with no arguments (#8783)Paul Ouellette
2019-09-24Fix some reference counters (memleak) (#8981)SmallJoker
Fix some reference counters (memleak) Map::dispatchEvent: Allocation safety using references
2019-09-22Punchwear (improved) (#8959)sfan5
2019-09-21Fix AreaStore's IDs persistence (#8888)SmallJoker
Improve documentation Read old formats Fix free ID function. Return first gap in map
2019-09-21Wieldhand: Specify which ItemStack to use (#8961)SmallJoker
Makes 'get_wield_item' to return the "main" ItemStack
2019-09-19Add support for per-player FOV overrides and multipliersAnand S
2019-09-14Formspecs: Introduce formspec_version to modsSmallJoker
2019-09-14Load CSM environment after the restrictions are knownSmallJoker
Safety-guards for CSM callbacks to abort on a bad implementation Only run callbacks when the mods are loaded (and with it: builtin) Duplication checks inside constructors
2019-08-24Inventory: Send dirty lists where appropriate (#8742)SmallJoker
This change reduces the amount of sent data towards clients. Inventory lists that are already known to the player are skipped, saving quite some data over time. Raises protocol version to 38 to ensure correct backwards-compatible code.
2019-08-24Add ItemStack:get_description() to get tooltip (#8847)Paul Ouellette
2019-08-14Add function `minetest.read_schematic`upsilon
2019-08-12Add support for set_formspec_prepend in main menu (#8611)rubenwardy
2019-08-10Fix some issues with minetest.clear_craft (#8712)Paul Ouellette
* Fix some issues with minetest.clear_craft - Fix memory leak - Fix crafts with an output count not being cleared when clearing by input. - Fix recipe list being reversed when clearing by input. * Add CraftInput::empty()
2019-08-10Merge pull request #8776 from osjc/FixGetNodeJozef Behran
Finish getNode cleanup
2019-08-10Implement adding velocity to player from Luasfan5
The intended usecase is knockback, but there's potential for more.
2019-08-07Unify wield item handling (#8677)SmallJoker
This moves the wield item functions to Player and the tool utils for range calculation Also 'local_inventory' was removed due to redundancy in Client
2019-07-30Move the clamping of hp/breath when their maximums change to ↵Beha
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).
2019-06-06HTTP API: Allow binary downloads and headers (#8573)SmallJoker
Add minetest.features.httpfetch_binary_data
2019-05-21Fix forgotten PlayerSAO cast in a90f2efSmallJoker
2019-05-21Check for out-of-bounds breath when setting breath_max (#8493)ANAND ツ
2019-05-21l_mapgen.cpp: Fix LINT broken since b1b40feSmallJoker