Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xdecor
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
xdecor
Commits
8020eb18
Commit
8020eb18
authored
5 years ago
by
benrob0329
Committed by
SmallJoker
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add mesecons support to doors (#106)
(if available)
parent
ee7a2817
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
depends.txt
+2
-1
2 additions, 1 deletion
depends.txt
src/nodes.lua
+21
-1
21 additions, 1 deletion
src/nodes.lua
with
23 additions
and
2 deletions
depends.txt
+
2
−
1
View file @
8020eb18
...
...
@@ -5,4 +5,5 @@ stairs
xpanes
fire?
oresplus?
moreblocks?
\ No newline at end of file
moreblocks?
mesecons_doors?
This diff is collapsed.
Click to expand it.
src/nodes.lua
+
21
−
1
View file @
8020eb18
...
...
@@ -263,6 +263,25 @@ local xdecor_doors = {
{
"group:wood"
,
"group:wood"
}
}
}
local
mesecons_register
if
minetest
.
global_exists
(
"mesecon"
)
then
mesecons_register
=
{
effector
=
{
action_on
=
function
(
pos
,
node
)
local
door
=
doors
.
get
(
pos
)
if
door
then
door
:
open
()
end
end
,
action_off
=
function
(
pos
,
node
)
local
door
=
doors
.
get
(
pos
)
if
door
then
door
:
close
()
end
end
,
rules
=
mesecon
.
rules
.
pplate
}}
end
for
name
,
recipe
in
pairs
(
xdecor_doors
)
do
if
not
doors
.
register
then
break
end
doors
.
register
(
name
..
"_door"
,
{
...
...
@@ -271,7 +290,8 @@ for name, recipe in pairs(xdecor_doors) do
inventory_image
=
"xdecor_"
..
name
..
"_door_inv.png"
,
protected
=
door_access
(
name
),
groups
=
{
choppy
=
2
,
cracky
=
2
,
oddly_breakable_by_hand
=
1
,
door
=
1
},
recipe
=
recipe
recipe
=
recipe
,
mesecons
=
mesecons_register
})
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