Commit Graph

525 Commits (8c8333bf68ca372853e95403d85f97068999d660)

Author SHA1 Message Date
MarkuBu 26f4a5c2d1 First commit for fine pointed (#5485) 2017-04-01 16:50:53 +02:00
paramat ea549bbae3 Paramtype2: Add missing type CPT2_GLASSLIKE_LIQUID_LEVEL
Add the missing paramtype2 for param2 controlling the liquid level
inside the glasslike_framed drawtype.
Add missing documentation of the feature to lua_api.txt.
Update and improve comments for drawtype enumerations in nodedef.h.
2017-03-30 04:52:54 +01:00
Diego Martínez 81c3dc32a8 Add functions to strip color information. (#5472) 2017-03-28 21:55:39 +02:00
Paramat c4b98deb61 Firelike drawtype: Add missing docs for visual_scale in lua_api.txt (#5434) 2017-03-20 22:22:16 +01:00
SmallJoker c05dfac9a3 lua_api: Document minetest.features (#5311) 2017-03-15 22:07:19 +01:00
Dániel Juhász ab371cc934 Light calculation: New bulk node lighting code
This commit introduces a new bulk node lighting algorithm to minimize
lighting bugs during l-system tree generation, schematic placement and
non-mapgen-object lua voxelmanip light calculation.

If the block above the changed area is not loaded, it gets loaded to avoid
lighting bugs.
Light is updated as soon as write_to_map is called on a voxel manipulator,
therefore update_map does nothing.
2017-03-11 02:06:18 +00:00
zaoqi c9ac722ea9 Add minetest.spawn_falling_node(pos) (#5339)
* Add minetest.spawn_falling_node(pos)

* lua_api.txt: Add minetest.spawn_falling_node(pos)

* Update minetest.spawn_falling_node(pos)
2017-03-04 18:36:37 +01:00
adelcoding1 6de83a2756 FormSpec: Add position and anchor elements (#5284) 2017-03-04 10:46:55 +01:00
red-001 01b2d2c66c Fix the documentation for `minetest.is_yes` (#5276) 2017-02-20 02:11:53 +10:00
rubenwardy 74b670a793 Correct lua_api.txt docs related to meta (#5198) 2017-02-10 07:59:38 +01:00
Loïc Blot ef6feca501 Add ModMetadata API (#5131)
* mod can create a ModMetadata object where store its values and retrieve it.
* Modmetadata object can only be fetched at mod loading
* Save when modified using same time as map interval or at server stop
* add helper function to get mod storage path
* ModMetadata has exactly same calls than all every other Metadata
2017-02-08 00:15:55 +01:00
rubenwardy f2f9a92351 Add per-stack descriptions using ItemStack Metadata 2017-02-04 22:07:55 +00:00
rubenwardy f2aa2c6a98 Add ItemStack key-value meta storage 2017-02-04 22:07:55 +00:00
sapier e761b9f486 Add multiply texture modifier
Allows colorizing of textures using a color multiplication method.
2017-01-30 16:37:17 +00:00
SmallJoker 79d752ba4f from_table: Fix crash for missing inventory or field 2017-01-28 16:38:46 +01:00
sapier 814ee971f7 Make entity on_punch have same signature and behaviour as player on_punch 2017-01-28 15:57:54 +01:00
Loïc Blot b7a98e9850 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).
2017-01-27 08:59:30 +01:00
Auke Kok 7fc6719968 core: Add dir_to_yaw and yaw_to_dir helpers
These are needed to go from things like entity yaw to a vector
and vice versa.
2017-01-23 07:38:39 +00:00
Auke Kok 2d7a6f2cc0 Vector: Add vector.sort(a, b): return box edges
This function returns the box corners of the smallest box
that includes the two given coordinates.
2017-01-23 07:38:39 +00:00
Dániel Juhász d04d8aba70 Add hardware node coloring. Includes:
- Increase ContentFeatures serialization version
- Color property and palettes for nodes
- paramtype2 = "color", "colored facedir" or "colored wallmounted"
2017-01-23 07:27:12 +01:00
sapier c57b4ff9b5 Add Entity get_texture_mod() to Lua API
Send texture modifier to clients connecting later too
2017-01-21 17:01:02 +01:00
Elijah Duffy efa54f9c46 Add chatcommand unregister and override API (#5076)
Introduces two functions to unregister and override chatcommands.
minetest.unregister_chatcommand("<name>") and
minetest.override_chatcommand("<name>", {<redifinition>})
2017-01-20 19:49:20 +01:00
sfan5 7279f0b373 Add particle animation, glow
This is implemented by reusing and extending the
TileAnimation code for the methods used by particles.
2017-01-18 23:21:01 +01:00
rubenwardy c5967f75f0 Add minetest.player_exists() (#5064) 2017-01-18 11:19:57 +01:00
rubenwardy 63c892eedf Rename ObjectRef methods to be consistent and predictable 2017-01-16 15:34:44 +00:00
Rui ec30d49e02 Add staticdata parameter to add_entity (#5009)
* Add staticdata parameter to add_entity
* Add add_entity_with_staticdata to core.features
2017-01-09 20:39:45 +01:00
LNJ 545c37f613 lua_api.txt: Add registered_chatcommands to global tables 2017-01-05 21:38:43 +00:00
rubenwardy e8b7179ccd Expose and document chatcommands as minetest.registered_chatcommands 2017-01-04 20:56:07 +00:00
sfan5 a07b032245 Add 2D sheet animation for nodes 2017-01-02 15:28:06 +01:00
Luke Puchner-Hardman 7057c196c4 Added "[sheet" to the texture special commands.
"[sheet:WxH:X,Y" assumes the base image is a tilesheet with W*H tiles
on it and crops to the tile at position X,Y.  Basically it works
like "[verticalframe" but in 2D.

For testing, I combined the four default_chest images into one.
2017-01-02 15:28:06 +01: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
sfan5 231ac33d34 Bump version to 0.4.15 2016-12-22 23:14:17 +01: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
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
paramat 105676b952 Lua_api.txt: Clarify use of looping sounds 2016-12-01 05:09:01 +00: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
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
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 93e3555eae.
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
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
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