projects
/
oweals
/
minetest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mainmenu: Remove space under mod list
[oweals/minetest.git]
/
builtin
/
game
/
item_entity.lua
diff --git
a/builtin/game/item_entity.lua
b/builtin/game/item_entity.lua
index a8d7a186361759d95c90ffb42b8ef64956d284fa..a66bf33d0e3935b58f70296bf7ea25f9556c5610 100644
(file)
--- a/
builtin/game/item_entity.lua
+++ b/
builtin/game/item_entity.lua
@@
-31,6
+31,7
@@
core.register_entity(":__builtin:item", {
spritediv = {x = 1, y = 1},
initial_sprite_basepos = {x = 0, y = 0},
is_visible = false,
spritediv = {x = 1, y = 1},
initial_sprite_basepos = {x = 0, y = 0},
is_visible = false,
+ infotext = "",
},
itemstring = '',
},
itemstring = '',
@@
-50,6
+51,7
@@
core.register_entity(":__builtin:item", {
local c = s
local itemtable = stack:to_table()
local itemname = nil
local c = s
local itemtable = stack:to_table()
local itemname = nil
+ local description = ""
if itemtable then
itemname = stack:to_table().name
end
if itemtable then
itemname = stack:to_table().name
end
@@
-58,6
+60,7
@@
core.register_entity(":__builtin:item", {
if core.registered_items[itemname] then
item_texture = core.registered_items[itemname].inventory_image
item_type = core.registered_items[itemname].type
if core.registered_items[itemname] then
item_texture = core.registered_items[itemname].inventory_image
item_type = core.registered_items[itemname].type
+ description = core.registered_items[itemname].description
end
local prop = {
is_visible = true,
end
local prop = {
is_visible = true,
@@
-66,6
+69,7
@@
core.register_entity(":__builtin:item", {
visual_size = {x = s, y = s},
collisionbox = {-c, -c, -c, c, c, c},
automatic_rotate = math.pi * 0.5,
visual_size = {x = s, y = s},
collisionbox = {-c, -c, -c, c, c, c},
automatic_rotate = math.pi * 0.5,
+ infotext = description,
}
self.object:set_properties(prop)
end,
}
self.object:set_properties(prop)
end,
@@
-74,7
+78,8
@@
core.register_entity(":__builtin:item", {
return core.serialize({
itemstring = self.itemstring,
always_collect = self.always_collect,
return core.serialize({
itemstring = self.itemstring,
always_collect = self.always_collect,
- age = self.age
+ age = self.age,
+ dropped_by = self.dropped_by
})
end,
})
end,
@@
-89,6
+94,7
@@
core.register_entity(":__builtin:item", {
else
self.age = dtime_s
end
else
self.age = dtime_s
end
+ self.dropped_by = data.dropped_by
end
else
self.itemstring = staticdata
end
else
self.itemstring = staticdata