forked from mtcontrib/homedecor_modpack
Use initial_properties
for entities (#74)
This commit is contained in:
parent
d0ab9b82ce
commit
1ef4837abe
|
@ -36,11 +36,13 @@ homedecor.register("air_conditioner", {
|
||||||
-- fans
|
-- fans
|
||||||
|
|
||||||
minetest.register_entity(":homedecor:mesh_desk_fan", {
|
minetest.register_entity(":homedecor:mesh_desk_fan", {
|
||||||
collisionbox = homedecor.nodebox.null,
|
initial_properties = {
|
||||||
visual = "mesh",
|
collisionbox = homedecor.nodebox.null,
|
||||||
mesh = "homedecor_desk_fan.b3d",
|
visual = "mesh",
|
||||||
textures = {"homedecor_desk_fan_uv.png"},
|
mesh = "homedecor_desk_fan.b3d",
|
||||||
visual_size = {x=10, y=10},
|
textures = {"homedecor_desk_fan_uv.png"},
|
||||||
|
visual_size = {x=10, y=10},
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
local add_mesh_desk_fan_entity = function(pos)
|
local add_mesh_desk_fan_entity = function(pos)
|
||||||
|
|
|
@ -4,12 +4,14 @@ local tmp = {}
|
||||||
local sd_disallow = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
|
local sd_disallow = minetest.get_modpath("screwdriver") and screwdriver.disallow or nil
|
||||||
|
|
||||||
minetest.register_entity("itemframes:item",{
|
minetest.register_entity("itemframes:item",{
|
||||||
hp_max = 1,
|
initial_properties = {
|
||||||
visual="wielditem",
|
hp_max = 1,
|
||||||
visual_size={x = 0.33, y = 0.33},
|
visual = "wielditem",
|
||||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
visual_size = {x = 0.33, y = 0.33},
|
||||||
physical = false,
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
textures = {"air"},
|
physical = false,
|
||||||
|
textures = {"air"},
|
||||||
|
},
|
||||||
on_activate = function(self, staticdata)
|
on_activate = function(self, staticdata)
|
||||||
if tmp.nodename ~= nil and tmp.texture ~= nil then
|
if tmp.nodename ~= nil and tmp.texture ~= nil then
|
||||||
self.nodename = tmp.nodename
|
self.nodename = tmp.nodename
|
||||||
|
|
Loading…
Reference in New Issue
Block a user