5915 Commits

Author SHA1 Message Date
Rogier-5
9f24b357c4 Fix & make linux conditionals uniform (#4278)
The source used a hodge-podge of different combinations of different
macros to check for linux: 'linux', '__linux', '__linux__'.

As '__linux__' is standard (Posix), and the others are not, the source
now uniformly uses __linux__. If either linux or __linux are defined,
it is made sure that __linux__ is defined as well.
2016-07-04 21:00:57 +02:00
est31
4daf0d04be Disable joysticks per default for now
It seems that various different devices register as
Joysticks on linux, and their presence has caused
lots of confusion amongst minetest users.

Therefore, disable the joystick feature.

Closes #4261
Closes #4221
2016-07-04 20:49:13 +02:00
est31
8465b51bd1 Remove top left minetest watermark
Move version information into the window caption.

On popular player request.

Fixes #4209.
2016-07-03 21:49:33 +02:00
kwolekr
7af0dede5f Add MapSettingsManager and new mapgen setting script API functions
This commit refactors the majority of the Mapgen settings system.
- MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
  instead of the EmergeManager.
- New Script API functions added:
    core.get_mapgen_setting
    core.get_mapgen_setting_noiseparams,
    core.set_mapgen_setting, and
    core.set_mapgen_setting_noiseparams.
- minetest.get/set_mapgen_params are deprecated by the above new functions.
- It is now possible to view and modify any arbitrary mapgen setting from a mod,
  rather than the base MapgenParams structure.
- MapgenSpecificParams has been removed.
2016-07-03 15:38:36 -04:00
kwolekr
55913a1218 Mapgen: Refactor mapgen creation and management
- Move mapgen creation logic out of EmergeManager and into Mapgen
- Internally represent mapgen type as an enum value, instead of a string
- Remove the need for a MapgenFactory per mapgen
2016-07-03 14:04:11 -04:00
Pavel Puchkin
60a2ae463c Remove old docs. We have VCS history anyways. (#4266) 2016-07-03 13:30:09 +02:00
David Carlier
82bb5cc0f0 openbsd's port fix for non Linux systems w/o libRT
X11 headers are not always in expected locations, add them to include list.

Modifications by est31: indentation fixes, commit message improved
2016-07-03 13:01:49 +02:00
HybridDog
516b701076 Only allow strings to be passed to minetest.global_exists (#4253)
Sometimes you accidentally forget the quotes when using global_exists, this makes minetest abort if you did so.

M  builtin/common/strict.lua
2016-06-28 06:34:22 +02:00
est31
7db2e230a2 Also shut down when SIGTERM was received
Fixes #4251
2016-06-24 20:43:29 +02:00
paramat
fc986c7adc Mgflat/fractal/v7/valleys: Denser 3D noise tunnels
Reduce spread from 96 to primes 61 and 67 (either side of 64)
Prime spreads help to keep 3D noise periodic features unaligned
'cave width' 0.2 to preserve tunnel width
Reduce octaves to 3 to improve network structure
2016-06-24 02:17:51 +01:00
raymoo
be9acaf9df Player: New get_look, set_look API
Deprecate get_look / set_look pitch / yaw
2016-06-24 02:13:09 +01:00
paramat
2c54eb77d2 Dungeons: Generalise use, add capabilities, various modifications
- Generalise node names to c_wall and c_alt_wall
- Remove 'mossratio' and instead disable alt_wall loop if
  c_alt_wall == CONTENT_IGNORE
- Use one generalised 3D noise for alternative wall nodes and in
  mgv6 create moss distribution similar to the previous

- Rename rarity noise to density noise and enable the option of multiple
  dungeons per chunk determined by the value. Recreate previous distribution
- Add parameters for min and max rooms per dungeon
- Add dungeon y limits

- Integrate river water properly

Generalisation is needed now that we have sandstone and desert stone
dungeons by default and can choose any node for alternative structure.
The current code is based around cobble dungeons with mossycobble
alternative nodes, the 2 noises controlling the alternative nodes
are based on wetness.

Enabling multiple dungeons per chunk with definable number of rooms
allows the option of very dense and complex underground structures
that could interconnect to create megastructures.
Y limits are added to be consistent with other mapgen elements, and
enable locaton of dungeon or megastructure realms as part of our
'stacked realms' philosophy.
2016-06-17 04:42:42 +01:00
Auke Kok
5ed0d77c58 Builtin/game/item: Add place_param2 nodedef field
This allows a nodedef to specify a fixed value for param2 to be
used for all normal placements.

There are several uses for this:

- nodes that require param2 to be set to a non-zero value for
  internal mod use. E.g. leafdecay could use this to detect that
  leaves are played by players.
- force wallmounted or facedir value at placement at placement

This overrides any player look direction or other on-the-fly
param2 setting during placement.
2016-06-17 04:41:20 +01:00
Yutao Yuan
79f9048047 Move unknown node message when applying texture overrides to infostream (#4218)
Texture packs have no way to know what nodes are available, so this shouldn't be a error message.
2016-06-14 00:29:15 +02:00
paramat
67696f94db Sky.cpp: Improve code style. Define sky colours as SColor 2016-06-11 23:35:38 +01:00
Ekdohibs
f270619d3f Make node timers more efficient 2016-06-11 23:35:17 +01:00
kwolekr
c3d49b16ea Random misc. warning fixes and cleanups
- Fix unused c_sand member warning in Valleys Mapgen
 - Fix some code style
 - Make some std::string params const ref
2016-06-11 03:23:53 -04:00
kwolekr
93cf70fbba Settings: Clean up settings changed callback code 2016-06-11 00:11:37 -04:00
est31
5517a18003 Fix android build
Thanks to @Wayward1 for reporting the bug.

Fixes #4212.
2016-06-11 05:44:55 +02:00
Diego Martinez
34b9126292 Server: Add reason for leave to on_leaveplayer callbacks 2016-06-11 04:17:04 +01:00
paramat
17e798243a Sky: Darker, bluer sky and improved horizon haze at night
Add new colours 'skycolour_bright_night', 'bgcolour_bright_night'
and enable these between sunset end and sunrise start
Night sky has same hue as day sky but is darker and more saturated
Night horizon haze (bgcolour) is slightly less saturated and
slightly brighter than night sky, to be consistent with daytime
horizon haze
2016-06-09 01:50:52 +01:00
Paramat
0e826e41dd Sky: Fix sunrisebg texture motion (#4199)
Top of texture no longer shows above horizon during night and day
2016-06-08 16:43:27 +10:00
paramat
6c9d1c187e Lua_api.txt: Split long lines. Capitalise 'Biome API'. Minor edits 2016-06-07 04:45:41 +01:00
kwolekr
7dc6369329 Mapgen: Optimize biomemap creation by combining with generateBiomes 2016-06-05 13:30:02 -04:00
paramat
3616e70c58 Biome API: Add per-biome riverbed material and depth
Mgvalleys: Remove riverbed sand placement from base terrain generation
Riverbed material placement moved to MapgenBasic::generateBiomes()
Document fields and add note that the biome API is still unstable
2016-06-05 16:37:02 +01:00
MillersMan
871a98ce3d Mapgen: Performance improvement and fixes for updateLiquid (#4065)
- Adds only ~100 nodes per chunk to trans_liquid with similar processing time
- Adds liquid nodes themselves instead of potential solid nodes below them
- CONTENT_IGNORE nodes are interpreted as if they continue their neighborhood
- This allows liquid columns to span multiple chunks without being interrupted
- NOTE: Expects an one-node border in generation chunk without liquid changes
2016-06-04 19:32:54 -04:00
kwolekr
8ee3cb1f4a Biomes: Define and use biome_t for biome IDs 2016-06-04 03:00:45 -04:00
kwolekr
60173ed48e PcgRandom: Fix/improve documentation 2016-06-04 02:16:06 -04:00
kwolekr
72809172eb Change internal type for seeds to s32
This fixes value truncation (and therefore incompatibility) on platforms
with an LP32 data model, such as VAX or MS-DOS.
2016-06-04 01:51:44 -04:00
est31
b7d656581d Initial Gamepad support
Adds initial ingame gamepad support to minetest.

Full Formspec support is not implemented yet and
can be added by a later change.
2016-06-03 19:42:57 +02:00
est31
292979dfe1 Input related generalisations
* Move key types into own file
* Use Generalized input methods in game.cpp
2016-06-03 19:42:57 +02:00
Robert Kiraly
7a3b2a196a Sapier's fix for the RESEND RELIABLE problem (#4170) 2016-06-03 17:50:21 +10:00
paramat
ba499eee63 Mgv7: Always carve river channels in mountain terrain
Previously, rivers were sometimes blocked by vertical walls
of mountain terrain due to river carving being disabled
when base terrain height was below water_level - 16
Remove now unused base terrain heightmap created in
generateTerrain()
2016-06-02 07:31:01 +01:00
Ekdohibs
e7b84d7db6 Add colored text (not only colored chat).
Add documentation, move files to a proper place and avoid memory leaks.
Make it work with most kind of texts, and allow backgrounds too.
2016-05-31 17:34:29 +02:00
TriBlade9
43390af812 Colored chat working as expected for both freetype and non-freetype builds. @nerzhul improvements * Add unit tests * Fix coding style * move guiChatConsole.hpp to client/ 2016-05-31 17:34:29 +02:00
yuval hreman
f65426288e Translated using Weblate (Hebrew)
Currently translated at 7.8% (70 of 887 strings)
2016-05-30 16:41:20 +02:00
Andrey K
1694f4d35d Translated using Weblate (Russian)
Currently translated at 57.2% (508 of 887 strings)
2016-05-30 16:41:20 +02:00
Emon Omen
9c2ae9ba77 Translated using Weblate (Italian)
Currently translated at 100.0% (887 of 887 strings)
2016-05-30 16:41:20 +02:00
Fixer
de1ae6bf49 Translated using Weblate (Ukrainian)
Currently translated at 39.3% (349 of 887 strings)
2016-05-30 16:41:20 +02:00
Sergey
c29ca1b10f Translated using Weblate (Russian)
Currently translated at 57.0% (506 of 887 strings)

This is a merger of three commits.
2016-05-30 16:41:11 +02:00
Vasily Pavlov
5c72692f4e Translated using Weblate (Russian)
Currently translated at 57.1% (507 of 887 strings)
2016-05-30 16:38:52 +02:00
Wuzzy
4c17337d1c Translated using Weblate (German)
Currently translated at 100.0% (887 of 887 strings)
2016-05-30 16:30:47 +02:00
est31
9f3636a238 Add minetest.check_password_entry callback
Gives a convenient way to check a player's password.

This entirely bypasses the SRP protocol, so should be used
with great care.

This function is not intended to be used
in-game, but solely by external protocols, where no
authentication of the minetest engine is provided, and
also only for protocols, in which the user already gives the
server the plaintext password.

Examples for good use are the classical http form, or irc,
an example for a bad use is a password change dialog inside
formspec.

Users should be aware that they lose the advantages of the SRP
protocol if they enter their passwords for servers outside the
normal entry box, like in in-game formspec menus,
or through irc /msg s,

This patch also fixes an auth.h mistake which has mixed up the
order of params inside the decode_srp_verifier_and_salt function.

Zeno-: Added errorstream message for invalid format when I committed
2016-05-30 23:28:08 +10:00
Sokomine
df827a4163 protection_bypass priv can now be revoked in singleplayer (#4169) 2016-05-30 22:40:32 +10:00
Zeno-
9981f33cb2 Remove unused code in s_security.cpp (#4172)
Note that the macro CHECK_FILE_ERR implements the code removed
2016-05-30 22:37:40 +10:00
Auke Kok
9cb1159917 Particles: Add option to remove particles on collision
Adds the particle option `collision_removal = bool`

Some particles are hard to use right now since they either go through
solid blocks (without collision detection), and with collision
detection enabled they (e.g. raindrops) would just stop dead on the
floor and sit there until they expire, or worse, scrape along a wall
or ceiling.

We can solve the problem by adding a boolean flag that tells the
particle to be removed if it ever collides with something. This will
make it easier to add rain that doesn't fall through your roof or stick
on the top of it. Or clouds and smoke that don't go through trees.

Particles that collide with this flag are marked expired
unconditionally, causing them to be treated like normal expired
particles and cleaned up normally.

Documentation is adjusted accordingly.

An added bonus of this patch is that particles can potentially collide
many times with nodes, and this reduces the amount of collisions to 1
(max), which may end up reducing particle load on the client.
2016-05-28 00:08:23 -04:00
red-001
1e4b9eb2d9 Add base64 encoding and decoding to the lua api. (#3919) 2016-05-27 23:37:28 -04:00
kwolekr
5c6efccd3c Disallow external linkage for default Cavegen NoiseParams 2016-05-27 23:23:58 -04:00
kwolekr
bf40f1eded Dungeongen: Remove dependency on Mapgen 2016-05-27 23:23:58 -04:00
kwolekr
ad404363ec Mapgen: Combine dungeon generation code 2016-05-27 23:23:58 -04:00