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
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
Illuna-Minetest
minetest_game
Commits
3c0fa5f8
Commit
3c0fa5f8
authored
11 years ago
by
ShadowNinja
Browse files
Options
Downloads
Patches
Plain Diff
Remove trailing tabs from empty lines in stairs
parent
7b8ad578
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mods/stairs/init.lua
+13
-13
13 additions, 13 deletions
mods/stairs/init.lua
with
13 additions
and
13 deletions
mods/stairs/init.lua
+
13
−
13
View file @
3c0fa5f8
...
...
@@ -25,11 +25,11 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
if
pointed_thing
.
type
~=
"node"
then
return
itemstack
end
local
p0
=
pointed_thing
.
under
local
p1
=
pointed_thing
.
above
local
param2
=
0
local
placer_pos
=
placer
:
getpos
()
if
placer_pos
then
local
dir
=
{
...
...
@@ -39,7 +39,7 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
}
param2
=
minetest
.
dir_to_facedir
(
dir
)
end
if
p0
.
y
-
1
==
p1
.
y
then
param2
=
param2
+
20
if
param2
==
21
then
...
...
@@ -48,11 +48,11 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
param2
=
21
end
end
return
minetest
.
item_place
(
itemstack
,
placer
,
pointed_thing
,
param2
)
end
,
})
-- for replace ABM
minetest
.
register_node
(
":stairs:stair_"
..
subname
..
"upside_down"
,
{
replace_name
=
"stairs:stair_"
..
subname
,
...
...
@@ -108,10 +108,10 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
local
n0
=
minetest
.
get_node
(
p0
)
local
n1
=
minetest
.
get_node
(
p1
)
local
param2
=
0
local
n0_is_upside_down
=
(
n0
.
name
==
"stairs:slab_"
..
subname
and
n0
.
param2
>=
20
)
if
n0
.
name
==
"stairs:slab_"
..
subname
and
not
n0_is_upside_down
and
p0
.
y
+
1
==
p1
.
y
then
slabpos
=
p0
slabnode
=
n0
...
...
@@ -125,7 +125,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
-- Make a fake stack of a single item and try to place it
local
fakestack
=
ItemStack
(
recipeitem
)
fakestack
:
set_count
(
itemstack
:
get_count
())
pointed_thing
.
above
=
slabpos
local
success
fakestack
,
success
=
minetest
.
item_place
(
fakestack
,
placer
,
pointed_thing
)
...
...
@@ -148,7 +148,7 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
-- Make a fake stack of a single item and try to place it
local
fakestack
=
ItemStack
(
recipeitem
)
fakestack
:
set_count
(
itemstack
:
get_count
())
pointed_thing
.
above
=
p0
local
success
fakestack
,
success
=
minetest
.
item_place
(
fakestack
,
placer
,
pointed_thing
)
...
...
@@ -161,20 +161,20 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
end
return
itemstack
end
-- Place upside down slab
param2
=
20
end
-- If pointing at the side of a upside down slab
if
n0_is_upside_down
and
p0
.
y
+
1
~=
p1
.
y
then
param2
=
20
end
return
minetest
.
item_place
(
itemstack
,
placer
,
pointed_thing
,
param2
)
end
,
})
-- for replace ABM
minetest
.
register_node
(
":stairs:slab_"
..
subname
..
"upside_down"
,
{
replace_name
=
"stairs:slab_"
..
subname
,
...
...
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