926 Commits

Author SHA1 Message Date
Loïc Blot
a4cac3613a Implement player attribute backend (#4155)
* This backend permit mods to store extra players attributes to a common interface.
* Add the obj:set_attribute(attr, value) Lua call
* Add the obj:get_attribute(attr) Lua call

Examples:
* player:set_attribute("home:home", "10,25,-78")
* player:get_attribute("default:mana")

Attributes are saved as a json in the player file in extended_attributes
key

They are saved only if a modification on the attributes occurs and loaded
when emergePlayer is called (they are attached to PlayerSAO).

 Author:    Loïc Blot <nerzhul@users.noreply.github.com>
 Date:      Fri Jan 27 08:59:30 2017 +0100
 You are currently cherry-picking commit b7a98e985.
2021-11-14 04:58:45 +03:00
rubenwardy
e21edd121f Rename ObjectRef methods to be consistent and predictable
Author:    rubenwardy <rubenwardy@gmail.com>
 Date:      Mon Jan 16 13:08:59 2017 +0000
 You are currently cherry-picking commit 63c892eed.
2021-11-14 03:27:38 +03:00
ShadowNinja
44c489d7bd 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.

 Author:    ShadowNinja <shadowninja@minetest.net>
 Date:      Fri Dec 12 14:49:19 2014 -0500
 You are currently cherry-picking commit 43d1f375d.
2021-11-14 03:15:12 +03:00
proller
1efdd353aa Merge remote-tracking branch 'minetest/master' 2016-12-28 02:43:20 +03:00
sfan5
b16252dcae Various anticheat improvements
* Calculate maximum interact distance from wielded tool
* New "interacted_while_dead" cheat_type for the Lua API
* Disallow dropping items while dead
* Move player to spawn before resurrecting them
2016-12-26 22:34:29 +01:00
proller
4d4ffa4c1f Merge remote-tracking branch 'minetest/master' 2016-12-23 15:20:26 +03:00
sfan5
231ac33d34 Bump version to 0.4.15 2016-12-22 23:14:17 +01:00
proller
668681f6aa Merge remote-tracking branch 'minetest/master' 2016-12-07 21:52:22 +03:00
Auke Kok
2e69711613 Simple deco: Allow setting param2 value on placement
Schematics can already be placed with a param2 value, but not
simple 1-node plant decorations of the simple type.

This adds a `param2` field to the simple deco type that is
checked to be between 0 and 255, and put to the placed node
at mapgen.

This can be used to put a degrotate value in, or e.g. a fill
value for leveltype nodes, or a place_param2 value at mapgen
placement, or vary the shape of meshoptions plantlike drawtype.
2016-12-07 04:17:17 +00:00
proller
a5f670a8d5 Merge remote-tracking branch 'minetest/master' 2016-12-02 19:31:57 +03:00
Amaz
8b63fbefba Fix incorrect docs about minetest.hud_replace_builtin (#4833)
Fixes https://github.com/minetest/minetest/issues/4832
2016-12-02 11:41:08 +01:00
Bluebird
144da5f522 Very small documentation fix. (#4830) 2016-12-02 20:20:55 +10:00
proller
ac541b01dc Merge remote-tracking branch 'minetest/master' 2016-12-01 19:02:20 +03:00
paramat
105676b952 Lua_api.txt: Clarify use of looping sounds 2016-12-01 05:09:01 +00:00
proller
3fa0057ac3 Merge commit 'c389858' 2016-11-30 17:47:24 +03:00
proller
2aa520c2a1 Merge commit '785a9a6' 2016-11-30 17:44:18 +03:00
proller
4c7a8e2f32 Merge commit '0d1c959' 2016-11-30 17:43:52 +03:00
sfan5
c38985825f Allow restricting detached inventories to one player
This combats the problem of sending the hundreds of
"creative" / "armor" or whatever detached invs that
exist on popular servers to each and every player
on join or on change of said invs.
2016-11-28 13:41:19 +01:00
TeTpaAka
785a9a6c1a Wieldhand: Allow overriding the hand 2016-11-26 03:49:30 +00:00
orwell96
0d1c9598a0 Make supplying empty formspec strings close the formspec (#4737)
This will only happen if the formname matches or if formname is "".
2016-11-23 02:15:22 +10:00
proller
f9ab0977b1 Merge remote-tracking branch 'minetest/master' 2016-11-18 19:13:50 +03:00
orwell96
681d127ff1 Particles: Make attached particle spawners respect the parent's yaw
Position, velocity and acceleration vectors of particles are rotated
by the yaw of the parent object so that they are truly relative to it.
Clarify new attached particle spawner behavior in lua_api.txt.
2016-11-18 06:18:54 +00:00
Auke Kok
4a0a6723af Builtin/../item: Enable tool breaking sounds
If a tool wears out and is destroyed, it's itemstack count
goes to 0, and we can optionally play a breaking sound.

This patch implements playing a breaking sound when this
occurs. Sounds need to be added to the tool itemdef
registration as the sound name string in the .sound.breaks
member.
2016-11-18 06:15:08 +00:00
proller
348b7b0cf8 Merge remote-tracking branch 'minetest/master' 2016-11-17 15:44:46 +03:00
Wuzzy
8e61c1dfd9 Lua_api.txt: Naming convention for custom item/entity fields
Custom (non-engine) field names of items and entities are allowed.
This is now documented in lua_api.txt. Field names beginning with
an underscore are now reserved for mod use, the engine must not
introduce any fields beginning with an underscore.
2016-11-15 23:08:34 +00:00
sfan5
5fd1ef9b58 Revert "Adding particle blend, glow and animation (#4705)"
This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.
2016-11-14 15:28:06 +01:00
Foghrye4
93e3555eae Adding particle blend, glow and animation (#4705) 2016-11-15 00:09:59 +10:00
est31
649448a2a9 Rename nodeupdate and nodeupdate_single and make them part of the official API
Now, the renamed forms of nodeupdate and nodeupdate_single are part of the official API.

As nodeupdate has been used by Minetest Game and in mods despite of not
being part of the official API, we ease the transition by still supporting
it for the 0.4.15 release. After the release, the two functions can be removed.

The removal will not violate the stability promise, as that promise only
includes the official and documented API.

Also, make some formerly global functions local. They most likely haven't
been used by mods, therefore they won't get stubs with deprecation warnings,
hard erroring directly.
2016-11-14 13:08:22 +01:00
proller
d60020992e Merge commit '67ec2fa' 2016-11-14 00:43:22 +03:00
paramat
67ec2fa92d Nodeupdate: Remove documentation in lua_api.txt
In preparation for nodeupdate being renamed and made official API
in future.
2016-11-12 06:45:09 +00:00
proller
851d781c15 Merge commit 'bf315c0' 2016-11-05 01:10:51 +03:00
proller
c402a405f4 Merge commit '7607b0a' 2016-11-05 01:09:36 +03:00
proller
ab7ee0a362 Merge commit '70e2df4' 2016-11-05 01:07:54 +03:00
proller
a004251ed1 Merge commit '1fd9a07' 2016-11-04 13:53:27 +03:00
Brandon
bf315c05f1 Add minetest.get_server_uptime() function to Lua API (#4702)
Add minetest.get_server_uptime() function to Lua API
2016-11-02 09:36:58 -07:00
ShadowNinja
7607b0ac20 Add version API 2016-10-31 21:53:00 -07:00
paramat
70e2df4f86 Lua voxelmanip: Add optional buffer param for 'get param2 data'
Update lua_api.txt.
2016-10-31 10:59:38 +00:00
raymoo
1fd9a07497 Document item use callbacks (#4668) 2016-10-27 13:24:34 +10:00
proller
ab52d86d0b Merge remote-tracking branch 'minetest/master' 2016-10-21 13:23:00 +03:00
paramat
74eb7f50c9 Lua_api.txt: Clarify 'override_meta' bool in 'set mapgen setting' 2016-10-21 05:49:06 +01:00
proller
5757ccc4e5 Merge remote-tracking branch 'minetest/master' 2016-10-18 12:16:24 +03:00
rubenwardy
0d740c5d82 Builtin: Add vector.floor helper function 2016-10-17 22:03:49 +02:00
proller
ab2b46b674 Merge remote-tracking branch 'minetest/master' 2016-10-16 23:25:41 +03:00
sfan5
9a3129da5e Make documentation about ItemStack:set_{name,count,wear} clearer
These methods do not actually fail but instead clear the item stack
	and return false if a value like e.g. "" is passed.
2016-10-15 12:42:59 +02:00
proller
a228fd3517 Merge commit 'c9e7a27' 2016-10-14 22:52:55 +03:00
raymoo
c9e7a27eeb Attached particle spawners 2016-10-13 17:33:16 +02:00
proller
1660bf8374 Merge commit '067766e' 2016-10-10 02:04:54 +03:00
proller
6e9e7d4625 Merge commit '0264e38' 2016-10-09 00:06:51 +03:00
rubenwardy
067766eec2 Fix backwards compatibility issue introduced by close_on_enter 2016-10-08 18:58:28 +02:00
paramat
0264e38bff Lua_api.txt: Add biome and nodeupdate documentation
Add missing documentation for 'register_biome' and
'clear_registered_biomes'.
Add documentation for 'nodeupdate_single'. 'nodeupdate'
is not yet documented due to a bug it causes.
2016-10-08 00:09:01 +01:00