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
2848df00
Commit
2848df00
authored
12 years ago
by
Jeija
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: Also deactivate the block two below when digging a pressure plate
parent
c9e89189
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mesecons_pressureplates/init.lua
+9
-3
9 additions, 3 deletions
mesecons_pressureplates/init.lua
with
9 additions
and
3 deletions
mesecons_pressureplates/init.lua
+
9
−
3
View file @
2848df00
...
...
@@ -39,12 +39,12 @@ end
-- Register a Pressure Plate
-- offstate: name of the pressure plate when inactive
-- onstate:
name of the pressure plate when active
-- onstate: name of the pressure plate when active
-- description: description displayed in the player's inventory
-- tiles_off: textures of the pressure plate when inactive
-- tiles_on: textures of the pressure plate when active
-- image:
inventory and wield image of the pressure plate
-- recipe:
crafting recipe of the pressure plate
-- image: inventory and wield image of the pressure plate
-- recipe: crafting recipe of the pressure plate
function
mesecon
:
register_pressure_plate
(
offstate
,
onstate
,
description
,
texture_off
,
texture_on
,
recipe
)
local
ppspec
=
{
...
...
@@ -88,6 +88,12 @@ function mesecon:register_pressure_plate(offstate, onstate, description, texture
on_construct
=
function
(
pos
)
minetest
.
env
:
get_node_timer
(
pos
):
start
(
PRESSURE_PLATE_INTERVAL
)
end
,
after_dig_node
=
function
(
pos
)
local
two_below
=
mesecon
:
addPosRule
(
pos
,
{
x
=
0
,
y
=
-
2
,
z
=
0
})
if
not
mesecon
:
connected_to_receptor
(
two_below
)
then
mesecon
:
turnoff
(
two_below
)
end
end
})
minetest
.
register_craft
({
...
...
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