Remove default dependency (#6)

This commit is contained in:
wsor4035 2022-02-07 07:54:55 -05:00 committed by GitHub
parent aa5f865131
commit b0808a376a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 72 additions and 71 deletions

View File

@ -9,7 +9,7 @@ globals = {
read_globals = {
-- Builtin
table = {fields = {"copy"}},
"ItemStack", "vector",
"ItemStack", "vector", "default",
-- Mod deps
"intllib",

View File

@ -21,16 +21,16 @@ signs_lib.standard_xoffs = 4
signs_lib.standard_yoffs = 0
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.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.attached_node = nil
signs_lib.standard_wood_sign_sounds = table.copy(minetest.registered_items["default:sign_wall_wood"].sounds)
signs_lib.standard_steel_sign_sounds = table.copy(minetest.registered_items["default:sign_wall_steel"].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(default and minetest.registered_items["default:sign_wall_steel"].sounds or {})
signs_lib.default_text_scale = {x=10, y=10}

View File

@ -1,4 +1,4 @@
if minetest.get_modpath("default") then
local default_fences = {
"default:fence_wood",
"default:fence_acacia_wood",
@ -12,6 +12,7 @@ for _, n in ipairs(default_fences) do
check_for_pole = true
})
end
end
if minetest.get_modpath("cottages") then
local cbox = table.copy(minetest.registered_items["cottages:table"].node_box)

View File

@ -1,6 +1,5 @@
name = signs_lib
author = VanessaE
depends = default
optional_depends = intllib, screwdriver, streetspoles, streetlamps, cottages, prefab_redo
optional_depends = intllib, screwdriver, streetspoles, streetlamps, cottages, prefab_redo, default
description = Adds signs with readable text.
min_minetest_version = 5.4.0

View File

@ -1,5 +1,6 @@
-- Definitions for standard minetest_game wooden and steel wall signs
if minetest.get_modpath("default") then
signs_lib.register_sign("default:sign_wall_wood", {
description = "Wooden wall sign",
inventory_image = "signs_lib_sign_wall_wooden_inv.png",
@ -54,7 +55,7 @@ minetest.register_alias("default:sign_wall_steel_onpole", "default:sign_st
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, "basic_signs:hanging_sign")