forked from mtcontrib/signs_lib
Remove default
dependency (#6)
This commit is contained in:
parent
aa5f865131
commit
b0808a376a
@ -9,7 +9,7 @@ globals = {
|
|||||||
read_globals = {
|
read_globals = {
|
||||||
-- Builtin
|
-- Builtin
|
||||||
table = {fields = {"copy"}},
|
table = {fields = {"copy"}},
|
||||||
"ItemStack", "vector",
|
"ItemStack", "vector", "default",
|
||||||
|
|
||||||
-- Mod deps
|
-- Mod deps
|
||||||
"intllib",
|
"intllib",
|
||||||
|
8
api.lua
8
api.lua
@ -21,16 +21,16 @@ signs_lib.standard_xoffs = 4
|
|||||||
signs_lib.standard_yoffs = 0
|
signs_lib.standard_yoffs = 0
|
||||||
signs_lib.standard_cpl = 35
|
signs_lib.standard_cpl = 35
|
||||||
|
|
||||||
signs_lib.standard_wood_groups = table.copy(minetest.registered_items["default:sign_wall_wood"].groups)
|
signs_lib.standard_wood_groups = table.copy(default and minetest.registered_items["default:sign_wall_wood"].groups or {})
|
||||||
signs_lib.standard_wood_groups.sign = 1
|
signs_lib.standard_wood_groups.sign = 1
|
||||||
signs_lib.standard_wood_groups.attached_node = nil
|
signs_lib.standard_wood_groups.attached_node = nil
|
||||||
|
|
||||||
signs_lib.standard_steel_groups = table.copy(minetest.registered_items["default:sign_wall_steel"].groups)
|
signs_lib.standard_steel_groups = table.copy(default and minetest.registered_items["default:sign_wall_steel"].groups or {})
|
||||||
signs_lib.standard_steel_groups.sign = 1
|
signs_lib.standard_steel_groups.sign = 1
|
||||||
signs_lib.standard_steel_groups.attached_node = nil
|
signs_lib.standard_steel_groups.attached_node = nil
|
||||||
|
|
||||||
signs_lib.standard_wood_sign_sounds = table.copy(minetest.registered_items["default:sign_wall_wood"].sounds)
|
signs_lib.standard_wood_sign_sounds = table.copy(default and minetest.registered_items["default:sign_wall_wood"].sounds or {})
|
||||||
signs_lib.standard_steel_sign_sounds = table.copy(minetest.registered_items["default:sign_wall_steel"].sounds)
|
signs_lib.standard_steel_sign_sounds = table.copy(default and minetest.registered_items["default:sign_wall_steel"].sounds or {})
|
||||||
|
|
||||||
signs_lib.default_text_scale = {x=10, y=10}
|
signs_lib.default_text_scale = {x=10, y=10}
|
||||||
|
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
|
if minetest.get_modpath("default") then
|
||||||
local default_fences = {
|
local default_fences = {
|
||||||
"default:fence_wood",
|
"default:fence_wood",
|
||||||
"default:fence_acacia_wood",
|
"default:fence_acacia_wood",
|
||||||
"default:fence_aspen_wood",
|
"default:fence_aspen_wood",
|
||||||
"default:fence_junglewood",
|
"default:fence_junglewood",
|
||||||
"default:fence_pine_wood"
|
"default:fence_pine_wood"
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, n in ipairs(default_fences) do
|
for _, n in ipairs(default_fences) do
|
||||||
minetest.override_item(n, {
|
minetest.override_item(n, {
|
||||||
check_for_pole = true
|
check_for_pole = true
|
||||||
})
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.get_modpath("cottages") then
|
if minetest.get_modpath("cottages") then
|
||||||
|
3
mod.conf
3
mod.conf
@ -1,6 +1,5 @@
|
|||||||
name = signs_lib
|
name = signs_lib
|
||||||
author = VanessaE
|
author = VanessaE
|
||||||
depends = default
|
optional_depends = intllib, screwdriver, streetspoles, streetlamps, cottages, prefab_redo, default
|
||||||
optional_depends = intllib, screwdriver, streetspoles, streetlamps, cottages, prefab_redo
|
|
||||||
description = Adds signs with readable text.
|
description = Adds signs with readable text.
|
||||||
min_minetest_version = 5.4.0
|
min_minetest_version = 5.4.0
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
-- Definitions for standard minetest_game wooden and steel wall signs
|
-- Definitions for standard minetest_game wooden and steel wall signs
|
||||||
|
|
||||||
signs_lib.register_sign("default:sign_wall_wood", {
|
if minetest.get_modpath("default") then
|
||||||
|
signs_lib.register_sign("default:sign_wall_wood", {
|
||||||
description = "Wooden wall sign",
|
description = "Wooden wall sign",
|
||||||
inventory_image = "signs_lib_sign_wall_wooden_inv.png",
|
inventory_image = "signs_lib_sign_wall_wooden_inv.png",
|
||||||
tiles = {
|
tiles = {
|
||||||
@ -16,9 +17,9 @@ signs_lib.register_sign("default:sign_wall_wood", {
|
|||||||
allow_onpole_horizontal = true,
|
allow_onpole_horizontal = true,
|
||||||
allow_yard = true,
|
allow_yard = true,
|
||||||
use_texture_alpha = "clip",
|
use_texture_alpha = "clip",
|
||||||
})
|
})
|
||||||
|
|
||||||
signs_lib.register_sign("default:sign_wall_steel", {
|
signs_lib.register_sign("default:sign_wall_steel", {
|
||||||
description = "Steel wall sign",
|
description = "Steel wall sign",
|
||||||
inventory_image = "signs_lib_sign_wall_steel_inv.png",
|
inventory_image = "signs_lib_sign_wall_steel_inv.png",
|
||||||
tiles = {
|
tiles = {
|
||||||
@ -38,23 +39,23 @@ signs_lib.register_sign("default:sign_wall_steel", {
|
|||||||
allow_onpole_horizontal = true,
|
allow_onpole_horizontal = true,
|
||||||
allow_yard = true,
|
allow_yard = true,
|
||||||
use_texture_alpha = "clip",
|
use_texture_alpha = "clip",
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("signs:sign_hanging", "default:sign_wood_hanging")
|
minetest.register_alias("signs:sign_hanging", "default:sign_wood_hanging")
|
||||||
minetest.register_alias("basic_signs:hanging_sign", "default:sign_wood_hanging")
|
minetest.register_alias("basic_signs:hanging_sign", "default:sign_wood_hanging")
|
||||||
minetest.register_alias("signs:sign_yard", "default:sign_wood_yard")
|
minetest.register_alias("signs:sign_yard", "default:sign_wood_yard")
|
||||||
minetest.register_alias("basic_signs:yard_sign", "default:sign_wood_yard")
|
minetest.register_alias("basic_signs:yard_sign", "default:sign_wood_yard")
|
||||||
|
|
||||||
minetest.register_alias("default:sign_wall_wood_onpole", "default:sign_wood_onpole")
|
minetest.register_alias("default:sign_wall_wood_onpole", "default:sign_wood_onpole")
|
||||||
minetest.register_alias("default:sign_wall_wood_onpole_horiz", "default:sign_wood_onpole_horiz")
|
minetest.register_alias("default:sign_wall_wood_onpole_horiz", "default:sign_wood_onpole_horiz")
|
||||||
minetest.register_alias("default:sign_wall_wood_hanging", "default:sign_wood_hanging")
|
minetest.register_alias("default:sign_wall_wood_hanging", "default:sign_wood_hanging")
|
||||||
minetest.register_alias("default:sign_wall_wood_yard", "default:sign_wood_yard")
|
minetest.register_alias("default:sign_wall_wood_yard", "default:sign_wood_yard")
|
||||||
|
|
||||||
minetest.register_alias("default:sign_wall_steel_onpole", "default:sign_steel_onpole")
|
|
||||||
minetest.register_alias("default:sign_wall_steel_onpole_horiz", "default:sign_steel_onpole_horiz")
|
|
||||||
minetest.register_alias("default:sign_wall_steel_hanging", "default:sign_steel_hanging")
|
|
||||||
minetest.register_alias("default:sign_wall_steel_yard", "default:sign_steel_yard")
|
|
||||||
|
|
||||||
|
minetest.register_alias("default:sign_wall_steel_onpole", "default:sign_steel_onpole")
|
||||||
|
minetest.register_alias("default:sign_wall_steel_onpole_horiz", "default:sign_steel_onpole_horiz")
|
||||||
|
minetest.register_alias("default:sign_wall_steel_hanging", "default:sign_steel_hanging")
|
||||||
|
minetest.register_alias("default:sign_wall_steel_yard", "default:sign_steel_yard")
|
||||||
|
end
|
||||||
|
|
||||||
table.insert(signs_lib.lbm_restore_nodes, "signs:sign_hanging")
|
table.insert(signs_lib.lbm_restore_nodes, "signs:sign_hanging")
|
||||||
table.insert(signs_lib.lbm_restore_nodes, "basic_signs:hanging_sign")
|
table.insert(signs_lib.lbm_restore_nodes, "basic_signs:hanging_sign")
|
||||||
|
Loading…
Reference in New Issue
Block a user