Commit Graph

16 Commits

Author SHA1 Message Date
SmallJoker
d3f1743fdd Builtin item: Tidy up (#4370)
New code structure
Use setting movement_gravity
Reset age on merge
Set merge radius to 1.0m
2017-08-24 23:06:36 +02:00
Wuzzy
2ea26e655d Add slippery group for nodes (players/items slide) 2017-08-13 21:39:08 +01: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
Dániel Juhász
58d83a7bb2 Hardware coloring for itemstacks
Adds the possibility to colorize item stacks based on their metadata.

In the item/node definition you can specify palette (an image file)
and color (fallback color if the item has no palette or metadata).
Then you can add palette_index to the metadata.

Dropped itemstacks with different colors do not merge.
2017-04-08 18:39:15 -07:00
paramat
643ac9dd7a Item entities: Don't show description as infotext
Partially reverts #3547
Infotext remains optional for objects, empty by default
2016-05-22 08:21:44 +01:00
RealBadAngel
87291ea44a Show infotext with description for item entities 2016-01-18 17:21:41 +00:00
Robert Zenz
0876623aed Add the player name to dropped items
The player name is now added in the field "dropped_by" on the created
entity.
2015-11-12 00:47:11 +01:00
BlockMen
eb92bfb030 Check if hitter has inventory when punching item
Fixes #3280
2015-10-25 18:15:31 +01:00
est31
2a7d01b833 Some map border related fixes
1. Check for entity addition success in spawn_item implementation
2. Check for success in item_drop callback, so that the player
doesn't lose the item if they are outside bounds and try to drop it.
3. When existing player joins game, check that their position is inside
map bounds. If not, set their position to the return value of findSpawnPos().
4. Make findSpawnPos() respect the border

2 fixes a lua crash if a player drops an item outside map bounds.
3 fixes an assertion crash if a player leaves when being outside map bounds,
and then rejoins.
2015-09-29 23:06:15 +02:00
tenplus1
be18bd6a8c Don't crash if an item gets dropped into unloaded space
Items dropped into unloaded map space will crash game so here's a fix...
2015-05-15 00:15:25 +02:00
est31
178f536f08 Item entity merging refactor
Don't ident too much, and add a comment.
2015-05-15 00:06:18 +02:00
Calinou
d7b3046cf6 Make dropped items larger and rotate faster
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
2014-12-04 21:10:12 +10:00
ShadowNinja
a6ba042cf7 Add strict module
Also fix leaking globals found by it.
2014-11-19 12:40:54 -05:00
RealBadAngel
18fe277d94 Item entity stacks merge on the ground.
Add TTL to item entities.
2014-05-23 22:46:05 +02:00
ShadowNinja
c4359ff65c Use "core" namespace internally 2014-05-08 13:02:04 -04:00
ShadowNinja
1cd512913e Organize builtin into subdirectories 2014-05-07 17:14:23 -04:00