5652 Commits

Author SHA1 Message Date
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
b45a71ec0d Avoid try/catch for settings.
We can just test for the presence of these settings nicely here,
no need to use a try / catch construct.
2016-03-09 01:45:23 +01: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
ShadowNinja
e666e6c109 Implement AreaStore serialization 2016-03-07 16:33:20 -05:00
ShadowNinja
ec56801e71 Fix SpatialAreaStore not freeing removed areas 2016-03-07 16:33:20 -05:00
ShadowNinja
7dead21e98 Add basic AreaStore method documentation 2016-03-07 16:33:20 -05:00
ShadowNinja
b9e0e8d337 Sort AreaStore header 2016-03-07 16:33:20 -05:00
ShadowNinja
d2d654fcbf Clean up VectorAreaStore 2016-03-07 16:33:20 -05:00
ShadowNinja
239f5ed868 Move AreaStore container selection logic into getOptimalImplementation 2016-03-07 16:33:20 -05:00
ShadowNinja
9070fd90d5 Move AreaStore to util 2016-03-07 16:33:20 -05:00
ShadowNinja
a7e129ab68 Make AreaStore cache setting private 2016-03-07 16:33:20 -05:00
ShadowNinja
9ae267cae5 Simplify AreaStore ID management 2016-03-07 16:33:20 -05:00
est31
f486364e14 s_env.{cpp, h} cleanups
* Replace string by-val passing with const reference
* Fix code style
* Remove redundant `int table` definition and indentation level
2016-03-07 19:54:26 +01:00
est31
fd7cbba94b Add minetest.register_lbm() to run code on block load only 2016-03-07 19:54:26 +01:00
ShadowNinja
a4ec25f8b7 Use LuaErrors in security check macros
Throwing a LuaError calls destructors as it propagates up the stack,
wheres lua_error just executes a longjmp.
2016-03-07 13:37:15 -05: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
Maksim Gamarnik
7a9fd071c1 Update Android dependencies, -O3 optimization, remove old ARMv5 config
* Update OpenSSL (thanks @sapier, i use his patch!), Curl and SQLite3.
* Remove old arm config. Almost all phones that use ARMv5 have 1 core and 256-512 RAM, it's about 2-5 FPS.
* Do -O3 optimization for libs and remove -fexpensive-optimizations for Minetest (-O3 includes this! Read gcc docs).
* OpenSSL fix - thanks @sapier, again.
2016-03-05 05:52:45 +01:00
Duane Robertson
2054aebb51 Mgvalleys: Correct spawn problems
Increase maximum spawn altitude to reduce spawn issues.
2016-03-04 02:39:04 +00:00
paramat
367d489b5e Decoration API: Allow force_placement of simple decorations 2016-03-04 02:38:55 +00:00
Jeija
9f33a11cea Require minetest.request_http_api to be called from the mod's main scope
Fixes #3764
2016-03-03 22:42:00 +01:00
ShadowNinja
be664095d9 Fix main menu being unable to set secure settings 2016-03-03 00:57:19 -05:00
ShadowNinja
4b8f7125b4 Remove debug.getupvalue from the Lua sandbox whitelist
This function could be used to steal insecure environments from trusted mods.
2016-03-03 00:09:05 -05:00
ShadowNinja
bb2c48e2d9 Add support for non-ASCII characters to chat console
This still only supports 256 characters, but that's because
Irrlicht's clipboard handlers don't support wide characters.
2016-03-02 23:23:31 -05:00
ShadowNinja
3e0afba1ca Add Android chat form 2016-03-02 23:23:31 -05:00
ShadowNinja
d8a4be8771 Add text selection and copying to console 2016-03-02 23:23:31 -05:00
ShadowNinja
e07237d9c5 Unlock cursor when opening console 2016-03-02 23:23:31 -05:00
Esteban I. Ruiz Moreno
c051bd28f0 Use the console instead of a dedicated window when pressing keymap_chat/cmd
keymap_console opens a full window for chat history browsing.
2016-03-02 23:23:31 -05:00
Aleksey Vorona
42ffda53b2 Fix a mistake in the world format documentation
Fixed a minor mistake that made it appear as if the inventory
is serialized multiple times - once per each variable. In fact
it is serialized once per each node.
2016-03-03 01:25:35 +01:00
nerzhul
1bf870c8c1 Revert "Fix jumping at node edge"
This reverts commit 60dc01dc258db842e229351b871d0989e3e7d62c.

