Commit Graph

584 Commits

Author SHA1 Message Date
rubenwardy 096ea031de Add on_grant and on_revoke callbacks (#4713)
* Add register_on_priv_grant/revoke, and on_grant/revoke to privs. Call from /grant and /revoke

* Call on_grant and on_revoke callbacks from set_privs
2017-08-26 08:17:05 +02:00
Dániel Juhász f6a33a1a7a Overlays for wield and inventory images (#6107)
* Overlays for wield and inventory images
2017-08-25 13:20:53 +02:00
Ekdohibs b24e6433df Add clientside translations. 2017-08-24 17:54:10 +02:00
stujones11 ac4884c3d6 Make entity selection and collision boxes independently settable (#6218)
* Make entity selection and collision boxes independently settable
2017-08-24 10:01:16 +02:00
SmallJoker f7d50a8078 Respect object property hp_max field for players (#6287)
* Respect object property hp_max field for players
This allows modders to configure the maximal HP per player

* Statbars: Downscale bar to full 20 HP when exceeding this value
Add default max HP for players and breath constants to builtin
Document the constants

* Rename PLAYER_MAX_HP -> PLAYER_MAX_HP_DEFAULT
2017-08-23 22:32:10 +02:00
paramat 7657fe7a50 Minimap: Add new HUD flag for minimap radar mode
Flag default is true to not change default behaviour.
The existing minimap HUD flag remains the master control for minimap.
2017-08-20 23:58:15 +01:00
Loïc Blot c99dcbaca9 New version scheme (#6292)
* Version changes: current dev version is now 0.5.0

* This change permit to have multi branches with various versions
* Dev version is 0.5.0-dev and next release will be 0.5.0
2017-08-20 17:20:11 +02:00
Dániel Juhász 71b02d626f Make dropped items colorable 2017-08-14 12:52:13 +01:00
Wuzzy 2ea26e655d Add slippery group for nodes (players/items slide) 2017-08-13 21:39:08 +01:00
SmallJoker 4381fe0a0a Trigger on_rightclick regardless on the formspec meta field
Document behaviour for older clients.
2017-08-13 21:37:30 +01:00
Loïc Blot 550c0404a8 Add LuaEntity on_death callback (#6177)
Add LuaEntity on_death callback

This fixes #5474
2017-07-27 11:32:35 +02:00
paramat 0c99da4255 Create_schematic documentation: Update for per-node force-place
The probability list has to also encode per-node force-place.
2017-07-26 02:41:41 +01:00
Ben Deutsch c50a57c070 Clouds API: change speed from 'y' to 'z', ColorSpecs in Lua docs (#6164) 2017-07-24 18:04:00 +02:00
cx384 d60434c7b1 Add information about the button height 2017-07-16 13:10:34 +02:00
paramat 8299e4b67e Biomes/decorations/ores: Make relative to 'water_level' setting
Add 'biome_zero_level' argument to 'generateBiomes()', 'deco_zero_level'
argument to 'placeAllDecos()' and 'ore_zero_level' to 'placeAllOres()'
to allow mapgens to vertically shift the registered biomes, decorations
and ores per-mapchunk.
Will also allow many realm possibilities in future mapgens.
2017-07-11 01:14:24 +01:00
number Zero ef285b2815 Add 'plantlike_rooted' drawtype
Useful for underwater plants.
Node consists of a base cube plus a plantlike extension that can pass through
liquid nodes above without creating air bubbles or interfering with liquid flow.
Uses paramtype2 'leveled', param2 defines height of plantlike extension.
2017-07-11 01:02:22 +01:00
Dániel Juhász 3caad3f3c9 Expose getPointedThing to Lua
This commit introduces Raycast, a Lua user object, which can be
used to perform a raycast on the map. The ray is continuable, so one can
also get hidden nodes (for example to see trough glass).
2017-07-07 22:28:23 +01:00
paramat 936d67dad4 Ores: Make 'absheight' flag non-functional
The 'absheight' flag was added years ago for the floatlands of 'indev'
mapgen (now deleted). The feature mirrored all ore placement around y = 0
to place ores in floatlands.

In MTG we now use dedicated ore registrations for floatlands.

The feature is crude, inflexible, problematic and very rarely used, it
also makes ore vertical range code more complex.
Minetest 0.5 is a good chance to remove the feature.

The flag itself remains to not break flag values.
2017-06-26 04:38:36 +01:00
Loic Blot 1237206d4b
Revert "Ores: Make 'absheight' flag non-functional"
This reverts commit 90ed6fc732.
2017-06-25 23:08:31 +02:00
paramat 90ed6fc732 Ores: Make 'absheight' flag non-functional
The 'absheight' flag was added years ago for the floatlands of 'indev'
mapgen (now deleted). The feature mirrored all ore placement around y = 0
to place ores in floatlands.

In MTG we now use dedicated ore registrations for floatlands.

The feature is crude, inflexible, problematic and very rarely used, it
also makes ore vertical range code more complex.
Minetest 0.5 is a good chance to remove the feature.

The flag itself remains to not break flag values.
2017-06-25 05:01:42 +01:00
Dániel Juhász 5a41a98ff6 Helper methods for hardware colorization (#5870) 2017-06-24 20:15:09 +02:00
Gael-de-Sailly bc53c82bcf Add minetest.rgba function that returns ColorString from RGBA or RGB values 2017-06-22 03:11:50 +01:00
Dániel Juhász 0fcaf9fb1b Automatic item and node colorization (#5640)
* Automatic item and node colorization

Now nodes with a palette yield colored item stacks, and colored items
place colored nodes by default. The client predicts the colorization.

* Backwards compatibility

* Use nil

* Style fixes

* Fix code style

* Document changes
2017-06-20 11:19:56 +02:00
SmallJoker 6eb03c135f find_nodes_in_area: Extend maximal count to U32_MAX (#5277)
Extend documentation, limit area volume
Remove u16 count limitation

* Prevent integer overflow, replace minp/maxp with pos1/pos2
2017-06-19 16:30:26 +02:00
Rui ff73c7a5da Sound: Add pitch option (#5960)
* Sound: Add pitch option
2017-06-11 13:58:26 +02:00
DS 07be63b287 fix an example in lua_api (#5604) 2017-06-10 13:49:28 +02:00
red-001 33b513f76c Fix typos/mistakes in the documentation for colour related functions. (#5936) 2017-06-06 17:02:44 +02:00
ShadowNinja 80dc961d24 Bump version to 0.4.16 2017-06-03 14:42:10 -04:00
ShadowNinja e4d3639d40 Update remove_player documentation
This function only removes player meta data,
not player authentication data.
2017-06-03 14:39:49 -04:00
Wuzzy e91ffa0c91 Mention data type for get/set_attribute in docs (#5884) 2017-06-03 08:20:22 +02:00
Wuzzy 1b83b0acfd Lua_api.txt: Various edits and Markdown syntax improvements
Add minor bits of missing Lua API documentation.
Remove L-system lighting bug warning.
Clarify 2 lines in node timer documentation.
Fix many Markdown syntax errors in lua_api.txt.
2017-06-02 18:01:12 +01:00
Dániel Juhász 30c51a1115 Document hardware coloring and soft node overlays (#5876) 2017-06-02 15:57:59 +02:00
SmallJoker 0120fe16a7 CSM: Document forgotten functions 2017-05-16 21:57:26 +01:00
rubenwardy f286c54908 Replace inconsistent mentions of core.* with minetest.* (#5749) 2017-05-12 11:27:58 +02:00
sfan5 071e114ffa Private nodemeta (#5702)
* Private node metadata that isn't sent to the client
2017-05-10 15:29:21 +02:00
paramat da88a18676 Revert custom player collision box and step height commits
These caused inability to pass through 2 node high spaces or step up onto slabs
or steps when a new client connected to an older server.
2017-05-09 03:52:28 +01:00
Loïc Blot c1b3ed4180 Player attrs: permits to remove an attribute by setting value to nil (#5716)
* Player attrs: permits to remove an attribute by setting value to nil

When doing player:set_attribute("attr", nil) remove attribute

Also remove a useless check on C++ API part (already done by checkplayer)

Fix #5709
2017-05-07 12:13:15 +02:00
paramat 2d5bd7f414 Player properties: Set correct default collisionbox
Recent commit b6f4a9c7e1 removed a hardcoded
player collisionbox which resulted on falling back to an incorrect default.
This stopped players walking through 2-node high spaces and made the player
slightly wider.

Improve docs for custom player collisionbox feature and reformat nearby lines.
2017-05-07 06:10:13 +01:00
TeTpaAka b6f4a9c7e1 Make the player collisionbox settable 2017-05-06 15:41:05 -04:00
ShadowNinja 43d1f375d1 Use a settings object for the main settings
This unifies the settings APIs.

This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.
2017-05-06 15:33:19 -04:00
red-001 d6cf5450a8 Add option to also check the center to `find_node_near` (#5255)
* Add option to also check the center to `find_node_near`
2017-05-04 22:52:58 +02:00
paramat ad9fcf859e Set sky API: Add bool for clouds in front of custom skybox
Default true.
Add 'm_clouds_enabled' bool to sky.h, set from new bool in 'set sky' API.
Make 'getCloudsVisible()' depend on 'm_clouds_enabled' instead of
'm_visible' (whether normal sky is visible).
2017-05-02 20:42:35 -07:00
Brandon bd921a7916 Sound API: Add fading sounds 2017-05-03 03:12:45 +01:00
Ben Deutsch f1d7a26b7c Add clouds API 2017-04-30 00:06:13 +01:00
you 7f4cdbcbe9 Fix click-digging torches (#5652)
Torches are dug instantly again.
When the digging time is 0, a delay of 0.15 seconds is added between digging nodes. If the left mouse button is released, the delay is set to 0, thus click-digging.
2017-04-28 20:12:28 +02:00
Auke Kok e21a1ab3bd Allow mesh and nodeboxes to wave like plants or leaves. (#3497)
We introduce a new value for "waving" - 2:

0 - waving disabled
1 - wave like a plant
2 - wave like a leave

Plantlike nodes will only allow waving = 1, but for leaves we will
permit both 1 and 2 since current minetest_game sets it to 1 for
all leaves. This makes it somewhat backwards compatible.

For mesh and nodebox, values 1 and 2 are both valid, and the node
can wave in both fashions as desired.

I've tested this with the crops:corn plants, which are mesh nodes,
and the results are really good. The code change is trivial as
well, so I've opted to document the waving parameter in lua_api.txt
because it was missing from there.

Nodeboxes likely will not wave properly unless waving = 2. However
it's possible that waving=1 may be desired by some mod developers
for geometries I have not tried, so the code will not prohibit
either value for mesh and nodebox drawtypes.

Add lua_api.txt documentation for this feature and document both
the existing functionality and the expansion to mesh and nodebox
drawtypes.
2017-04-28 20:11:43 +02:00
red-001 1ef9eee311 Allow scripts to get the client protocol version in non-debug builds. (#5649) 2017-04-27 11:49:44 +02:00
Bluebird d130e1fdc0 Fix incorrect formspec-tooltip doc, add detail in 'floodable' & 'on_flood' docs (#5660)
* Fix incorrect formspec tooltip documentation

* Improve `floodable` and `on_flood` documentation.

The original documentation did not specify that liquids should not themselves be floodable. This is probably something that should be mentioned.
2017-04-27 11:49:07 +02:00
Bluebird 70ceeb80a1 Tiny documentation fix. (#5659)
There are plenty of lines longer than 80 characters, and spliting the function declaration across two lines can be momentarily confusing.
2017-04-26 07:24:15 +02:00
Loïc Blot 29ab20c272 Player data to Database (#5475)
* Player data to Database

Add player data into databases (SQLite3 & PG only)

PostgreSQL & SQLite: better POO Design for databases

Add --migrate-players argument to server + deprecation warning

* Remove players directory if empty
2017-04-23 14:35:08 +02:00