Skip to content

Commit

Permalink
Closes lord-server#980. Fix fences connection. Add hardwood fences
Browse files Browse the repository at this point in the history
  • Loading branch information
Doloment committed Feb 5, 2023
1 parent 4cf9e2d commit 36fbae2
Show file tree
Hide file tree
Showing 15 changed files with 74 additions and 59 deletions.
43 changes: 0 additions & 43 deletions mods/lord/lord_homedecor/building_blocks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,6 @@ minetest.register_craft({
{"default:glass"},
}
})
minetest.register_craft({
output = 'lord_homedecor:hardwood 2',
recipe = {
{"default:wood", "default:junglewood"},
{"default:junglewood", "default:wood"},
}
})

minetest.register_craft({
output = 'lord_homedecor:hardwood 2',
recipe = {
{"default:junglewood", "default:wood"},
{"default:wood", "default:junglewood"},
}
})

-- если есть lottblocks
if minetest.get_modpath("lottblocks") then
Expand Down Expand Up @@ -268,13 +253,6 @@ minetest.register_node("lord_homedecor:gravel_spread", {
groups = {crumbly=2},
sounds = default.node_sound_gravel_defaults(),
})
minetest.register_node("lord_homedecor:hardwood", {
tiles = {"building_blocks_hardwood.png"},
is_ground_content = true,
description = SL("Hardwood"),
groups = {choppy=1,flammable=1},
sounds = default.node_sound_wood_defaults(),
})

-- Register scaffolding nodes and crafts
local texture_plank = "default_wood.png"
Expand Down Expand Up @@ -320,19 +298,6 @@ minetest.register_craft({
})


stairs.register_stair_and_slab(
"hardwood",
"lord_homedecor:hardwood",
{choppy=1,flammable=1},
{"building_blocks_hardwood.png"},
SL("Hardwood stair"),
SL("Hardwood slab"),
default.node_sound_wood_defaults(),
false,
SL("Inner Hardwood stair"),
SL("Outer Hardwood stair")
)

