Commit Graph

682 Commits

Author SHA1 Message Date
est31 026f0a3e8c
Update credits tab 2022-05-21 16:13:37 +02:00
Rui 4cc9542edb
Mainmenu: Remove space under mod list 2022-05-21 16:13:37 +02:00
paramat 3851dc4649
Mapgen: Make 3D noise tunnels' width settable
Correct parameter names mg_valleys to mgvalleys
Remove biome NoiseParams from MapgenValleysParams
Improve format of parameter code
2022-05-21 16:13:36 +02:00
tenplus1 78874e8216
Avoid teleporting player if /teleport coords are out-of-range 2022-05-21 16:13:36 +02:00
Jean-Patrick Guerrero 7c7b72f83d
Android menu: Unified serverlist 2022-05-21 16:13:36 +02:00
rubenwardy 50d7bee97d
Builtin: Add basic_privs setting 2022-05-21 16:13:35 +02:00
SmallJoker 0939c871cf
Mainmenu: Standardize the menu button order and sizes 2022-05-21 16:13:35 +02:00
Nathanaël Courant d39cdbcf4f
Fix mainmenu code downloading the public serverlist twice.
Also, fix a nil error that can happen sometimes in
menu_handle_key_up_down
2022-05-21 16:13:34 +02:00
paramat bf161fe707
Textures: Replace menu background fallback dirt_bg.png with empty sky texture 2022-05-21 16:13:34 +02:00
Auke Kok 807cec58aa
Fix timer initialization.
This fixes the problem that the first timer tick is an
overrun and causes all timers to expire immediately.

replaces #4003
2022-05-21 16:13:33 +02:00
Jean-Patrick Guerrero ee08952a2e
Mainmenu: Code cleaning 2022-05-21 16:13:33 +02:00
Jean-Patrick Guerrero 24d09852ee
Mainmenu: Unify favorite servers with main serverlist 2022-05-21 16:13:33 +02:00
Auke Kok ea243adba1
falling: walk 4 additional diagonally down directions.
This seems very little cost and matches the old behavior more
closely. This will cause some more falling nodes to get added
to falling clusters. With the efficiency of the algorithm, this
really doesn't do much damage.
2022-05-21 16:13:32 +02:00
est31 f762820a7e
Mainmenu: Still support favorites if send_pre_v25_init is disabled
@SmallJoker has noted a bug that servers from the (local) main menu
favorites list can't be opened.

This commit fixes the bug by disabling any main menu based protocol
checks for servers from the favorite list.

Also, it fixes a second bug that happens when a server from the
public serverlist doesn't send its supported protocol versions,
most likely because its running a minetest older than commit [1].
Then we have shown an error msg that the server has enforced
one specific protocol version. This was most likely not the case.

Of course, we can't do anything better than do an assumption on
the protocol versions if they are not known. That assumption
should however be closest to the most often occuring case as
possible.

Also, some little cleanups.

[1]: 5a0ed780f56a5225b3d7c5f64099586e390e5f39 "Server: announce MIN/MAX protocol version supported to serverlist. Client: check serverlist"
2022-05-21 16:13:32 +02:00
SmallJoker f4ed603ee0
mainmenu: Tidy up logic in is_server_protocol_compat() (#3997)
Apply de morgan to simplify the logic.
2022-05-21 16:13:31 +02:00
TriBlade9 c130956370
Add option to disable entity selectionboxes. (#3992)
Setting only loaded once, default value is to enable them.
2022-05-21 16:13:31 +02:00
Auke Kok a3d0df7466
Convert nodeupdate to non-recursive
This took me a while to figure out. We no longer visit all 9 block
around and with the touched node, but instead visit adjacent plus
self. We then walk -non- recursively through all neigbors and if
they cause a nodeupdate, we just keep walking until it ends. On
the way back we prune the tail.

I've tested this with 8000+ sand nodes. Video result is here:

  https://youtu.be/liKKgLefhFQ

Took ~ 10 seconds to process and return to normal.
2022-05-21 16:13:31 +02:00
Rui914 8850a2a73f
Mainmenu: Refactor tab UI code
- Use local variables for tabs in place of globals
 - Merge together if statements where possible
 - Replace manual table searching code with indexof where possible
2022-05-21 16:13:30 +02:00
Rui914 d86bc91f4b
Mainmenu: Move description.txt textbox down
Additionally, fix misc. code style issues
2022-05-21 16:13:30 +02:00
paramat 60e3898c22
Mgv7: Decrease cliff steepness 2022-05-21 16:13:29 +02:00
tenplus1 b6b49f9cc9
stop falling.lua error
2016-03-27 15:47:01: ERROR[Main]: ServerError: Lua: Runtime error from mod '*builtin*' in callback luaentity_Step(): Node name is not set or is not a string!
2016-03-27 15:47:01: ERROR[Main]: stack traceback:
2016-03-27 15:47:01: ERROR[Main]: 	[C]: in function 'add_node'
2016-03-27 15:47:01: ERROR[Main]: 	/usr/share/minetest/builtin/game/falling.lua:96: in function </usr/share/minetest/builtin/game/falling.lua:43>
2022-05-21 16:13:29 +02:00
Rui 215e71efad
Falling: Set acceleration on step again
Commit

65c09a96f41705bb8e75fc5ff4276342be91ed11 "Set acceleration only once in falling node"

has made the acceleration being set only once.
But this has introduced a regression.

Fix #3884.
2022-05-21 16:13:28 +02:00
Rui 3f4c1bb7b8
Credits: Make that easy to add/remove 2022-05-21 16:13:28 +02:00
Auke Kok 400c4dda7a
Make `options` local here.
Undoubtably this may cause problems later if unchecked.

```
2016-03-22 21:57:52: WARNING[Server]: Assignment to undeclared global "options" inside a function at .../sofar/git/minetest/bin/../builtin/game/chatcommands.lua:862.
```
2022-05-21 16:13:28 +02:00
paramat b12c539595
Builtin/game/falling: Re-add comma removed by recent commit 2022-05-21 16:13:27 +02:00
Rui914 8760d15445
Set acceleration only once in falling node 2022-05-21 16:13:27 +02:00
Auke Kok 2f45f007f4
Allow NodeTimer, ABM and block mgmt interval changes.
ABM's are hardcoded to run every 1.0s, NodeTimers are hard coded to
run at every 1.0s. Block mgmt is running every 2.0sec.

However, these timers can be better tuned for both higher and lower
values by server owners. Some server owners want to, and have the
resources to send more packets per second to clients, and so they
may wish to send smaller updates sooner. Right now all ABM's are
coalesced into 1.0 second intervals, resulting in large send queues
to all clients. By reducing the amount of possible timers, one can
get a far better response rate and lower the perception of lag.

On the other side of the camp, some servers may want to increase
these values, which again isn't easily doable.

The global settings abm_interval and nodetimer_interval are set to
current values by default. I've tested with 0.2/0.5 type values
and noticed a greatly improved response and better scattering of
nodetimers, as well as enjoying not faceplanting into doors with
pressure plates anymore.
2022-05-21 16:13:26 +02:00
est31 eaab9d5586
Add option to not send pre v25 init packet
The legacy init packet (pre v25) sends information about the client's
password that a server could use to log in to other servers if the
username and password are the same. All the other benefits of SRP of
protocol v25 are missed if the legacy init packet is still sent during
connection creation.

This patch adds an option to not send the v25 init packet. Not sending
the v25 packet means breaking compat with pre v25 servers, but as the
option is not enabled by default, no servers are affected unless the
user explicitly flips the switch. More than 90% of the servers on the
serverlist support post v25 protocols.

The patch also fixes a bug with greying out of non compliant servers
being done wrongly, the min and max params were mixed.
2022-05-21 16:13:26 +02:00
Diego Martínez 79667b4dc6
Add options for screenshot format and quality 2022-05-21 16:13:26 +02:00
paramat 7f85241781
Documentation: Clarify global and mapgen-specific mapgen flags 2022-05-21 16:13:25 +02:00
Auke Kok 9e994e0e39
Introduce "protection_bypass" privilege.
This privilege allows map protection bypassing for server operators
and world moderators.

Initially I had thought that bypassing protection mods would have been
something that could entirely be done inside mods and minetest_game,
but the concept of protection is defined in core, in the code of
core.is_protected().

I don't feel that it would be logical to introduce a protection
concept in core, but not some way around that for server operators
to maintain map parts that need fixing, de-griefing or cleanup.

Others had noticed the same problems, and proposed a patch to
minetest_game. That patch is fine by itself, but it fails to add
protection bypass functionality for digging normal nodes and placing
nodes.

So, instead, we indroduce the new priv "protection_bypass" in core,
and modify 'on_place_node' and 'node_dig' to allow bypassing node
protections if the player holds this priv.

This priv was tested with protector redo by tenplus1.

A followup patch to Minetest Game will include allowing special checks
for doors, trapdoors, chests in Minetest Game.

Protection mods will likely want to mimic the changes in their relevant
code sections.
2022-05-21 16:13:25 +02:00
Auke Kok da5a169a45
Add consistent monotonic day counter - get_day_count()
I've written several experimental bits of code that revolve around the
need for a consistent calendar, but implementing one is extremely hard
in mods due to time changes and mods overriding core.get_timeofday(),
which will conflict.

The second part of the problem is that doing this from a mod requires
constant maintenance of a settings file.

An implementation in core is trivial, however, and solves all of
these problems at virtually no cost: No extra branches in server
steps, and a single branch when minetest.set_time_of_day(), which is
entirely reasonable.

We store the day_count value in env_meta.txt.

The use case is obvious: This change allows mods to create an actual
virtual calendar, or properly account for seasonal changes, etc..

We add a "/days" chatcommand that displays the current day count. No
permissions are needed. It can only retrieve the day count, not
modify it.
2022-05-21 16:13:24 +02:00
ShadowNinja 96b86f8440
Add AreaStore custom ID API 2022-05-21 16:13:24 +02:00
est31 d1e698f4fb
Add minetest.register_lbm() to run code on block load only 2022-05-21 16:13:23 +02:00
Jean-Patrick Guerrero 7d23793e05
Settings Tab: Regroup dropdown datas in tables 2022-05-21 16:13:23 +02:00
Rui914 32752d2bc5
Faster insertion into table 2022-05-21 16:13:23 +02:00
srfqi 8660983a8e
Add forgotten valleys mapgen in mapgen name
Missing `valleys` in `settingtypes.txt` and `minetest.conf.example`.
2022-05-21 16:13:22 +02:00
Jean-Patrick Guerrero 9f6730de09
Update settings tab + some misc. clean-up 2022-05-21 16:13:22 +02:00
est31 250f67bf2f
Don't generate trailing spaces in minetest.conf.example
If the default value of a setting was empty,
it previously generated a trailing space.
2022-05-21 16:13:21 +02:00
RealBadAngel 3cb36ba9ac
Mapblock mesh: Allow to use VBO 2022-05-21 16:13:21 +02:00
RealBadAngel 362d382289
Remove new_style_water 2022-05-21 16:13:20 +02:00
Jeija d0a7fe455e
Add Lua interface to HTTPFetchRequest
This allows mods to perform both asynchronous and synchronous HTTP
requests. Mods are only granted access to HTTP APIs if either mod
security is disabled or if they are whitelisted in any of the
the secure.http_mods and secure.trusted_mods settings.

Adds httpfetch_caller_alloc_secure to generate random, non-predictable
caller IDs so that lua mods cannot spy on each others HTTP queries.
2022-05-21 16:13:20 +02:00
RealBadAngel 6817425d4d
Camera: remove auto tune FPS, single view range setting 2022-05-21 16:13:20 +02:00
RealBadAngel e0bf406bea
Remove preload_item_visuals code
Closes #3748
2022-05-21 16:13:19 +02:00
BlockMen ae7b3ec177
Restore simple settings tab and add advanced settings as dialog 2022-05-21 16:13:19 +02:00
paramat 41bef56c82
Documentation: Remove now unused 'vertical spawn range' 2022-05-21 16:13:18 +02:00
Diego Martínez 60a5b2ac4d
Initialize facedir and wallmounted tables only once.
This makes the functions a bit faster since they don't
have to recreate the tables every invocation, and makes
the code more readable.

Also, document `wallmounted_to_dir`.

The function was implemented but not documented in `lua_api.txt`.
2022-05-21 16:13:18 +02:00
Kahrl c4db9d23ff
Log /clearobjects mode 2022-05-21 16:13:17 +02:00
Kahrl ed493305e4
Add '/clearobjects quick' 2022-05-21 16:13:17 +02:00
RealBadAngel d8c9c7deac
Filmic HDR tone mapping 2022-05-21 16:13:17 +02:00