Commit Graph

723 Commits

Author SHA1 Message Date
SmallJoker
37a05ec8d6 Settings: Proper priority hierarchy
Remove old defaults system
Introduce priority-based fallback list
Use new functions for map_meta special functions
Change groups to use end tags

Unittest changes:
 * Adapt unittest to the new code
 * Compare Settings objects
2021-01-29 17:32:35 +01:00
rubenwardy
67aa75d444 Use JSON for favorites, move server list code to Lua ()
Co-authored-by: sfan5 <sfan5@live.de>
2021-01-22 15:08:57 +00:00
rubenwardy
4fcd000e20 MgOre: Fix invalid field polymorphism () 2021-01-21 19:08:06 +00:00
Zughy
45ccfe26fb Removed some obsolete code ()
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2021-01-21 18:17:09 +00:00
Zughy
ea5d6312c1 ObjectRef: fix some v3f checks () 2021-01-21 18:37:38 +01:00
rubenwardy
edd0836011 ContentDB: Add overwrite dialog when content is already installed () 2021-01-04 15:18:31 +00:00
hecks
dd5a732fa9 Add on_deactivate callback for luaentities () 2021-01-02 15:14:29 +01:00
Elias Fleckenstein
9250b5205a Add minetest.get_objects_in_area () 2020-12-29 16:50:09 +01:00
Lars Mueller
8f72d4b294 Fix minetest.is_nan 2020-12-24 22:07:04 +01:00
rubenwardy
2c3593b51e Fix unsafe cast in l_object 2020-12-23 22:24:58 +00:00
rubenwardy
664f5ce960 Add open user data button to main menu () 2020-12-19 13:27:15 +00:00
SmallJoker
fca4db4184 ObjectRef: Re-add legacy code for set_physics_override ()
These arguments are used at least by MTG beds and homedecor_common. A deprecation warning is shown to safely remove it in a future release.
2020-11-10 21:02:53 +01:00
Zughy
72b93ec0d7 Fix ObjectRef errors due to lua_isnil() ()
Treat 'none' values as 'nil'
2020-11-04 21:43:18 +01:00
SmallJoker
9c9344ceb3 Fix incorrect deprecation hints
"good" and "bad" were swapped in the process, resulting in wrong deprecation messages
2020-11-01 12:52:14 +01:00
rubenwardy
89dd05fdf3 Fix segfault in deprecation logging due to tail call, log by default () 2020-10-31 18:19:23 +00:00
Zughy
33b2c5f5b1 Clean up l_object.cpp ()
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-22 16:18:01 +01:00
Zughy
7499ebe46a Fix float argument check in minetest.set_timeofday() ()
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-13 20:28:53 +01:00
Zughy
2341a4aff1 Add ObjectRef:get_children() ()
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
2020-10-13 20:27:52 +01:00
JosiahWI
11f3deb9c4 Pass ContentFeatures as reference to read_content_features () 2020-10-13 16:36:01 +01:00
Zughy
272b72361a Add missing type check to InvRef:set_lists() () 2020-10-11 13:36:13 +02:00
DS
f3ae45b2b2 Add a short_description to be used by mods () 2020-10-09 19:11:21 +01:00
HybridDog
2f4037752b Add minetest.get_artificial_light and minetest.get_natural_light ()
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-10-06 20:49:46 +02:00
SmallJoker
f46509d5e2 Remove unused functions reported by cppcheck ()
Run unused functions reported by cppcheck

This change removes a few (but not all) unused functions.
Some unused helper functions were not removed due to their complexity and potential of future use.
2020-10-05 09:07:33 +02:00
Pierre-Yves Rollo
81c66d6efb Minimap as HUD element with API control
Features:
 * Define Minimap available modes (surface/radar, scale) from Lua, using player:set_minimap_modes()
 * New HUD elements for displaying minimap with custom size and placing
 * New minimap mode for displaying a texture instead of the map
