Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
homedecor_modpack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
homedecor_modpack
Commits
6c9da755
Commit
6c9da755
authored
7 years ago
by
Jat15
Browse files
Options
Downloads
Patches
Plain Diff
Building Blocks moreblocks and stairs
Simplify integration moreblocks Replace bb stairs by Stairs
parent
c786e3ae
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
building_blocks/depends.txt
+1
-0
1 addition, 0 deletions
building_blocks/depends.txt
building_blocks/init.lua
+46
-207
46 additions, 207 deletions
building_blocks/init.lua
with
47 additions
and
207 deletions
building_blocks/depends.txt
+
1
−
0
View file @
6c9da755
default
homedecor_i18n
moreblocks?
stairs?
This diff is collapsed.
Click to expand it.
building_blocks/init.lua
+
46
−
207
View file @
6c9da755
local
S
=
homedecor_i18n
.
gettext
minetest
.
register_node
(
"building_blocks:adobe"
,
{
local
function
building_blocks_stairs
(
nodename
,
def
)
minetest
.
register_node
(
nodename
,
def
)
if
minetest
.
get_modpath
(
"moreblocks"
)
or
minetest
.
get_modpath
(
"stairs"
)
then
local
mod
,
name
=
nodename
:
match
(
"(.*):(.*)"
)
for
groupname
,
value
in
pairs
(
def
.
groups
)
do
if
groupname
~=
"cracky"
and
groupname
~=
"choppy"
and
groupname
~=
"flammable"
and
groupname
~=
"crumbly"
and
groupname
~=
"snappy"
then
def
.
groups
.
groupname
=
nil
end
end
if
minetest
.
get_modpath
(
"moreblocks"
)
then
stairsplus
:
register_all
(
mod
,
name
,
nodename
,
{
description
=
def
.
description
,
tiles
=
def
.
tiles
,
groups
=
def
.
groups
,
sounds
=
def
.
sounds
,
}
)
else
stairs
.
register_stair_and_slab
(
name
,
nodename
,
def
.
groups
,
def
.
tiles
,
(
"%s Stair"
):
format
(
def
.
description
),
(
"%s Slab"
):
format
(
def
.
description
),
def
.
sounds
)
end
end
end
building_blocks_stairs
(
"building_blocks:adobe"
,
{
tiles
=
{
"building_blocks_Adobe.png"
},
description
=
S
(
"Adobe"
),
is_ground_content
=
true
,
groups
=
{
crumbly
=
3
},
sounds
=
default
.
node_sound_stone_defaults
(),
})
minetest
.
register_node
(
"building_blocks:roofing"
,
{
building_blocks_stairs
(
"building_blocks:roofing"
,
{
tiles
=
{
"building_blocks_Roofing.png"
},
is_ground_content
=
true
,
description
=
S
(
"Roof block"
),
...
...
@@ -162,7 +200,7 @@ minetest.register_node("building_blocks:smoothglass", {
groups
=
{
snappy
=
3
,
cracky
=
3
,
oddly_breakable_by_hand
=
3
},
sounds
=
default
.
node_sound_glass_defaults
(),
})
minetest
.
register_node
(
"building_blocks:grate"
,
{
building_blocks_stairs
(
"building_blocks:grate"
,
{
drawtype
=
"glasslike"
,
description
=
S
(
"Grate"
),
tiles
=
{
"building_blocks_grate.png"
},
...
...
@@ -293,7 +331,7 @@ minetest.register_node("building_blocks:gravel_spread", {
dug
=
{
name
=
"default_gravel_footstep"
,
gain
=
1
.
0
},
}),
})
minetest
.
register_node
(
"building_blocks:hardwood"
,
{
building_blocks_stairs
(
"building_blocks:hardwood"
,
{
tiles
=
{
"building_blocks_hardwood.png"
},
is_ground_content
=
true
,
description
=
S
(
"Hardwood"
),
...
...
@@ -302,43 +340,6 @@ minetest.register_node("building_blocks:hardwood", {
})
if
minetest
.
get_modpath
(
"moreblocks"
)
then
stairsplus
:
register_all
(
"building_blocks"
,
"marble"
,
"building_blocks:Marble"
,
{
description
=
S
(
"Marble"
),
tiles
=
{
"building_blocks_marble.png"
},
groups
=
{
cracky
=
3
},
sounds
=
default
.
node_sound_stone_defaults
(),
}
)
stairsplus
:
register_all
(
"building_blocks"
,
"hardwood"
,
"building_blocks:hardwood"
,
{
description
=
S
(
"Hardwood"
),
tiles
=
{
"building_blocks_hardwood.png"
},
groups
=
{
choppy
=
1
,
flammable
=
1
},
sounds
=
default
.
node_sound_wood_defaults
(),
}
)
stairsplus
:
register_all
(
"building_blocks"
,
"fakegrass"
,
"building_blocks:fakegrass"
,
{
description
=
S
(
"Grass"
),
tiles
=
{
"default_grass.png"
},
groups
=
{
crumbly
=
3
},
sounds
=
default
.
node_sound_dirt_defaults
({
footstep
=
{
name
=
"default_grass_footstep"
,
gain
=
0
.
4
},
}),
}
)
for
_
,
i
in
ipairs
(
stairsplus
.
shapes_list
)
do
local
class
=
i
[
1
]
local
cut
=
i
[
2
]
...
...
@@ -348,168 +349,6 @@ if minetest.get_modpath("moreblocks") then
end
minetest
.
unregister_item
(
"moreblocks:tar"
)
minetest
.
register_alias
(
"moreblocks:tar"
,
"building_blocks:tar"
)
stairsplus
:
register_all
(
"building_blocks"
,
"tar"
,
"building_blocks:Tar"
,
{
description
=
S
(
"Tar"
),
tiles
=
{
"building_blocks_tar.png"
},
groups
=
{
crumbly
=
1
},
sounds
=
default
.
node_sound_stone_defaults
(),
}
)
stairsplus
:
register_all
(
"building_blocks"
,
"grate"
,
"building_blocks:grate"
,
{
description
=
S
(
"Grate"
),
tiles
=
{
"building_blocks_grate.png"
},
groups
=
{
cracky
=
1
},
sounds
=
default
.
node_sound_stone_defaults
(),
}
)
stairsplus
:
register_all
(
"building_blocks"
,
"Adobe"
,
"building_blocks:Adobe"
,
{
description
=
S
(
"Adobe"
),
tiles
=
{
"building_blocks_Adobe.png"
},
groups
=
{
crumbly
=
3
},
sounds
=
default
.
node_sound_stone_defaults
(),
}
)
stairsplus
:
register_all
(
"building_blocks"
,
"Roofing"
,
"building_blocks:Roofing"
,
{
description
=
S
(
"Roofing"
),
tiles
=
{
"building_blocks_Roofing.png"
},
groups
=
{
snappy
=
3
},
sounds
=
default
.
node_sound_stone_defaults
(),
}
)
else
bb_stairs
=
{}
-- Node will be called stairs:stair_<subname>
function
bb_stairs
.
register_stair
(
subname
,
recipeitem
,
groups
,
images
,
description
)
minetest
.
register_node
(
"building_blocks:stair_"
..
subname
,
{
description
=
description
,
drawtype
=
"nodebox"
,
tiles
=
images
,
paramtype
=
"light"
,
paramtype2
=
"facedir"
,
is_ground_content
=
true
,
groups
=
groups
,
node_box
=
{
type
=
"fixed"
,
fixed
=
{
{
-
0
.
5
,
-
0
.
5
,
-
0
.
5
,
0
.
5
,
0
,
0
.
5
},
{
-
0
.
5
,
0
,
0
,
0
.
5
,
0
.
5
,
0
.
5
},
},
},
})
minetest
.
register_craft
({
output
=
'building_blocks:stair_'
..
subname
..
' 4'
,
recipe
=
{
{
recipeitem
,
""
,
""
},
{
recipeitem
,
recipeitem
,
""
},
{
recipeitem
,
recipeitem
,
recipeitem
},
},
})
-- Flipped recipe for the silly minecrafters
minetest
.
register_craft
({
output
=
'building_blocks:stair_'
..
subname
..
' 4'
,
recipe
=
{
{
""
,
""
,
recipeitem
},
{
""
,
recipeitem
,
recipeitem
},
{
recipeitem
,
recipeitem
,
recipeitem
},
},
})
end
-- Node will be called stairs:slab_<subname>
function
bb_stairs
.
register_slab
(
subname
,
recipeitem
,
groups
,
images
,
description
)
minetest
.
register_node
(
"building_blocks:slab_"
..
subname
,
{
description
=
description
,
drawtype
=
"nodebox"
,
tiles
=
images
,
paramtype
=
"light"
,
is_ground_content
=
true
,
groups
=
groups
,
node_box
=
{
type
=
"fixed"
,
fixed
=
{
-
0
.
5
,
-
0
.
5
,
-
0
.
5
,
0
.
5
,
0
,
0
.
5
},
},
selection_box
=
{
type
=
"fixed"
,
fixed
=
{
-
0
.
5
,
-
0
.
5
,
-
0
.
5
,
0
.
5
,
0
,
0
.
5
},
},
})
minetest
.
register_craft
({
output
=
'building_blocks:slab_'
..
subname
..
' 3'
,
recipe
=
{
{
recipeitem
,
recipeitem
,
recipeitem
},
},
})
end
-- Nodes will be called stairs:{stair,slab}_<subname>
function
bb_stairs
.
register_stair_and_slab
(
subname
,
recipeitem
,
groups
,
images
,
desc_stair
,
desc_slab
)
bb_stairs
.
register_stair
(
subname
,
recipeitem
,
groups
,
images
,
desc_stair
)
bb_stairs
.
register_slab
(
subname
,
recipeitem
,
groups
,
images
,
desc_slab
)
end
bb_stairs
.
register_stair_and_slab
(
"marble"
,
"building_blocks:Marble"
,
{
cracky
=
3
},
{
"building_blocks_marble.png"
},
S
(
"Marble stair"
),
S
(
"Marble slab"
)
)
bb_stairs
.
register_stair_and_slab
(
"hardwood"
,
"building_blocks:hardwood"
,
{
choppy
=
1
,
flammable
=
1
},
{
"building_blocks_hardwood.png"
},
S
(
"Hardwood stair"
),
S
(
"Hardwood slab"
)
)
bb_stairs
.
register_stair_and_slab
(
"fakegrass"
,
"building_blocks:fakegrass"
,
{
crumbly
=
3
},
{
"default_grass.png"
},
S
(
"Grass stair"
),
S
(
"Grass slab"
)
)
bb_stairs
.
register_stair_and_slab
(
"tar"
,
"building_blocks:Tar"
,
{
crumbly
=
1
},
{
"building_blocks_tar.png"
},
S
(
"Tar stair"
),
S
(
"Tar slab"
)
)
bb_stairs
.
register_stair_and_slab
(
"grate"
,
"building_blocks:grate"
,
{
cracky
=
1
},
{
"building_blocks_grate.png"
},
S
(
"Grate Stair"
),
S
(
"Grate Slab"
)
)
bb_stairs
.
register_stair_and_slab
(
"Adobe"
,
"building_blocks:Adobe"
,
{
crumbly
=
3
},
{
"building_blocks_Adobe.png"
},
S
(
"Adobe stair"
),
S
(
"Adobe slab"
)
)
bb_stairs
.
register_stair_and_slab
(
"Roofing"
,
"building_blocks:Roofing"
,
{
snappy
=
3
},
{
"building_blocks_Roofing.png"
},
S
(
"Roofing stair"
),
S
(
"Roofing slab"
)
)
end
...
...
@@ -519,7 +358,7 @@ minetest.register_craft({
burntime
=
28
,
})
minetest
.
register_node
(
"building_blocks:fakegrass"
,
{
building_blocks_stairs
(
"building_blocks:fakegrass"
,
{
tiles
=
{
"default_grass.png"
,
"default_dirt.png"
,
"default_dirt.png^default_grass_side.png"
},
description
=
S
(
"Fake Grass"
),
is_ground_content
=
true
,
...
...
@@ -564,14 +403,14 @@ minetest.register_alias("building_blocks:Roofing", "building_blocks:roofing")
minetest
.
register_alias
(
"building_blocks:Tar"
,
"building_blocks:tar"
)
minetest
.
register_alias
(
"building_blocks:Marble"
,
"building_blocks:marble"
)
minetest
.
register_node
(
"building_blocks:tar"
,
{
building_blocks_stairs
(
"building_blocks:tar"
,
{
description
=
S
(
"Tar"
),
tiles
=
{
"building_blocks_tar.png"
},
is_ground_content
=
true
,
groups
=
{
crumbly
=
1
,
tar_block
=
1
},
sounds
=
default
.
node_sound_stone_defaults
(),
})
minetest
.
register_node
(
"building_blocks:marble"
,
{
building_blocks_stairs
(
"building_blocks:marble"
,
{
description
=
S
(
"Marble"
),
tiles
=
{
"building_blocks_marble.png"
},
is_ground_content
=
true
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment