531 Commits

Author SHA1 Message Date
paramat
2942a16393 Mapgen: Make 3D noise tunnels' width settable
Correct parameter names mg_valleys to mgvalleys
Remove biome NoiseParams from MapgenValleysParams
Improve format of parameter code
2016-04-28 23:36:19 -04:00
tenplus1
0d64d63591 Avoid teleporting player if /teleport coords are out-of-range 2016-04-29 00:00:35 +10:00
kilbith
14c82f432b Android menu: Unified serverlist 2016-04-28 07:19:31 +01:00
rubenwardy
21e176b7a0 Builtin: Add basic_privs setting 2016-04-28 07:19:07 +01:00
SmallJoker
8cf828a818 Mainmenu: Standardize the menu button order and sizes 2016-04-28 07:16:58 +01:00
Ekdohibs
1893eec3cc Fix mainmenu code downloading the public serverlist twice.
Also, fix a nil error that can happen sometimes in
menu_handle_key_up_down
2016-04-22 23:39:54 +10:00
paramat
96683969f2 Textures: Replace menu background fallback dirt_bg.png with empty sky texture 2016-04-21 10:15:05 +01:00
Auke Kok
447e6d4160 Fix timer initialization.
This fixes the problem that the first timer tick is an
overrun and causes all timers to expire immediately.

replaces #4003
2016-04-21 10:14:59 +01:00
kilbith
9c4e903fe8 Mainmenu: Code cleaning 2016-04-20 21:31:40 +10:00
kilbith
1a4731e806 Mainmenu: Unify favorite servers with main serverlist 2016-04-20 21:31:40 +10:00
Auke Kok
43673c52ad 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.
2016-04-20 06:51:11 +01:00
est31
ca4f6936ec 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"
2016-04-15 14:40:31 +02:00
SmallJoker
638c2c543d mainmenu: Tidy up logic in is_server_protocol_compat() (#3997)
Apply de morgan to simplify the logic.
2016-04-15 14:37:09 +02:00
TriBlade9
b560d502ed Add option to disable entity selectionboxes. (#3992)
Setting only loaded once, default value is to enable them.
2016-04-14 11:20:11 +02:00
Auke Kok
eb6aed6f3e 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.
2016-04-11 00:01:28 -04:00
Rui914
b283ced646 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
2016-04-08 02:25:04 -04:00
Rui914
619304f9cc Mainmenu: Move description.txt textbox down
Additionally, fix misc. code style issues
2016-03-31 04:15:41 -04:00
paramat
2e858f2b1b Mgv7: Decrease cliff steepness 2016-03-30 01:53:14 +01:00
tenplus1
a7311fa0e0 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>
2016-03-29 23:56:23 +02:00
Rui
5285fe8c03 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.
2016-03-25 15:19:39 +01:00
Rui
108afce789 Credits: Make that easy to add/remove 2016-03-24 16:56:23 +01:00
Auke Kok
d8e01b5a2c 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.
```
2016-03-24 16:52:26 +01:00
paramat
cf1d3f14f6 Builtin/game/falling: Re-add comma removed by recent commit 2016-03-19 18:46:08 +00:00
Rui914
c65b5f3bea Set acceleration only once in falling node 2016-03-19 17:56:46 +00:00
Auke Kok
317ce41e2f 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.
2016-03-19 17:56:26 +00:00
est31
a334f5f527 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.
2016-03-15 17:20:09 +01:00
Diego Martinez
d5c0e09d40 Add options for screenshot format and quality 2016-03-12 17:12:43 -05:00
paramat
7f54168a10 Documentation: Clarify global and mapgen-specific mapgen flags 2016-03-11 21:09:59 +00:00
Auke Kok
ac65ce9c1c 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.
2016-03-11 21:09:53 +00:00
Auke Kok
9cf7a3ef96 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.
2016-03-09 01:45:23 +01:00
ShadowNinja
3e9b7d3da7 Add AreaStore custom ID API 2016-03-07 16:33:20 -05:00
est31
fd7cbba94b Add minetest.register_lbm() to run code on block load only 2016-03-07 19:54:26 +01:00
Jean-Patrick Guerrero
b5bb7f8105 Settings Tab: Regroup dropdown datas in tables 2016-03-06 23:42:21 +00:00
Rui914
7a9e8367db Faster insertion into table 2016-03-06 23:42:04 +00:00
Muhammad Rifqi Priyo Susanto
e4c448b00f Add forgotten valleys mapgen in mapgen name
Missing `valleys` in `settingtypes.txt` and `minetest.conf.example`.
2016-03-05 16:06:27 +01:00
Jean-Patrick Guerrero
08b9a710be Update settings tab + some misc. clean-up 2016-03-05 10:41:51 +01:00
est31
246fafdfc1 Don't generate trailing spaces in minetest.conf.example
If the default value of a setting was empty,
it previously generated a trailing space.
2016-02-27 05:49:22 +01:00
RealBadAngel
0451b6e581 Mapblock mesh: Allow to use VBO 2016-02-26 00:51:01 +00:00
RealBadAngel
2ce4f27f7f Remove new_style_water 2016-02-26 00:50:46 +00:00
Jeija
6128dc7a07 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.
2016-02-22 15:39:41 +01:00
RealBadAngel
e9ccb7fe8e Camera: remove auto tune FPS, single view range setting 2016-02-21 18:18:13 +01:00
RealBadAngel
226be7bc32 Remove preload_item_visuals code
Closes #3748
2016-02-21 17:46:50 +01:00
BlockMen
5e0a7cd4eb Restore simple settings tab and add advanced settings as dialog 2016-02-21 08:54:33 +00:00
paramat
2c3b7ea73c Documentation: Remove now unused 'vertical spawn range' 2016-02-11 04:23:26 +00:00
Diego Martinez
5c79a36617 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`.
2016-02-11 04:23:17 +00:00
Kahrl
c1946cc258 Log /clearobjects mode 2016-02-11 04:22:58 +00:00
Kahrl
02cbda530b Add '/clearobjects quick' 2016-02-11 04:22:58 +00:00
RealBadAngel
ead025fb02 Filmic HDR tone mapping 2016-02-09 02:55:59 -05:00
RealBadAngel
8b602bba0f Cleanup selection mesh code, add shaders for halo and selection boxes 2016-02-08 03:57:42 -05:00
Diego Martinez
e877590dec builtin: Fix print crashing on nil "holes".
The engine implementation of `print` packs the varargs into a
table and passes the table directly to `table.concat`. If you
pass any value not supported by `table.concat` (particularly
`nil`), the server crashes. This is unexpected behavior, as
`print` is supposed to be able to work with anything.

This patch changes the implementation so it first converts
all arguments using `tostring`, which fixes the issue and
makes the custom `print` function compatible with the stock
Lua behavior.
2016-02-08 01:55:02 +01:00