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
30468b09
Commit
30468b09
authored
10 years ago
by
Jeija
Browse files
Options
Downloads
Patches
Plain Diff
Do not send action_off signal when newly placing nodes, this didn't
cause any bugs, but unneccessary sounds (experimental change)
parent
a8957157
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
mesecons/services.lua
+1
-7
1 addition, 7 deletions
mesecons/services.lua
with
1 addition
and
7 deletions
mesecons/services.lua
+
1
−
7
View file @
30468b09
...
...
@@ -28,13 +28,11 @@ mesecon.on_placenode = function (pos, node)
-- Effectors: Send changesignal and activate or deactivate
if
mesecon
.
is_effector
(
node
.
name
)
then
local
powered_rules
=
{}
local
unpowered_rules
=
{}
-- for each input rule, check if powered
for
_
,
r
in
ipairs
(
mesecon
.
effector_get_rules
(
node
))
do
local
powered
=
mesecon
.
is_powered
(
pos
,
r
)
if
powered
then
table.insert
(
powered_rules
,
r
)
else
table.insert
(
unpowered_rules
,
r
)
end
if
powered
then
table.insert
(
powered_rules
,
r
)
end
local
state
=
powered
and
mesecon
.
state
.
on
or
mesecon
.
state
.
off
mesecon
.
changesignal
(
pos
,
node
,
r
,
state
,
1
)
...
...
@@ -44,10 +42,6 @@ mesecon.on_placenode = function (pos, node)
for
_
,
r
in
ipairs
(
powered_rules
)
do
mesecon
.
activate
(
pos
,
node
,
r
,
1
)
end
else
for
_
,
r
in
ipairs
(
unpowered_rules
)
do
mesecon
.
deactivate
(
pos
,
node
,
r
,
1
)
end
end
end
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