Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
minetest_game
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Zadrog Pzvotrügen
minetest_game
Commits
4c3b8376
Commit
4c3b8376
authored
8 years ago
by
Auke Kok
Committed by
Milan
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
cherry-pick from github.com/minetest/minetest_game> Stairs: Add mossy cobble slab and stair
parent
eff782c6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
game_api.txt
+1
-1
1 addition, 1 deletion
game_api.txt
mods/default/functions.lua
+8
-2
8 additions, 2 deletions
mods/default/functions.lua
mods/stairs/init.lua
+34
-23
34 additions, 23 deletions
mods/stairs/init.lua
with
43 additions
and
26 deletions
game_api.txt
+
1
−
1
View file @
4c3b8376
...
...
@@ -343,7 +343,7 @@ delivered with Minetest Game, to keep them compatible with other mods.
* Registers a stair.
* `subname`: Basically the material name (e.g. cobble) used for the stair name. Nodename pattern: "stairs:stair_subname"
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble"
* `recipeitem`: Item used in the craft recipe, e.g. "default:cobble"
, may be `nil`
* `groups`: see [Known damage and digging time defining groups]
* `images`: see [Tile definition]
* `description`: used for the description field in the stair's definition
...
...
This diff is collapsed.
Click to expand it.
mods/default/functions.lua
+
8
−
2
View file @
4c3b8376
...
...
@@ -455,12 +455,18 @@ minetest.register_abm({
--
minetest
.
register_abm
({
nodenames
=
{
"default:cobble"
},
nodenames
=
{
"default:cobble"
,
"stairs:slab_cobble"
,
"stairs:stair_cobble"
},
neighbors
=
{
"group:water"
},
interval
=
16
,
chance
=
200
,
catch_up
=
false
,
action
=
function
(
pos
,
node
)
minetest
.
set_node
(
pos
,
{
name
=
"default:mossycobble"
})
if
node
.
name
==
"default:cobble"
then
minetest
.
set_node
(
pos
,
{
name
=
"default:mossycobble"
})
elseif
node
.
name
==
"stairs:slab_cobble"
then
minetest
.
set_node
(
pos
,
{
name
=
"stairs:slab_mossycobble"
,
param2
=
node
.
param2
})
elseif
node
.
name
==
"stairs:stair_cobble"
then
minetest
.
set_node
(
pos
,
{
name
=
"stairs:stair_mossycobble"
,
param2
=
node
.
param2
})
end
end
})
This diff is collapsed.
Click to expand it.
mods/stairs/init.lua
+
34
−
23
View file @
4c3b8376
...
...
@@ -90,24 +90,26 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
})
end
minetest
.
register_craft
({
output
=
'stairs:stair_'
..
subname
..
' 6'
,
recipe
=
{
{
recipeitem
,
""
,
""
},
{
recipeitem
,
recipeitem
,
""
},
{
recipeitem
,
recipeitem
,
recipeitem
},
},
})
if
recipeitem
then
minetest
.
register_craft
({
output
=
'stairs:stair_'
..
subname
..
' 6'
,
recipe
=
{
{
recipeitem
,
""
,
""
},
{
recipeitem
,
recipeitem
,
""
},
{
recipeitem
,
recipeitem
,
recipeitem
},
},
})
-- Flipped recipe for the silly minecrafters
minetest
.
register_craft
({
output
=
'stairs:stair_'
..
subname
..
' 6'
,
recipe
=
{
{
""
,
""
,
recipeitem
},
{
""
,
recipeitem
,
recipeitem
},
{
recipeitem
,
recipeitem
,
recipeitem
},
},
})
-- Flipped recipe for the silly minecrafters
minetest
.
register_craft
({
output
=
'stairs:stair_'
..
subname
..
' 6'
,
recipe
=
{
{
""
,
""
,
recipeitem
},
{
""
,
recipeitem
,
recipeitem
},
{
recipeitem
,
recipeitem
,
recipeitem
},
},
})
end
end
...
...
@@ -221,12 +223,14 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
})
end
minetest
.
register_craft
({
output
=
'stairs:slab_'
..
subname
..
' 6'
,
recipe
=
{
{
recipeitem
,
recipeitem
,
recipeitem
},
},
})
if
recipeitem
then
minetest
.
register_craft
({
output
=
'stairs:slab_'
..
subname
..
' 6'
,
recipe
=
{
{
recipeitem
,
recipeitem
,
recipeitem
},
},
})
end
end
...
...
@@ -313,6 +317,13 @@ stairs.register_stair_and_slab("cobble", "default:cobble",
"Cobblestone Slab"
,
default
.
node_sound_stone_defaults
())
stairs
.
register_stair_and_slab
(
"mossycobble"
,
nil
,
{
cracky
=
3
},
{
"default_mossycobble.png"
},
"Mossy Cobblestone Stair"
,
"Mossy Cobblestone Slab"
,
default
.
node_sound_stone_defaults
())
stairs
.
register_stair_and_slab
(
"stonebrick"
,
"default:stonebrick"
,
{
cracky
=
3
},
{
"default_stone_brick.png"
},
...
...
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