1
0
mirror of https://github.com/minetest/minetest.git synced 2025-07-06 01:40:21 +02:00
Commit Graph

697 Commits

Author SHA1 Message Date
9ec75d7765 Clean up server-side translations, remove global variable (#10075) 2020-09-16 14:51:11 +01:00
d052593c7a Lua API: Register missing get_texture_mod function (#10338) 2020-08-27 21:47:38 +02:00
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
715a123a33 Add PUT and DELETE request + specific method value to HTTP API (#9909) 2020-07-29 23:16:21 +02:00
3ce03d1c2a Sanitize world directory names on create. Keep original name separate (#9432)
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
82731d0d3d Revert "Auto delete MetaData when = 0 (#8770)" (#10183)
This reverts commit 808eb4c571.
2020-07-16 19:11:24 +02:00
4b4513a67d Implement grouped mode for find_nodes_in_area (#9888)
plus general improvements to find_node_* functions
2020-07-14 22:36:53 +02:00
4cb18d4874 Fix HTTP API not being available in async mainmenu (#10086) 2020-06-22 14:40:04 +01:00
e7e065f553 Exposing the zoom key to Lua API (#9903)
Co-authored-by: Raul Ferriz <raul.ferriz@gmail.com>
2020-06-13 22:46:20 +02:00
2424dfe007 Server pushing media at runtime (#9961) 2020-06-13 19:03:26 +02:00
b16f841756 LuaItemStack: Add __tostring metamethod (#8785)
* LuaItemStack: Add __tostring metamethod

* Clean up LuaItemStack::checkobject
2020-06-09 19:37:25 +02:00
60bab8b2d7 Add HTTP API to main menu (#9998) 2020-06-06 17:17:08 +01:00
9d6e7e48d6 Implement spawning particles with node texture appearance 2020-05-23 22:52:21 +02:00
037422fdba Modernize include guards and add missing ones (#9898) 2020-05-23 13:23:05 +02:00
e79bc40c0a Check for valid base64 before decoding (#9904) 2020-05-22 14:26:22 +02:00
1357ea1da2 Cleanup of particle & particlespawner structures and code (#9893) 2020-05-22 13:23:25 +02:00
42fcfb75e8 Allow more than 255 biomes, document new maximum (#9855)
Change biomemap data type from u8 to u16.
New technical (not practical) maximum is 65535 biomes.
2020-05-20 22:16:14 +01:00
c94d37827d Rework functionality of leveled nodes (#9852)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
2020-05-19 21:08:37 +02:00
a9c3a42323 Add core.open_url() to main menu API (#8592) 2020-05-17 19:09:10 +01:00
36d35f2fe3 CSM: Bugfixes to camera:get_pos() and camera:get_fov()
closes #9857
2020-05-14 21:16:45 +02:00
454dbf83a9 Server class code cleanups (#9769)
* 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
c28fbd06a8 Fix remaining issues with mapgen scriptapi 2020-05-05 19:26:59 +02:00
3c65d1acec Give the Mapgen on each EmergeThread its own Biome/Ore/Deco/SchemManager copy 2020-05-05 19:26:59 +02:00
cad5b987ad Sky API: Rename *_tint to fog_*_tint for consistency 2020-05-05 08:37:04 +02:00
808eb4c571 Auto delete MetaData when = 0 (#8770)
* Auto delete MetaData when = 0
2020-05-02 12:57:04 +02:00
e0ea87f1f3 set_fov: Add support for time-based transitions (#9705) 2020-05-02 12:52:11 +02:00
ac368af4fe Allow connection info to be missing from minetest.get_player_information() (#9739)
fixes #9352
This reverts commit 23c907befe.
2020-05-01 21:44:28 +02:00
74d9b6010f Give the online lua mainmenu also the client_list and mods (#8691) 2020-05-01 16:47:17 +02:00
91c4f7f0ea Forbid object:attach(obj, ...) (#9762)
Fixes #9761
2020-04-27 11:27:27 +02:00
be71e70a91 Script: Enforce type checks if not nil (#9748)
* Script: Enforce type checks if not nil
2020-04-27 07:02:39 +02:00
8a03097450 script: Put getGuiEngine() inside a client-only #ifdef 2020-04-27 06:58:34 +02:00
f6f6dd140f script: Fix add_entity returning unusable ref if object deleted in on_activate 2020-04-27 06:58:34 +02:00
cee3c5e73d Add server side translations capability (#9733)
* Add server side translations capability
2020-04-25 07:20:00 +02:00
4361bfcb4d Fix configuration caching in log_deprecated (#9697)
* Fix configuration caching in log_deprecated

The configured variable was never set to true.
I've set the variables to thread_local because the configuration should be reloaded after reentering the world from mainmenu.
2020-04-22 00:07:12 +02:00
338195ff25 Fix alias handling of get_content_id (#9712)
fixes #9632
2020-04-19 19:07:54 +02:00
87829cd744 script: Move SAO usability check so that it covers all functions (#9698)
see also 91eef646a5
2020-04-18 17:21:58 +02:00
e8ac5a31cf Optimize get_objects_inside_radius calls (#9671)
* Optimize getObjectsInsideRadius calls

our previous implementation calls the ActiveObjectMgr to return ids and then lookup those ids in the same map and test each object
Instead now we call the global map to return the pointers directly and we ask filtering when building the list using lamba.

This drop double looping over ranges of active objects (and then filtered one) and drop x lookups on the map regarding the first call results
2020-04-16 08:25:48 +02:00
2d5bd3bf79 scriptapi: Some small optimizations to value pushing (#9669) 2020-04-14 20:44:18 +02:00
f780bae05c Formspecs: Add state-selection to style elements (#9378) 2020-04-11 21:39:30 +01:00
5cc06e4748 Reduce ServerEnvironment propagation (#9642)
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
2020-04-11 19:59:43 +02:00
5146086a64 Drop content_sao.{cpp,h}
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
2020-04-11 16:07:17 +02:00
894a34aef4 Move PlayerSAO to dedicated files 2020-04-11 16:07:17 +02:00
6d43736172 Move serveractiveobject & unitsao
Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h}
Move UnitSAO class to dedicated files
2020-04-11 16:07:17 +02:00
1292bdbbce Various features and fixes 2020-04-11 13:12:51 +02:00
5f3a17eb65 Implement minetest.sound_fade() 2020-04-11 13:12:51 +02:00
054c5dfaa3 scriptapi: Sort out ServerEnvironment / Environment distinction properly
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-11 13:12:51 +02:00
659245acc7 Work around LuaJIT issues on aarch64 (#9614)
- 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-08 20:14:08 +02:00
de73f989eb Overall improvements to log messages (#9598)
Hide some unnecessarily verbose ones behind --trace or disable them entirely.
Remove duplicate ones. Improve their contents in some places.
2020-04-08 20:13:23 +02:00
fd4daefb29 minetest.get_content_id: error if the node does not exist (#9458)
If a mod creator makes a typing mistake, this function now causes an error instead of returning the id of "ignore".
2020-03-11 16:25:14 +01:00
7a7bfdca7c minetest,get_connected_players: Return empty table at load time (#9493) 2020-03-10 20:32:04 +01:00