Commit Graph

725 Commits

Author SHA1 Message Date
red-001 f12f99333b
Move chat command handling code from C++ to Lua (#5528) 2022-05-21 16:14:37 +02:00
Vincent Glize 58e922c884
Add event on_connect player API lua (#5540)
* Add event on_connect player API lua
2022-05-21 16:14:37 +02:00
SmallJoker 200a18f1ef
Settings: Update documentation (#5534)
Now documented (sorted a-z):
enable_console
enable_particles
creative_mode
hud_scaling
inventory_image_hack
keymap_console
keymap_zoom
shader_path
view_bobbing
2022-05-21 16:14:37 +02:00
rubenwardy cc1235c8ec
Add Joystick type detection and Xbox controller support
* Add joystick type detection (with joystick_type setting to override it)
* Fix multiple joysticks from interfering with each other by only reading from one (add joystick_id setting)
* Add support for Xbox controllers
2022-05-21 16:14:36 +02:00
Loïc Blot 342452f247
Expose vector helpers to CSM 2022-05-21 16:14:36 +02:00
paramat b199634744
Mapgen documentation: Add descriptions to noise parameters
Shorten 'readable names'.
Add a new advanced settings menu section for Biome API noises.
Various minor edits and improvements.
2022-05-21 16:14:35 +02:00
paramat e2a176b887
Cavegen/Mgv5/Mgv7: Add optional giant caverns
Add to MapgenBasic for use by multiple mapgens.
Add to mgv5 and mgv7, enabled by default.

Similar to mgvalleys caverns but half the scale.
Parameters for upper y limit, distance caverns taper to full size, and
noise threshold (full cavern size).
As with mgvalleys caverns are generated first and classic caves are
disabled in any mapchunk containing a cavern, to avoid excessive
spreading volumes of liquids.
This also avoids floating blobs of liquid where a large classic cave
has overgenerated out into a neighbouring previously-generated mapchunk.
2022-05-21 16:14:35 +02:00
Auke Kok 9d9c4cc91f
minetest.after(): simplify further, pause in singleplayer (#5500)
Using the `dtime` value entirely, this will stop the clock
if the game is paused in singleplayer. Since most of the
clocks were fixed a long time ago, this should again be
safe to use.
2022-05-21 16:14:34 +02:00
MarkuBu 61efcfec7d
First commit for fine pointed (#5485) 2022-05-21 16:14:34 +02:00
Diego Martínez 67ca4f86c5
Add functions to strip color information. (#5472) 2022-05-21 16:14:34 +02:00
Loïc Blot 1bbcceb65c
Fix a type bug in colorize function
This bug was introduced by dd2f1d7551bfd70357ad4f3fb180704194272147 and reported by @kilbith
2022-05-21 16:14:33 +02:00
paramat da687589b3
Map generation limit: Make per-world
The setting limits map generation but affects nothing else.
Add 'mapgen_limit' to global mapgen parameters.
Move 'blockpos_over_mapgen_limit()' to the only place it is called
from: map.cpp.
Allow teleportation to any part of the world even if over the set
mapgen limit.
Simplify the reading of this limit in mgvalleys.
Remove the 'map_generation_limit' setting.
2022-05-21 16:14:33 +02:00
red-001 5943ad8975
Change command prefix to "." and add "help" command. 2022-05-21 16:14:32 +02:00
numzero 35edba888b
Add mesh generation delay 2022-05-21 16:14:32 +02:00
Loïc Blot f436404054
Typo fix 2022-05-21 16:14:32 +02:00
red-001 acb03dc956
Add multiline support to colorize. (#5444) 2022-05-21 16:14:31 +02:00
red-001 52662dfcce
Block access to the `io` library 2022-05-21 16:14:31 +02:00
red-001 d210b6d2cf
Give CSM access to use `core.colorize()` (#5113) 2022-05-21 16:14:30 +02:00
Auke Kok 0d606691dd
Fix two nul deref if digging unknown nodes. (#5398)
Introduced by d785456b3fa35faf47cb972fde9e8668382c5e22 (#5162)
2022-05-21 16:14:30 +02:00
Loïc Blot 7af68932f2
Add enable_client_modding param (default: false) 2022-05-21 16:14:29 +02:00
red-001 c38197ed66
Add `on_punchnode` callback 2022-05-21 16:14:29 +02:00
red-001 e02c119936
Add `on_dignode` callback (#5140) 2022-05-21 16:14:29 +02:00
red-001 fb042da4a5
Improve security for client-sided mods (#5100) 2022-05-21 16:14:28 +02:00
Loïc Blot 3d38c234e5
implement client side mod loading (#5123)
* client side mods are located in clientmods/
* move builtin/preview.lua to clientmods/preview/init.lua as a preview mod
* refactor ModConfiguration class to work properly with client and server using child objects
* move some Server constructor mod load code to ModConfiguration to reduce code duplication between client and server
* remove mods.{cpp,h} unused functions
* use UNORDERED_SET instead of std::set in some modspec storages
2022-05-21 16:14:28 +02:00
red-001 0412d35355
Add local formspecs. (#5094) 2022-05-21 16:14:27 +02:00
Loïc Blot b38c00d90f
sound_play & sound_stop support + client_lua_api doc (#5096)
* squashed: CSM: Implement register_globalstep
  * Re-use fatal error mechanism from server to disconnect client on CSM error
  * Little client functions cleanups

* squashed: CSM: add core.after function
  * core.after is shared code between client & server
  * ModApiUtil get_us_time feature enabled for client
2022-05-21 16:14:27 +02:00
red-001 33b76809dd
Add client-sided chat commands (#5092) 2022-05-21 16:14:27 +02:00
Loïc Blot 6a9953bd0f
Add on_death, on_hp_modification & oh_damage_taken callbacks (#5093)
* Add on_death callback
* Add on_hp_modification & on_damage_taken callbacks
* move preview code to preview.lua
2022-05-21 16:14:26 +02:00
Loïc Blot 80f3d77767
Client side modding
* rename GameScripting to ServerScripting
* Make getBuiltinLuaPath static serverside
* Add on_shutdown callback
* Add on_receiving_chat_message & on_sending_chat_message callbacks
* ScriptApiBase: use IGameDef instead of Server
  This permits to share common attribute between client & server
* Enable mod security in client side modding without conditions
2022-05-21 16:14:26 +02:00
Vladislav Tsendrovskii 49602a4a4f
Save metainfo for falling nodes 2022-05-21 16:14:25 +02:00
lhofhansl a25f0a2210
Enable server side occlusion culling by default. 2022-05-21 16:14:25 +02:00
lhofhansl cc4fdda474
Allow server side occlusion culling. 2022-05-21 16:14:24 +02:00
paramat 6838bbf6d0
Climb speed: Increase default setting from 2 to 3 2022-05-21 16:14:24 +02:00
tenplus1 22ca380b87
Optimize item.lua Replace slow ItemStack get_definitions with registered_nodes one's and cached playername as it's used multiple times. Also removed local item = itemstack:peek_item() as it is never used. 2022-05-21 16:14:24 +02:00
zaoqi ebe297520a
Add minetest.spawn_falling_node(pos) (#5339)
* Add minetest.spawn_falling_node(pos)

* lua_api.txt: Add minetest.spawn_falling_node(pos)

* Update minetest.spawn_falling_node(pos)
2022-05-21 16:14:23 +02:00
red-001 ccce7bbd6d
Fix crash that can be caused by the shutdown command. (#5292) 2022-05-21 16:14:23 +02:00
Dániel Juhász 3a111fa7d6
Fixes for colorwallmounted and colorfacedir nodes
Correct node placement prediction for attached colorwallmounted nodes.
Correct placement direction for colorfacedir and colorwallmounted nodes.
Correct detatch mechanism for attached colorwallmounted nodes.
2022-05-21 16:14:22 +02:00
Jean-Patrick Guerrero b62c15b4b1
Multiplayer menu: fix attempt to open nonexistant image
Since local servers and local favorites have no ping value (these
are only provided by the server) we shouldn't load a broken
image filename.

Fixes #5238
2022-05-21 16:14:22 +02:00
tenplus1 560f339872
Statbars.lua: Cache enable_damage setting 2022-05-21 16:14:21 +02:00
red-001 152924b6f2
Add support for the new arguments of `request_shutdown` to the `/shutdown` chatcommand. (#5252) 2022-05-21 16:14:21 +02:00
HybridDog 90478ea779
Mainmenu: Brighter text colours for readability 2022-05-21 16:14:21 +02:00
rubenwardy a41241456a
Use tree to list mods rather than textlist 2022-05-21 16:14:20 +02:00
Wuzzy 3c57053538
Add textures for air and ignore items (#5196) 2022-05-21 16:14:20 +02:00
Auke Kok a938cc30c7
Change default nodetimer_interval to 0.2s. (#5193)
We want to reduce the chance that we get lots and lots of node
timers all happening once a second, because we're better off doing
small bits of work as they are available.

Reducing this to 0.2 seconds will greatly reduce the total amount
of nodetimers that elapse at the same instance, while not effecting
total work load. This results in a far better chance of the server
keeping up with work loads.
2022-05-21 16:14:19 +02:00
Jean-Patrick Guerrero 464935baec
Serverlist: Add ping indicators (#5164) 2022-05-21 16:14:19 +02:00
Nathanaël Courant bfd687d6bf
Make facedir_to_dir and wallmounted_to_dir work with coloured nodes as well. (#5153) 2022-05-21 16:14:18 +02:00
Ezhh afaf7bcff7
Add console height setting (#5136) 2022-05-21 16:14:18 +02:00
paramat 9e91f4ff3c
Zoom FOV: Reduce minimum zoom FOV to 7 degrees
The default of 15 is unchanged.
7 degrees is x10 magnification which is common for binoculars.
Alter hardcoded limits in camera.cpp:
Minimum 7 degrees.
Maximum 160 degrees to match upper limits in advanced settings.
2022-05-21 16:14:18 +02:00
Auke Kok a648fbc2e7
core: Add dir_to_yaw and yaw_to_dir helpers
These are needed to go from things like entity yaw to a vector
and vice versa.
2022-05-21 16:14:17 +02:00
Auke Kok 944e5ca4e9
Vector: Add vector.sort(a, b): return box edges
This function returns the box corners of the smallest box
that includes the two given coordinates.
2022-05-21 16:14:17 +02:00