forked from nalc/homedecor_modpack
Fix disabled signs.
This commit is contained in:
parent
b0cbea42e0
commit
53e9690679
10
fences.lua
10
fences.lua
@ -446,10 +446,8 @@ minetest.register_node("homedecor:fence_chainlink_corner", {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if not homedecor_disable_signs then
|
minetest.register_alias("homedecor:fence_wood_with_sign", "signs:sign_post")
|
||||||
minetest.register_alias("homedecor:fence_wood_with_sign", "signs:sign_post")
|
|
||||||
|
|
||||||
homedecor_register_fence_with_sign("default:fence_wood", "signs:sign_post")
|
homedecor_register_fence_with_sign("default:fence_wood", "signs:sign_post")
|
||||||
homedecor_register_fence_with_sign("homedecor:fence_brass", "homedecor:fence_brass_with_sign")
|
homedecor_register_fence_with_sign("homedecor:fence_brass", "homedecor:fence_brass_with_sign")
|
||||||
homedecor_register_fence_with_sign("homedecor:fence_wrought_iron", "homedecor:fence_wrought_iron_with_sign")
|
homedecor_register_fence_with_sign("homedecor:fence_wrought_iron", "homedecor:fence_wrought_iron_with_sign")
|
||||||
end
|
|
||||||
|
4
init.lua
4
init.lua
@ -83,9 +83,7 @@ dofile(minetest.get_modpath("homedecor").."/slopes.lua")
|
|||||||
dofile(minetest.get_modpath("homedecor").."/door_models.lua")
|
dofile(minetest.get_modpath("homedecor").."/door_models.lua")
|
||||||
dofile(minetest.get_modpath("homedecor").."/doors_and_gates.lua")
|
dofile(minetest.get_modpath("homedecor").."/doors_and_gates.lua")
|
||||||
|
|
||||||
if not homedecor_disable_signs then
|
dofile(minetest.get_modpath("homedecor").."/signs_lib.lua")
|
||||||
dofile(minetest.get_modpath("homedecor").."/signs_lib.lua")
|
|
||||||
end
|
|
||||||
|
|
||||||
dofile(minetest.get_modpath("homedecor").."/fences.lua")
|
dofile(minetest.get_modpath("homedecor").."/fences.lua")
|
||||||
|
|
||||||
|
@ -100,7 +100,8 @@ homedecor_update_sign = function(pos, fields)
|
|||||||
text:setyaw(sign_info.yaw)
|
text:setyaw(sign_info.yaw)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node(":default:sign_wall", {
|
if not homedecor_disable_signs then
|
||||||
|
minetest.register_node(":default:sign_wall", {
|
||||||
description = "Sign",
|
description = "Sign",
|
||||||
inventory_image = "default_sign_wall.png",
|
inventory_image = "default_sign_wall.png",
|
||||||
wield_image = "default_sign_wall.png",
|
wield_image = "default_sign_wall.png",
|
||||||
@ -206,7 +207,8 @@ minetest.register_node(":default:sign_wall", {
|
|||||||
on_punch = function(pos, node, puncher)
|
on_punch = function(pos, node, puncher)
|
||||||
homedecor_update_sign(pos)
|
homedecor_update_sign(pos)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_node(":signs:sign_yard", {
|
minetest.register_node(":signs:sign_yard", {
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -281,17 +283,28 @@ minetest.register_node(":signs:sign_post", {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local signs_text_on_activate
|
||||||
|
|
||||||
|
if not homedecor_disable_signs then
|
||||||
|
signs_text_on_activate = function(self)
|
||||||
|
local meta = minetest.get_meta(self.object:getpos())
|
||||||
|
local text = meta:get_string("text")
|
||||||
|
self.object:set_properties({textures={homedecor_generate_texture(homedecor_create_lines(text))}})
|
||||||
|
end
|
||||||
|
else
|
||||||
|
signs_text_on_activate = function(self)
|
||||||
|
self.object:remove()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_entity(":signs:text", {
|
minetest.register_entity(":signs:text", {
|
||||||
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
collisionbox = { 0, 0, 0, 0, 0, 0 },
|
||||||
visual = "upright_sprite",
|
visual = "upright_sprite",
|
||||||
textures = {},
|
textures = {},
|
||||||
|
|
||||||
on_activate = function(self)
|
on_activate = signs_text_on_activate,
|
||||||
local meta = minetest.get_meta(self.object:getpos())
|
|
||||||
local text = meta:get_string("text")
|
|
||||||
self.object:set_properties({textures={homedecor_generate_texture(homedecor_create_lines(text))}})
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- CONSTANTS
|
-- CONSTANTS
|
||||||
|
Loading…
Reference in New Issue
Block a user