2020-10-04 15:24:34 +02:00
Jordan Snelling
3068853e8a Add First Person Attachments ()
Fixes some other third person camera specific attachments.
Implements a single new flag for entities to be forced visible in first person mode.
Old mods do not need to be updated to use the new flag and are fully backwards compatible.
2020-10-04 15:10:34 +02:00
rubenwardy
3250b37e32 Deprecate get_player_velocity and add_player_velocity () 2020-10-04 00:33:45 +01:00
rubenwardy
9ec75d7765 Clean up server-side translations, remove global variable () 2020-09-16 14:51:11 +01:00
karamel59
d052593c7a Lua API: Register missing get_texture_mod function () 2020-08-27 21:47:38 +02:00
ANAND
291a6b70d6 Allow binding dig, place actions to keys; remove LMB/RMB hardcoding
Co-authored-by: Sam Caulfield <sam@samcaulfield.com>
2020-08-15 12:19:20 +03:00
Lejo
715a123a33 Add PUT and DELETE request + specific method value to HTTP API () 2020-07-29 23:16:21 +02:00
Hugues Ross
3ce03d1c2a Sanitize world directory names on create. Keep original name separate ()
Blacklisted characters are replaced by '_' in the path. The display name is stored in world.mt, and duplicate file names are resolved by adding an incrementing suffix (_1, _2, _3, etc).
2020-07-28 19:16:57 +02:00
Lars Müller
82731d0d3d Revert "Auto delete MetaData when = 0 ()" ()
This reverts commit 808eb4c5714da5ac36f4a70653d6b3805060828c.
2020-07-16 19:11:24 +02:00
sfan5
4b4513a67d Implement grouped mode for find_nodes_in_area ()
plus general improvements to find_node_* functions
2020-07-14 22:36:53 +02:00
rubenwardy
4cb18d4874 Fix HTTP API not being available in async mainmenu () 2020-06-22 14:40:04 +01:00
Lars Müller
e7e065f553 Exposing the zoom key to Lua API ()
Co-authored-by: Raul Ferriz <raul.ferriz@gmail.com>
2020-06-13 22:46:20 +02:00
sfan5
2424dfe007 Server pushing media at runtime () 2020-06-13 19:03:26 +02:00
Paul Ouellette
b16f841756 LuaItemStack: Add __tostring metamethod ()
* LuaItemStack: Add __tostring metamethod

* Clean up LuaItemStack::checkobject
2020-06-09 19:37:25 +02:00
rubenwardy
60bab8b2d7 Add HTTP API to main menu () 2020-06-06 17:17:08 +01:00
sfan5
9d6e7e48d6 Implement spawning particles with node texture appearance 2020-05-23 22:52:21 +02:00
Awkor
037422fdba Modernize include guards and add missing ones () 2020-05-23 13:23:05 +02:00
Lejo1
e79bc40c0a Check for valid base64 before decoding () 2020-05-22 14:26:22 +02:00
sfan5
1357ea1da2 Cleanup of particle & particlespawner structures and code () 2020-05-22 13:23:25 +02:00
Paramat
42fcfb75e8 Allow more than 255 biomes, document new maximum ()
Change biomemap data type from u8 to u16.
New technical (not practical) maximum is 65535 biomes.
2020-05-20 22:16:14 +01:00
Wuzzy
c94d37827d Rework functionality of leveled nodes ()
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-05-19 21:08:37 +02:00
rubenwardy
a9c3a42323 Add core.open_url() to main menu API () 2020-05-17 19:09:10 +01:00
sfan5
36d35f2fe3 CSM: Bugfixes to camera:get_pos() and camera:get_fov()
closes 
2020-05-14 21:16:45 +02:00
Loïc Blot
454dbf83a9 Server class code cleanups ()
* Server::overrideDayNightRatio doesn't require to return bool
There is no sense to sending null player, the caller should send a valid object

* Server::init: make private & cleanup
This function is always called before start() and loads some variables which can be loaded in constructor directly.
Make it private and call it directly in start

* Split Server inventory responsibility to a dedicated object

This splits permit to found various historical issues:
* duplicate lookups on player connection
* sending inventory to non related player when a player connects
* non friendly lookups on detached inventories ownership

This reduce the detached inventory complexity and also increased the
lookup performance in a quite interesting way for servers with thousands
of inventories.
2020-05-07 22:38:41 +02:00
sfan5
c28fbd06a8 Fix remaining issues with mapgen scriptapi 2020-05-05 19:26:59 +02:00
sfan5
3c65d1acec Give the Mapgen on each EmergeThread its own Biome/Ore/Deco/SchemManager copy 2020-05-05 19:26:59 +02:00
SmallJoker
cad5b987ad Sky API: Rename *_tint to fog_*_tint for consistency 2020-05-05 08:37:04 +02:00