602 Commits

Author SHA1 Message Date
paramat
5f7cfce654 Biomes: Add 'get heat', 'get humidity', 'get biome data' APIs
'get biome data' returns biome id, heat and humidity.
Clean up nearby lines in lua_api.txt.
2019-03-13 14:43:10 +13:00
Paramat
f46c0b9c3f Biomes: Add vertical biome blend (#6853)
Add 'vertical blend' parameter to biome registration that defines how
many nodes above the biome's 'y max' limit the blend will extend.
2019-03-13 14:42:17 +13:00
paramat
ee99140e3a Simple decorations: Make 'place_offset_y' usable with simple decorations
Necessary for placing the base cube of 'plantlike_rooted' drawtype in the
seabed instead of on it.
Useful for placing decorations sunk into, or buried in, the ground.
2019-03-12 21:27:27 +13:00
paramat
e976ac2bb5 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.
2019-03-12 21:21:55 +13:00
Dániel Juhász
5cff3e4865 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).
2019-03-12 16:39:17 +13:00
SmallJoker
47b883b4b9 is_area_protected: Rename from intersects_protection (#7073)
* is_area_protected: Rename from intersects_protection
Return first protected position
Clarify docs: Mods may overwrite the function
2019-03-12 15:36:57 +13:00
Paramat
7fb7a79f8d Intersects_protection(): Move from Minetest Game to builtin (#6952)
A useful function that applies 'core.is_protected()' to a 3D lattice of
points evenly spaced throughout a defined volume, with a parameter for
the maximum spacing of points.
2019-03-12 15:36:34 +13:00
red-001
6b3d44e5c5 Allow the join/leave message to be overridden by mods. 2019-03-12 15:33:25 +13:00
number Zero
54c3c2df3e 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.
2019-03-06 15:23:23 +13:00
rubenwardy
f2f15a1944 Fix naming conventions of noise userdata 2019-03-06 14:51:48 +13:00
DS
ad846371eb Add sounds for falling and attached nodes (#7719)
* Add sounds for falling and attached nodes

The sound specified in `node_definition.sounds.fall` is used.
When a falling node is spawned at a position or an attached node drops, the sound is played at this position.

* allow all sorts of soundspecs
2019-03-06 14:26:26 +13:00
ashtrayoz
35f2bcf9d4 Add callback to preserve node metadata as item metadata 2019-03-06 14:26:17 +13:00
adrido
697fe27668 Formspec: textarea with scrollbar improvements
Increase scrollrate depending on fontsize

Scroll on mousewheel

Allow scrolling and marking text on non writable textareas

Update lua api about readonly mode

Show scrollbar if text overflows
2019-02-16 15:14:58 +13:00
rubenwardy
9177301964 Deprecate modpack.txt and use modpack.conf instead (#7892)
* Deprecate modpack.txt and use modpack.conf instead
2019-02-16 14:56:20 +13:00
rubenwardy
ebfd6a61d3 Add online content repository
Replaces mods and texture pack tabs with a single content tab
2019-02-16 14:46:21 +13:00
adelcoding1
fd38beb656 FormSpec : Add an auto vertical scrollbar to the textarea 2019-02-16 14:10:45 +13:00
Andrew Ward
ea46add1f6 Load dependencies and description from mod.conf 2019-02-16 14:00:56 +13:00
Loïc Blot
091853c813 Implement minetest.register_can_bypass_userlimit (#6369)
* Implement minetest.register_on_userlimit_check

This new callback permits to bypass the max_users parameter with new mods condition, based on player name or IP
Only one mod needs to permit it.

Move core part for builtin privileges checks to builtin
2019-02-16 13:38:47 +13:00
rubenwardy
ef46c6ef2c Fix mistake when calling on_priv_grant/revoke, and document them (#6341) 2019-02-16 13:37:57 +13:00
rubenwardy
59ba17be14 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
2019-02-16 13:37:42 +13:00
HybridDog
cace65670c Add minetest.load_area (#8023) 2019-02-12 19:52:25 +13:00
Wuzzy
9d11e843a9 Add slippery group for nodes (players/items slide) 2019-02-11 13:14:03 +13:00
Wuzzy
d47294bd4e Add eat sound (#7956) 2019-02-10 18:39:09 +13:00
SmallJoker
ecbb9310de Bump version to 0.4.17 2018-06-03 17:35:20 +02:00
SmallJoker
fe41725e50 core.rotate_node: Do not trigger after_place_node (#6900) 2018-06-03 17:32:00 +02:00
paramat
c683e050d4 Find nodes in area (under air): Raise volume limit and document it 2018-06-03 17:32:00 +02:00
you
880a25c921 Add minetest.is_player (#7013)
* Add minetest.is_player

* First use for is_player
2018-06-03 17:32:00 +02:00
sfan5
7d9dbbbf3c Update documentation regarding authentication handler and related functions
Properly document it instead of referencing the builtin handler as
authoritative "example" code.
Also adds definition of get_auth_handler() which was missing previously.
2018-06-03 17:32:00 +02:00
Ezhh
3f1094475f Improve documentation for player:set_attribute() 2018-06-03 17:32:00 +02:00
paramat
1cf32b22be Lua_api.txt: Add documentation of required mapgen aliases 2018-06-03 17:32:00 +02:00
sfan5
b816c63196 Add minetest.safe_write_file() to script API 2018-06-03 17:32:00 +02:00
Rob Blanckaert
4d9bf75d3a Add sha1 to lua utils. (#6563) 2018-06-03 17:32:00 +02:00
raymoo
7b8288d605 Fix default item callbacks to work with nil users (#5819)
* Fix default item callbacks to work with nil users

* item.lua: Handle node drops for invalid players

The if-condition for the dropping loop is the same as `inv`, which means that the 2nd possible definition of `give_item` is never used.
Remove redundant `local _, dropped_item`
2018-06-03 17:32:00 +02:00
Auke Kok
2f969196b8 Correct prot_vers in lua_api.txt.
We should avoid providing incorrect struct members in documentation
since people will be coding based on them.
2018-06-03 17:32:00 +02:00
raymoo
9927076b47 Document orientation parameter of set_attach (#6473) 2018-06-03 17:31:59 +02:00
paramat
b8f473be21 Leveled nodebox: Change levels from 1/63rds to 1/64ths
Add missing documentation of leveled nodebox to lua_api.txt, plus
a little cleaning up nearby.
2018-06-03 17:31:59 +02:00
sfan5
5b2461c713 Fix core.wrap_text and make its behaviour consistent with the docs
Code based on initial implementation by @dsohler.
2018-06-03 17:31:59 +02:00
Dániel Juhász
9d40d89d27 Make dropped items colorable 2018-06-03 17:31:59 +02:00
SmallJoker
037b01eac7 Trigger on_rightclick regardless on the formspec meta field
Document behaviour for older clients.
2018-06-03 17:31:59 +02:00
Dániel Juhász
322e5aaf92 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
2018-06-03 17:31:59 +02:00
SmallJoker
03bc584f57 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
2018-06-03 17:31:59 +02:00
DS
14b039f0b4 fix an example in lua_api (#5604) 2018-06-03 17:31:59 +02:00
red-001
e665e75e77 Fix typos/mistakes in the documentation for colour related functions. (#5936) 2018-06-03 17:31:59 +02:00
sfan5
87b9451820 Revert version scheme changes
This reverts commit 41b7823057bdaddd760f932dce802719301c3a0f.
This reverts commit 7968f1ddaa67432719d5becdda5ca8bec58faa47.
2017-11-20 19:28:58 +01:00
Loïc Blot
7968f1ddaa
New version scheme (#6292)
* Version changes: current dev version is now 0.4.17

* This change permit to have multi branches with various versions
* Dev version is 0.4.17-dev and next release will be 0.4.17
2017-08-20 17:25:07 +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