Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mesecons
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
mesecons
Commits
cd8fd55f
Commit
cd8fd55f
authored
12 years ago
by
Anthony Zhang
Browse files
Options
Downloads
Patches
Plain Diff
Fix whitespace, simplify node updating.
parent
208e95c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mesecons_pistons/pistons_down.lua
+4
-9
4 additions, 9 deletions
mesecons_pistons/pistons_down.lua
mesecons_pistons/pistons_up.lua
+4
-9
4 additions, 9 deletions
mesecons_pistons/pistons_up.lua
with
8 additions
and
18 deletions
mesecons_pistons/pistons_down.lua
+
4
−
9
View file @
cd8fd55f
...
...
@@ -198,9 +198,6 @@ mesecon:register_on_signal_off(function(pos, node)
--retract piston
minetest
.
env
:
remove_node
(
pos
)
--remove pusher
if
node
.
name
~=
"mesecons_pistons:piston_down_sticky"
then
nodeupdate
(
pos
)
end
if
node
.
name
==
"mesecons_pistons:piston_down_sticky"
then
--retract block
local
checkpos
=
{
x
=
pos
.
x
+
dir
.
x
,
y
=
pos
.
y
+
dir
.
y
,
z
=
pos
.
z
+
dir
.
z
}
--move to the node to be retracted
checknode
=
minetest
.
env
:
get_node
(
checkpos
)
...
...
@@ -209,12 +206,10 @@ mesecon:register_on_signal_off(function(pos, node)
and
minetest
.
registered_nodes
[
checknode
.
name
].
liquidtype
==
"none"
and
not
mesecon
:
is_mvps_stopper
(
checknode
.
name
)
then
minetest
.
env
:
remove_node
(
checkpos
)
mesecon
:
updatenode
(
checkpos
)
minetest
.
env
:
set_node
(
pos
,
checknode
)
mesecon
:
updatenode
(
pos
)
mesecon
:
updatenode
(
checkpos
)
minetest
.
env
:
set_node
(
pos
,
checknode
)
mesecon
:
updatenode
(
pos
)
end
end
if
node
.
name
==
"mesecons_pistons:piston_down_sticky"
then
nodeupdate
(
pos
)
end
nodeupdate
(
pos
)
end
)
This diff is collapsed.
Click to expand it.
mesecons_pistons/pistons_up.lua
+
4
−
9
View file @
cd8fd55f
...
...
@@ -186,9 +186,6 @@ mesecon:register_on_signal_off(function(pos, node)
--retract piston
minetest
.
env
:
remove_node
(
pos
)
--remove pusher
if
node
.
name
~=
"mesecons_pistons:piston_up_sticky"
then
nodeupdate
(
pos
)
end
if
node
.
name
==
"mesecons_pistons:piston_up_sticky"
then
--retract block
local
checkpos
=
{
x
=
pos
.
x
+
dir
.
x
,
y
=
pos
.
y
+
dir
.
y
,
z
=
pos
.
z
+
dir
.
z
}
--move to the node to be retracted
checknode
=
minetest
.
env
:
get_node
(
checkpos
)
...
...
@@ -197,12 +194,10 @@ mesecon:register_on_signal_off(function(pos, node)
and
minetest
.
registered_nodes
[
checknode
.
name
].
liquidtype
==
"none"
and
not
mesecon
:
is_mvps_stopper
(
checknode
.
name
)
then
minetest
.
env
:
remove_node
(
checkpos
)
mesecon
:
updatenode
(
checkpos
)
minetest
.
env
:
set_node
(
pos
,
checknode
)
mesecon
:
updatenode
(
pos
)
mesecon
:
updatenode
(
checkpos
)
minetest
.
env
:
set_node
(
pos
,
checknode
)
mesecon
:
updatenode
(
pos
)
end
end
if
node
.
name
==
"mesecons_pistons:piston_up_sticky"
then
nodeupdate
(
pos
)
end
nodeupdate
(
pos
)
end
)
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