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
aaddd9e7
Commit
aaddd9e7
authored
12 years ago
by
Anthony Zhang
Browse files
Options
Downloads
Patches
Plain Diff
Fix a rare piston pushing bug and make piston updating faster.
parent
618fd31f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
mesecons_pistons/init.lua
+3
-4
3 additions, 4 deletions
mesecons_pistons/init.lua
mesecons_pistons/pistons_down.lua
+2
-3
2 additions, 3 deletions
mesecons_pistons/pistons_down.lua
mesecons_pistons/pistons_up.lua
+2
-3
2 additions, 3 deletions
mesecons_pistons/pistons_up.lua
with
7 additions
and
10 deletions
mesecons_pistons/init.lua
+
3
−
4
View file @
aaddd9e7
...
...
@@ -134,7 +134,7 @@ local update = function(pos, node)
local
timer
=
minetest
.
env
:
get_node_timer
(
pos
)
timer
:
stop
()
timer
:
s
et
(
0
.
1
,
0
)
timer
:
s
tart
(
0
)
end
mesecon
:
register_on_signal_on
(
update
)
--push action
mesecon
:
register_on_signal_off
(
update
)
--pull action
...
...
@@ -150,14 +150,13 @@ function mesecon:piston_push(pos)
while
true
do
local
checknode
=
minetest
.
env
:
get_node
(
checkpos
)
--check for collision with stopper
if
mesecon
:
is_mvps_stopper
(
checknode
.
name
)
then
--check for collision with stopper
or bounds
if
mesecon
:
is_mvps_stopper
(
checknode
.
name
)
or
checknode
.
name
==
"ignore"
then
return
end
--check for column end
if
checknode
.
name
==
"air"
or
checknode
.
name
==
"ignore"
or
not
(
minetest
.
registered_nodes
[
checknode
.
name
].
liquidtype
==
"none"
)
then
break
end
...
...
This diff is collapsed.
Click to expand it.
mesecons_pistons/pistons_down.lua
+
2
−
3
View file @
aaddd9e7
...
...
@@ -133,14 +133,13 @@ mesecon:register_on_signal_on(function(pos, node)
while
true
do
local
checknode
=
minetest
.
env
:
get_node
(
checkpos
)
--check for collision with stopper
if
mesecon
:
is_mvps_stopper
(
checknode
.
name
)
then
--check for collision with stopper
or bounds
if
mesecon
:
is_mvps_stopper
(
checknode
.
name
)
or
checknode
.
name
==
"ignore"
then
return
end
--check for column end
if
checknode
.
name
==
"air"
or
checknode
.
name
==
"ignore"
or
not
(
minetest
.
registered_nodes
[
checknode
.
name
].
liquidtype
==
"none"
)
then
break
end
...
...
This diff is collapsed.
Click to expand it.
mesecons_pistons/pistons_up.lua
+
2
−
3
View file @
aaddd9e7
...
...
@@ -121,14 +121,13 @@ mesecon:register_on_signal_on(function(pos, node)
while
true
do
local
checknode
=
minetest
.
env
:
get_node
(
checkpos
)
--check for collision with stopper
if
mesecon
:
is_mvps_stopper
(
checknode
.
name
)
then
--check for collision with stopper
or bounds
if
mesecon
:
is_mvps_stopper
(
checknode
.
name
)
or
checknode
.
name
==
"ignore"
then
return
end
--check for column end
if
checknode
.
name
==
"air"
or
checknode
.
name
==
"ignore"
or
not
(
minetest
.
registered_nodes
[
checknode
.
name
].
liquidtype
==
"none"
)
then
break
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