634 Commits

Author SHA1 Message Date
rubenwardy
e8ba0cc76f Rename ObjectRef methods to be consistent and predictable 2017-01-16 15:34:44 +00:00
Rui
f1b3f9d929 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
b9ad3d4bc8 lua_api.txt: Add registered_chatcommands to global tables 2017-01-05 21:38:43 +00:00
rubenwardy
2f942ce148 Expose and document chatcommands as minetest.registered_chatcommands 2017-01-04 20:56:07 +00:00
sfan5
c68d446afa Add 2D sheet animation for nodes 2017-01-02 15:28:06 +01:00
Luke Puchner-Hardman
c83a1e6c5f 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
e171949b92 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
4e2d145369 Bump version to 0.4.15 2016-12-22 23:14:17 +01:00
Auke Kok
2f71a16b08 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
75e9209169 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
6aaea80a6f Very small documentation fix. (#4830) 2016-12-02 20:20:55 +10:00
paramat
e94d91747b Lua_api.txt: Clarify use of looping sounds 2016-12-01 05:09:01 +00:00
sfan5
a4191476ab 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
116d887dd0 Wieldhand: Allow overriding the hand 2016-11-26 03:49:30 +00:00
orwell96
4e24ecae21 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
a1097d3a35 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
3c129ab38b 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
5b005066df 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
a99777ab39 Revert "Adding particle blend, glow and animation (#4705)"
This reverts commit 93e3555eae2deaeca69ee252cfa9cc9c3e0e49ef.
2016-11-14 15:28:06 +01:00
Foghrye4
04ea490226 Adding particle blend, glow and animation (#4705) 2016-11-15 00:09:59 +10:00
est31
e651d7a987 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
5e64c02aa1 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
7e703858b8 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
c9100740e4 Add version API 2016-10-31 21:53:00 -07:00
paramat
9037505da6 Lua voxelmanip: Add optional buffer param for 'get param2 data'
Update lua_api.txt.
2016-10-31 10:59:38 +00:00
raymoo
48aead7d1e Document item use callbacks (#4668) 2016-10-27 13:24:34 +10:00
paramat
00a733ac21 Lua_api.txt: Clarify 'override_meta' bool in 'set mapgen setting' 2016-10-21 05:49:06 +01:00
rubenwardy
bb94e62525 Builtin: Add vector.floor helper function 2016-10-17 22:03:49 +02:00
sfan5
8b98a7dee9 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
raymoo
6e0388ece4 Attached particle spawners 2016-10-13 17:33:16 +02:00
rubenwardy
8c1271f645 Fix backwards compatibility issue introduced by close_on_enter 2016-10-08 18:58:28 +02:00
paramat
013e882c66 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
raymoo
1c5eff9aac Forceloading: Transient forceloads
Adds a flag to forceload_block which lets you turn off persistence for
that forceload.
2016-10-03 01:54:36 +01:00
rubenwardy
ade3a24e75 Formspec: Add container[] and container_end[] elements 2016-10-03 01:53:13 +01:00
paramat
5dd99dfd62 Register.lua: Throw error if node 'light_source' > core.LIGHT_MAX
Add 'core.LIGHT_MAX = 14' to builtin/game/constants.lua with the intention
to replace misplaced 'default.LIGHT_MAX = 14' in Minetest Game.
Add comment in light.h requiring the constant be changed in both places.
Add lighting bug warning to note in lua_api.txt.
There are hundreds of mod uses of 15 which causes a lighting bug.
2016-09-17 09:33:25 +01:00
paramat
ffa2fe8424 Lua_api.txt: Add note of maximum value for node 'light_source'
Maximum is 14.
A value of 15 (reserved for direct sunlight) causes a lighting bug.
2016-09-15 05:25:38 +01:00
Thomas--S
d2c8230ea1 Add an [invert:<mode> texture modifier
Inverts the given channels of the base image.
Mode may contain the characters "r", "g", "b", "a".
Only the channels that are mentioned in the mode string will be inverted.
2016-09-15 05:25:38 +01:00
paramat
f932e5d286 Decorations: Generalise 'spawn by' to be used by all decoration types
In lua_api.txt, make clear that 'place on' and 'spawn by' can be lists.
2016-09-14 09:19:54 +01:00
sfan5
4fa9d44956 Allow escaping of texture names when passed as an argument to a modifier 2016-09-14 09:19:36 +01:00
raymoo
c5491db85d fix missing parameters in some mentions of entity callbacks 2016-09-12 03:35:28 -04:00
James Stevenson
f109dd756a Return nil on empty get_area() (#4508) 2016-09-10 01:47:13 +10:00
paly2
30c1905f89 Add minetest.unregister_item and minetest.register_alias_force 2016-09-08 03:26:52 -04:00
rubenwardy
71f9f4ce26 Allow fields to choose whether they close on enter press 2016-08-27 13:05:01 +01:00
Auke Kok
95ff590bcc Make plantlike drawtype more fun
Adds several new ways that the plantlike drawtype mesh can be changed.

This requires paramtype2 = "meshoptions" to be set in the node
definition. The drawtype for these nodes should be "plantlike".

These modifications are all done using param2. This field is now
a complex bitfield that allows some or more of the combinations to
be chosen, and the mesh draw code will choose the options based as
neeeded for each plantlike node.

bit layout:
bits 0, 1 and 2 (values 0x1 through 0x7) are for choosing the plant
mesh shape:
  0 - ordinary plantlike plant ("x" shaped)
  1 - ordinary plant, but rotated 45 degrees ("+" shaped)
  2 - a plant with 3 faces ("*" shaped)
  3 - a plant with 4 faces ("#" shaped)
  4 - a plant with 4 faces ("#" shaped, leaning outwards)
  5 through 7 are unused and reserved for future mesh shapes.

bit 3 (0x8) causes the plant to be randomly offset in the x,z
plane. The plant should fall within the 1x1x1 nodebox if regularly
sized.

bit 4 (0x10) causes the plant mesh to grow by sqrt(2), and will cause
the plant mesh to fill out 1x1x1, and appear slightly larger. Texture
makers will want to make their plant texture 23x16 pixels to have the
best visual fit in 1x1x1 size.

bit 5 (0x20) causes each face of the plant to have a slight negative
Y offset in position, descending up to 0.125 downwards into the node
below. Because this is per face, this causes the plant model to be
less symmetric.

bit 6 (0x40) through bit 7 (0x80) are unused and reserved for
future use.

!(https://youtu.be/qWuI664krsI)
2016-08-26 05:26:08 +01:00
DonBatman
dd8278c1a2 Lua_api.txt: Change 'maxwear' to 'uses' in 'tool_capabilities'
'maxwear' has been deprecated for over 3 years
Add spaces around '=' nearby
2016-08-14 16:41:06 +01:00
Thomas--S
a75fb2191a Add an [opacity:<r> texture modifier. Makes the base image transparent according to the given ratio. r must be between 0 and 255. 0 means totally transparent. 255 means totally opaque. Useful for texture overlaying. 2016-08-12 15:20:30 +02:00
rubenwardy
c1f99baf8d Documentation: Create texture_packs.txt
Combine texture_overrides.txt and sections of lua_api.txt
2016-07-30 03:08:56 +01:00
mtango688
d053efa5c6 lua_api.txt: Document how to properly clear node metadata 2016-07-30 03:08:21 +01:00
Wuzzy
d309b48ebc Main menu, lua_api.txt: Fix mod/texture pack screenshot size issues
Recommend mod screenshot size in lua_api.txt
Adjust displayed screenshot size of texture packs
Document texture pack files in lua_api.txt
2016-07-27 22:20:31 +01:00
James Stevenson
983cfc6822 lua_api.txt: Remove tooltip checkbox[] element 2016-07-21 05:00:40 +01:00