Commit Graph

5987 Commits

Author SHA1 Message Date
paramat
04fb10914c 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
39a9e9874e 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
1b8dbf072a 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
a39d536282 Sky.cpp: Improve code style. Define sky colours as SColor 2016-06-11 23:35:38 +01:00
Ekdohibs
559dd99469 Make node timers more efficient 2016-06-11 23:35:17 +01:00
kwolekr
27aff22a9b 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
33b874fea3 Settings: Clean up settings changed callback code 2016-06-11 00:11:37 -04:00
est31
817fea6330 Fix android build
Thanks to @Wayward1 for reporting the bug.

Fixes #4212.
2016-06-11 05:44:55 +02:00
Diego Martinez
dac40af6ee Server: Add reason for leave to on_leaveplayer callbacks 2016-06-11 04:17:04 +01:00
paramat
b24d21d1ae 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
3ef71edd81 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
c7297e552b Lua_api.txt: Split long lines. Capitalise 'Biome API'. Minor edits 2016-06-07 04:45:41 +01:00
kwolekr
d4457ef420 Mapgen: Optimize biomemap creation by combining with generateBiomes 2016-06-05 13:30:02 -04:00
paramat
d24f384174 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
7841f1c509 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
109c7e3349 Biomes: Define and use biome_t for biome IDs 2016-06-04 03:00:45 -04:00
kwolekr
8ed467d438 PcgRandom: Fix/improve documentation 2016-06-04 02:16:06 -04:00
kwolekr
dfbdb5bcd7 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
2060fd9cbe 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
1e86c89f36 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
7ea4a03c83 Sapier's fix for the RESEND RELIABLE problem (#4170) 2016-06-03 17:50:21 +10:00
paramat
569998011e 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
14ef2b445a 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
1d40385d4a 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
0e44af9f70 Translated using Weblate (Hebrew)
Currently translated at 7.8% (70 of 887 strings)
2016-05-30 16:41:20 +02:00
Andrey K
6792447dfa Translated using Weblate (Russian)
Currently translated at 57.2% (508 of 887 strings)
2016-05-30 16:41:20 +02:00
Emon Omen
5e9663d3d4 Translated using Weblate (Italian)
Currently translated at 100.0% (887 of 887 strings)
2016-05-30 16:41:20 +02:00
Fixer
30cd77a30b Translated using Weblate (Ukrainian)
Currently translated at 39.3% (349 of 887 strings)
2016-05-30 16:41:20 +02:00
Sergey
dc33ecad6d 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
526c978f96 Translated using Weblate (Russian)
Currently translated at 57.1% (507 of 887 strings)
2016-05-30 16:38:52 +02:00
Wuzzy
3842c3de65 Translated using Weblate (German)
Currently translated at 100.0% (887 of 887 strings)
2016-05-30 16:30:47 +02:00
est31
27db929252 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
4134d8ad13 protection_bypass priv can now be revoked in singleplayer (#4169) 2016-05-30 22:40:32 +10:00
Zeno-
a9bc7dc405 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
d499ec4838 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
62d15ac7c1 Add base64 encoding and decoding to the lua api. (#3919) 2016-05-27 23:37:28 -04:00
kwolekr
c4e083f7e1 Disallow external linkage for default Cavegen NoiseParams 2016-05-27 23:23:58 -04:00
kwolekr
c8fd232678 Dungeongen: Remove dependency on Mapgen 2016-05-27 23:23:58 -04:00
kwolekr
fd0efb21c3 Mapgen: Combine dungeon generation code 2016-05-27 23:23:58 -04:00
kwolekr
0810901766 Mapgen: Deduplicate common constructor code 2016-05-27 23:23:58 -04:00
kwolekr
0df5c01a8c Mapgen: Remove calculateNoise from most mapgens
This commit moves noise calculation to the functions where the noise is
actually required, increasing the separation of concerns and level of
interdependency for each mapgen method.  Valleys Mapgen is left unmodified.
2016-05-27 23:23:58 -04:00
kwolekr
c5968049bb Mapgen V7: Remove now-unused ridge heightmap 2016-05-27 23:23:58 -04:00
kwolekr
548d99bb45 Cavegen: Move V5-style caves to CavesNoiseIntersection 2016-05-27 23:23:58 -04:00
kwolekr
6151f7bc4b Cavegen: Minor misc. fixes
- Convert instances of numeric literal doubles to floats
- Move dswitchint to a local variable now that being a member is unnecessary
- Improve const correctness
- Indentation fixes
2016-05-27 23:23:58 -04:00
kwolekr
b1eb757e60 Fix undefined evaluation order when constructing random vectors
MSVC and GCC evaluate parameters in right-to-left order, whereas Clang
evaluates in left-to-right order, and of course, an optimization could
leave the order of evaluation completely indeterminate.

This commit fixes all instances of the error by explicitly assigning the
results of expressions that use PseudoRandom::next() or range() to their
respective vector components.

The right-to-left evaluation behavior is preserved since Clang is much less
commonly used to compile Minetest than GCC and MSVC combined, and would
therefore cause the least harm.
2016-05-27 23:23:58 -04:00
kwolekr
5b05f75a27 Cavegen: Re-add small caves to CavesRandomWalk 2016-05-27 23:23:58 -04:00
kwolekr
db1b4dc890 Cavegen: Remove CavesRandomWalk dependency on Mapgen 2016-05-27 23:23:58 -04:00
kwolekr
68b1cd8d1b Cavegen: Merge instances of repetitive surface level-finding code 2016-05-27 23:23:58 -04:00
kwolekr
a605d69092 Cavegen: Remove CavesV6 dependency on Mapgen 2016-05-27 23:23:58 -04:00
kwolekr
bf25837617 Cavegen: Rename CaveV6 to CavesV6
- Add comment explaining why it exists
- Remove unused 'flooded' variable
- Rename shadowed variable
- Fix some code style
2016-05-27 23:23:58 -04:00