Commit Graph

21 Commits

Author SHA1 Message Date
SmallJoker
ade7a1cbcf
Builtin: Replace deprecated function calls (#7561) 2018-07-17 20:17:54 +02:00
paramat
1156088db7 Item entity: Delete in 'ignore' nodes 2018-02-13 03:48:34 +00:00
paramat
520293b4cb Item entity: Prevent motion in ignore nodes 2018-02-05 05:07:29 +00:00
DTA7
ce832eb421 Item entities: Enable item collision detection for sudden movement 2017-11-06 13:51:26 +00:00
you
bb225672f9 Fix dropped item look (#6370)
* Abort set_item when it does nothing

* Do not adjust dropped item size linearly

Instead use cube root because the item count is proportional to the volume, not to the length.

* Make the item rotate slower when it's bigger

Bigger items chafe more on the ground, so they can't rotate as fast as small ones

* Fix items flying in air
2017-09-11 08:20:06 +02:00
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