aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
Commit message (Collapse)AuthorAge
* Reduce ServerEnvironment propagation (#9642)Loïc Blot2020-04-11
| | | | | | | | | | ServerEnvironment is a huge class with many accessors. In various places it's not needed Remove it to reduce the ServerEnvironment view. Idea here is to reduce size of some of our objects to transport lightweight managers and permit easier testing Pathfinder is now tied to a generic map, not a ServerMap, it can be ported to client
* Drop content_sao.{cpp,h}Loic Blot2020-04-11
| | | | | | | Move LuaEntitySAO to a new dedicated file Drop TestSAO (useless object) Drop the old static startup initialized SAO factory, which was pretty useless. This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
* Move PlayerSAO to dedicated filesLoic Blot2020-04-11
|
* Move serveractiveobject & unitsaoLoic Blot2020-04-11
| | | | | Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h} Move UnitSAO class to dedicated files
* Various features and fixessfan52020-04-11
|
* Implement minetest.sound_fade()sfan52020-04-11
|
* scriptapi: Sort out ServerEnvironment / Environment distinction properlysfan52020-04-11
| | | | | | The API implementation is shared between CSM and SSM. Functions should retrieve a plain env when they do not need any server-specific functions.
* Work around LuaJIT issues on aarch64 (#9614)sfan52020-04-08
| | | | - 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
* Overall improvements to log messages (#9598)sfan52020-04-08
| | | | Hide some unnecessarily verbose ones behind --trace or disable them entirely. Remove duplicate ones. Improve their contents in some places.
* minetest.get_content_id: error if the node does not exist (#9458)HybridDog2020-03-11
| | | If a mod creator makes a typing mistake, this function now causes an error instead of returning the id of "ignore".
* minetest,get_connected_players: Return empty table at load time (#9493)sfan52020-03-10
|
* Fix star visilibity and documentation (since 946c03c6)Jordan Snelling2020-03-08
| | | | | | | Fix memory leak (unused allocation) Fix star rendering Rename sky color struct Fix stars on android Remove extraneous .data() from android star draw
* set_sky improvements, set_sun, set_moon and set_starsJordach2020-03-05
|
* Fix pathfinder bugs: returning nil frequently, broken A*, jump through solid ↵Wuzzy2020-03-05
| | | | | | | | | | | | | | 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
* Fix core.get_player_by_name() returning unusable ObjectRefsfan52020-03-03
| | | | Followup to the previous commit.
* Fix core.get_connected_players() returning unusable ObjectRefssfan52020-03-03
| | | | | | | | | 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).
* Fix potential problem with core.get_connected_players()sfan52020-02-25
|
* Move core.get_connected_players() implementation to C++sfan52020-02-23
| | | | | Keeping the ObjectRefs around in a table isn't ideal and this allows removing the somewhat nonsensical is_player_connected() added in 86ef7147.
* Refactor Script API's log_deprecatedsfan52020-02-23
|
* Script API: Check that SAOs are still usable before attempting to use themsfan52020-02-11
|
* Improve core.sound_play with ephemeral sounds and player exclusionsfan52020-02-01
|
* Settings: Add get_flags API for mapgen flags (mg_flags, mgv6_spflags, ...) ↵SmallJoker2020-01-25
| | | | | | | | | | | (#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>
* Use appropriate LC_ locale macro for Windows (#9230)Montandalar2019-12-24
| | | | | * Wrap LC_ macro in ifdef Windows does not have LC_MESSAGES in locale.h, so use LC_ALL on that platform
* Attachments: Fix interpolation from (0,0,0) after detachSmallJoker2019-12-07
| | | | | | 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
* [CSM] Fix and improve minetest.get_language()sfan52019-11-11
| | | | | Previously this method would accidentally reset the locale and break everything.
* [CSM] Implement minetest.get_csm_restrictions()sfan52019-11-11
| | | | fixes #8068
* Fix camera:get_offset() in CSMsfan52019-11-11
|
* [CSM] Expose more env functionssfan52019-11-11
|
* Refactor CSM restriction code a bitsfan52019-11-11
| | | | This also fixes find_node_near restrictions being ineffective.
* [CSM] Remove non-functional minetest.get_day_count()sfan52019-11-09
|
* Introduce get_modpath() for CSMsfan52019-11-09
|
* Change some usages of "deprecated" to "obsolete" (#9062)random-geek2019-10-29
| | | | "Deprecated" means that something is still in use, but is unsupported and needs to be removed. "Obsolete" means it is already out of use.
* Allow calling ItemStack with no arguments (#8783)Paul Ouellette2019-10-23
|
* Fix some reference counters (memleak) (#8981)SmallJoker2019-09-24
| | | | | Fix some reference counters (memleak) Map::dispatchEvent: Allocation safety using references
* Punchwear (improved) (#8959)sfan52019-09-22
|
* Fix AreaStore's IDs persistence (#8888)SmallJoker2019-09-21
| | | | | Improve documentation Read old formats Fix free ID function. Return first gap in map
* Wieldhand: Specify which ItemStack to use (#8961)SmallJoker2019-09-21
| | | Makes 'get_wield_item' to return the "main" ItemStack
* Add support for per-player FOV overrides and multipliersAnand S2019-09-19
|
* Formspecs: Introduce formspec_version to modsSmallJoker2019-09-14
|
* Load CSM environment after the restrictions are knownSmallJoker2019-09-14
| | | | | | | 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
* Inventory: Send dirty lists where appropriate (#8742)SmallJoker2019-08-24
| | | | | 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.
* Add ItemStack:get_description() to get tooltip (#8847)Paul Ouellette2019-08-24
|
* Add function `minetest.read_schematic`upsilon2019-08-14
|
* Add support for set_formspec_prepend in main menu (#8611)rubenwardy2019-08-12
|
* Fix some issues with minetest.clear_craft (#8712)Paul Ouellette2019-08-10
| | | | | | | | | | | * 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()
* Merge pull request #8776 from osjc/FixGetNodeJozef Behran2019-08-10
| | | Finish getNode cleanup
* Implement adding velocity to player from Luasfan52019-08-10
| | | | The intended usecase is knockback, but there's potential for more.
* Unify wield item handling (#8677)SmallJoker2019-08-07
| | | | 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
* Move the clamping of hp/breath when their maximums change to ↵Beha2019-07-30
| | | | | 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).
* HTTP API: Allow binary downloads and headers (#8573)SmallJoker2019-06-06
| | | | Add minetest.features.httpfetch_binary_data