aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
AgeCommit message (Collapse)Author
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
2019-05-18Allow multiple cave liquids in a biome definition (#8481)Paramat
This allows games to specify biome cave liquids and avoid the old hardcoded behaviour, but preserves the ability to have multiple cave liquids in one biome, such as lava and water. When multiple cave liquids are defined by the biome definition, make each entire cave use a randomly chosen liquid, instead of every small cave segment using a randomly chosen liquid. Plus an optimisation: Don't place nodes if cave liquid is defined as 'air'
2019-05-12Move HTTP request logging to infostream (#8526)ANAND ︻气デ═一
2019-04-28Force send a mapblock to a player (#8140)sofar
* Force send a mapblock to a player. Send a single mapblock to a specific remote player. This is badly needed for mods and games where players are teleported into terrain which may be not generated, loaded, or modified significantly since the last player visit. In all these cases, the player currently ends up in void, air, or inside blocks which not only looks bad, but has the effect that the player might end up falling and then the server needs to correct for the player position again later, which is a hack. The best solution is to send at least the single mapblock that the player will be teleported to. I've tested this with ITB which does this all the time, and I can see it functioning as expected (it even shows a half loaded entry hallway, as the further blocks aren't loaded yet). The parameter is a blockpos (table of x, y, z), not a regular pos. The function may return false if the call failed. This is most likely due to the target position not being generated or emerged yet, or another internal failure, such as the player not being initialized. * Always send mapblock on teleport or respawn. This avoids the need for mods to send a mapblock on teleport or respawn, since any call to `player:set_pos()` will pass this code.
2019-04-11Add node field to PlayerHPChangeReason table (#8368)Paul Ouellette
2019-04-07Add deprecation warnings for ObjectRef:get/set_attribute (#8443)ANAND
2019-03-12HPChange Reason: Fix push after free, and type being overwritten (#8359)rubenwardy
* HPChange Reason: Fix push after free, and type being overwritten Fixes #8227 and #8344
2019-03-05Hide uninstall package button on unmodifiable paths (#8255)rubenwardy