This fixes issue #3773
2016-03-01 11:15:14 +01:00
ShadowNinja
378a03c182 Resize object_marker_red.png to 16x16
Having a non-power-of-two image broke the Android app.
2016-02-28 14:28:27 -05:00
paramat
f237a98e76 Nodedef: Restore smooth lighting to water 2016-02-27 21:27:42 +00:00
Duane Robertson
065b0f03f1 Mgvalleys: Add Dry Riverbeds
Lower water table where base humidity is low.
Alter heat and humidity to compensate for river humidity and altitude
chill.
Correct misuse of surface_max_y in generateTerrain.
Remove sand trails in the water at river mouths.
Remove river water below water_level.
Correct heat/humidity calculations where noises are less than zero.
Correct heightmap errors as much as possible.
Make humidity calculations more readable.
2016-02-27 21:27:32 +00:00
est31
1aec1ffa85 Update po files, minetest.conf.example and settings_translation_file.cpp 2016-02-27 05:50:42 +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
Dmitry Smirnov
f35aa62ee0 Translated using Weblate (Russian)
Currently translated at 61.3% (483 of 787 strings)

(Merger of five commits)
2016-02-27 03:57:48 +01:00
Vasily Pavlov
4ee190446a Translated using Weblate (Russian)
Currently translated at 49.5% (390 of 787 strings)

(Merger of three commits)
2016-02-27 03:57:20 +01:00
Miguel Isaac
d3d3084d6c Translated using Weblate (Spanish)
Currently translated at 47.0% (370 of 787 strings)

(Merger of two commits from the same author)
2016-02-27 03:42:35 +01:00
Joan Ciprià Moreno
e7902e4bd3 Translated using Weblate (Catalan)
Currently translated at 37.3% (294 of 787 strings)
2016-02-27 03:42:35 +01:00
Laura Arjona Reina
cf6f0962d9 Translated using Weblate (Spanish)
Currently translated at 46.6% (367 of 787 strings)
2016-02-27 03:42:35 +01:00
Bruno Borges
b747901dc0 Translated using Weblate (Portuguese (Brazil))
Currently translated at 65.5% (516 of 787 strings)
2016-02-27 03:42:35 +01:00
Amadeo
c98d20dd2e Translated using Weblate (Polish)
Currently translated at 33.9% (267 of 787 strings)
2016-02-27 03:42:35 +01:00
Fixer
46b6dfbd18 Translated using Weblate (Ukrainian)
Currently translated at 30.4% (240 of 787 strings)
2016-02-27 03:42:34 +01:00
Diego Martínez
62d4c9ad02 Translated using Weblate (Spanish)
Currently translated at 45.9% (362 of 787 strings)
2016-02-27 03:42:34 +01:00
Paolo DGZ
98160d5300 Translated using Weblate (Italian)
Currently translated at 52.7% (415 of 787 strings)
2016-02-27 03:42:34 +01:00
Muhammad Rifqi Priyo Susanto
ef00498c4b Translated using Weblate (Indonesian)
Currently translated at 42.4% (334 of 787 strings)
2016-02-27 03:42:34 +01:00
Kisbenedek Márton
aef551ac4a Translated using Weblate (Hungarian)
Currently translated at 69.1% (544 of 787 strings)

(Merger of three commits)
2016-02-27 03:42:11 +01:00