stairs.register_stair_and_slab(
"grate",
"lord_homedecor:grate",
Expand Down Expand Up @@ -372,14 +337,6 @@ stairs.register_stair_and_slab(
SL("Outer Roofing stair")
)


minetest.register_craft({
type = "fuel",
recipe = "lord_homedecor:hardwood",
burntime = 28,
})


minetest.register_craftitem("lord_homedecor:sticks", {
description = SL("Small bundle of sticks"),
image = "building_blocks_sticks.png",
Expand Down
5 changes: 0 additions & 5 deletions mods/lord/lord_homedecor/locale/lord_homedecor.ru.tr
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@ Tarmac Spread=Асфальтовая дорожка
Chess board tiling=Черепица "Шахматная доска"
Brobble Spread=Дорожка из обожженной глины
Gravel Spread=Гравийная дорожка
Hardwood=Твердая древесина
Marble stair=Ступенька из темного мрамора
Marble slab=Плита из темного мрамора
Hardwood stair=Ступенька из твердой древесины
Inner Hardwood stair=Угловая ступенька из твердой древесины (Внутренний Угол)
Outer Hardwood stair=Угловая ступенька из твердой древесины (Внешний Угол)
Hardwood slab=Плита из твердой древесины
Fake Grass=Искусственная трава
Grass stair=Ступенька из искусственной травы
Inner Grass stair=Угловая ступенька из искусственной травы (Внутренний Угол)
Expand Down
4 changes: 2 additions & 2 deletions mods/lord/lord_homedecor/mod.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = lord_homedecor
depends = default, wool, bees, stairs, lottplants, lordlib
optional_depends = lottblocks, bucket
depends = default, wool, bees, stairs, lottplants, lordlib, lottblocks
optional_depends = bucket
16 changes: 16 additions & 0 deletions mods/lord/lottblocks/locale/lottblocks.ru.tr
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,19 @@ Mallorn Chair=Маллорновый стул
Mallorn Ladder=Маллорновая лестница
Mallorn Stick=Маллорновая палочка
Mallorn Stanchion=Маллорновые стойки

Hardwood=Твердая Древесина
Hardwood stair=Ступенька из твердой древесины
Inner Hardwood stair=Угловая ступенька из твердой древесины (Внутренний Угол)
Outer Hardwood stair=Угловая ступенька из твердой древесины (Внешний Угол)
Hardwood slab=Плита из двердой древесины
Hardwood Fence = Забор из Твердой Древесины
Hardwood Fence Rail = Реечный Забор из Твердой Древесины
Hardwood Door=Дверь из твердой древесины
Hardwood Door With Lock=Дверь с замком из твердой древесины
Hardwood Trapdoor=Люк из твердой древесины
Hardwood Table=Стол из твердой древесины
Hardwood Chair=Стул из твердой древесины
Hardwood Ladder=Лестница из твердой древесины
Hardwood Stick=Палочка из твердой древесины
Hardwood Stanchion=Стойки из твердой древесины
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 56 additions & 9 deletions mods/lord/lottblocks/wooden_stuff.lua
Original file line number Diff line number Diff line change
@@ -1,16 +1,58 @@
local S = minetest.get_translator("lottblocks")

--Твёрдая древесина. Вынесена из lord_homedecor из-за проблем с зависимостями
minetest.register_node(":lord_homedecor:hardwood", {
tiles = {"lottblocks_hardwood.png"},
is_ground_content = true,
description = S("Hardwood"),
groups = {choppy=1,flammable=1,wood=1},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = 'lord_homedecor:hardwood 2',
recipe = {
{"default:wood", "default:junglewood"},
{"default:junglewood", "default:wood"},
}
})
minetest.register_craft({
output = 'lord_homedecor:hardwood 2',
recipe = {
{"default:junglewood", "default:wood"},
{"default:wood", "default:junglewood"},
}
})
stairs.register_stair_and_slab(
"hardwood",
"lord_homedecor:hardwood",
{choppy=1,flammable=1},
{"lottblocks_hardwood.png"},
S("Hardwood stair"),
S("Hardwood slab"),
default.node_sound_wood_defaults(),
false,
S("Inner Hardwood stair"),
S("Outer Hardwood stair")
)
minetest.register_craft({
type = "fuel",
recipe = "lord_homedecor:hardwood",
burntime = 28,
})

function lottblocks.register_wooden_stuff(name, description, texture, wood_name)
local node_groups = table.copy(minetest.registered_nodes[wood_name].groups)
node_groups["wood"] = nil
node_groups["wooden"] = 1

local groups_door = table.copy(node_groups)
groups_door.door = 1
if name ~= "wood" then -- to not overwrite registrations from minetest_game
local door_reg_name = "lottblocks:door_" .. name
local door_inv_texture = "lottblocks_door_" .. name .. ".png"
local door_uv_texture = "lottblocks_door_" .. name .. "_uv.png"
if name ~= "wood" then -- for not to overwrite registrations from minetest_game

-- DOOR | ДВЕРЬ
local groups_door = table.copy(node_groups)
groups_door.door = 1
local door_reg_name = "lottblocks:door_" .. name
local door_inv_texture = "lottblocks_door_" .. name .. ".png"
local door_uv_texture = "lottblocks_door_" .. name .. "_uv.png"
doors.register(door_reg_name, {
tiles = {{ name = door_uv_texture, backface_culling = true }},
description = S(description .. " Door"),
Expand All @@ -37,6 +79,7 @@ function lottblocks.register_wooden_stuff(name, description, texture, wood_name)
protected = true,
})

-- HATCHES | ЛЮКИ
local hatch_reg_name = "lottblocks:hatch_" .. name
local hatch_inv_texture = "lottblocks_hatch_" .. name .. ".png"
node_groups.not_in_creative_inventory = 0
Expand Down Expand Up @@ -237,7 +280,8 @@ function lottblocks.register_wooden_stuff(name, description, texture, wood_name)
{ -0.3, -0.2, 0.3, 0.3, -0.1, 0.4 },
},
},
groups = node_groups
groups = node_groups,
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = table_reg_name,
Expand All @@ -248,7 +292,7 @@ function lottblocks.register_wooden_stuff(name, description, texture, wood_name)
}
})

-- CHAIR | КРЕСЛА
-- CHAIR | СТУЛ
local chair_reg_name = "lottblocks:" .. name .. "_chair"
minetest.register_node(chair_reg_name, {
description = S(description .. " Chair"),
Expand All @@ -272,7 +316,8 @@ function lottblocks.register_wooden_stuff(name, description, texture, wood_name)
type = "fixed",
fixed = { -0.3, -0.5, -0.3, 0.3, 0.5, 0.3 },
},
groups = node_groups
groups = node_groups,
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = chair_reg_name,
Expand All @@ -290,6 +335,7 @@ function lottblocks.register_wooden_stuff(name, description, texture, wood_name)
{ 'group:stick', 'group:stick' },
}
})

end

lottblocks.register_wooden_stuff("wood", "Wooden", "default_wood.png", "default:wood")
Expand All @@ -299,6 +345,7 @@ lottblocks.register_wooden_stuff("birch", "Birch", "lottplants_birchwood.png", "
lottblocks.register_wooden_stuff("pine", "Pine", "lottplants_pinewood.png", "lottplants:pinewood")
lottblocks.register_wooden_stuff("lebethron", "Lebethron", "lottplants_lebethronwood.png", "lottplants:lebethronwood")
lottblocks.register_wooden_stuff("mallorn", "Mallorn", "lottplants_mallornwood.png", "lottplants:mallornwood")
lottblocks.register_wooden_stuff("hardwood", "Hardwood", "lottblocks_hardwood.png", "lord_homedecor:hardwood")

minetest.register_alias("lottblocks:fence_junglewood", "default:fence_junglewood")

Expand Down

0 comments on commit 36fbae2

Please sign in to comment.