Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kif_custom
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Minetest
kif_custom
Commits
6d6a085a
Commit
6d6a085a
authored
4 years ago
by
Peter Nerlich
Browse files
Options
Downloads
Patches
Plain Diff
add moreblocks variants to be ignored by trains (only the sensible ones)
parent
8b0f5e43
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
depends.txt
+1
-0
1 addition, 0 deletions
depends.txt
init.lua
+38
-0
38 additions, 0 deletions
init.lua
with
39 additions
and
0 deletions
depends.txt
+
1
−
0
View file @
6d6a085a
...
@@ -3,3 +3,4 @@ digilines
...
@@ -3,3 +3,4 @@ digilines
xpanes
xpanes
basic_materials
basic_materials
mesecons_luacontroller
mesecons_luacontroller
moreblocks
This diff is collapsed.
Click to expand it.
init.lua
+
38
−
0
View file @
6d6a085a
...
@@ -45,6 +45,44 @@ local additional_nonblocknodes={
...
@@ -45,6 +45,44 @@ local additional_nonblocknodes={
"mesecons_pressureplates:pressure_plate_stone"
,
"mesecons_pressureplates:pressure_plate_stone"
,
}
}
minetest
.
after
(
0
,
function
()
minetest
.
after
(
0
,
function
()
local
mods
=
{
"moreblocks"
,
"bakedclay"
,
"building_blocks"
,
"my_door_wood"
,
"my_sliding_doors"
}
local
variants
=
{
micro_
=
nil
,
slope
=
nil
,
slab_
=
{
"_1"
,
"_2"
,
"_quarter"
,
"_two_sides"
,
"_three_sides"
},
stair_
=
{
"_alt"
,
"_alt_1"
,
"_alt_2"
,
"_alt_4"
,
"_outer"
},
panel_
=
{
"_1"
,
"_2"
,
"_4"
},
}
local
to_add
=
{}
for
i
,
mod
in
ipairs
(
mods
)
do
for
variant
,
data
in
pairs
(
variants
)
do
if
to_add
[
mod
]
==
nil
then
to_add
[
mod
]
=
{}
end
to_add
[
mod
][
variant
]
=
data
end
end
for
name
,
def
in
pairs
(
minetest
.
registered_nodes
)
do
for
mod
,
variants
in
pairs
(
to_add
)
do
if
string.sub
(
name
,
1
,
#
mod
+
1
)
==
mod
..
":"
then
for
variant
,
endings
in
pairs
(
variants
)
do
local
prefix
=
mod
..
":"
..
variant
if
string.sub
(
name
,
1
,
#
prefix
)
==
prefix
then
if
endings
then
for
_
,
ending
in
ipairs
(
endings
)
do
if
string.sub
(
name
,
#
name
-
#
ending
+
1
,
#
name
)
==
ending
then
table.insert
(
additional_nonblocknodes
,
name
)
end
end
else
table.insert
(
additional_nonblocknodes
,
name
)
end
end
end
end
end
end
for
_
,
name
in
ipairs
(
additional_nonblocknodes
)
do
for
_
,
name
in
ipairs
(
additional_nonblocknodes
)
do
if
minetest
.
registered_nodes
[
name
]
then
if
minetest
.
registered_nodes
[
name
]
then
minetest
.
registered_nodes
[
name
].
groups
.
not_blocking_trains
=
1
minetest
.
registered_nodes
[
name
].
groups
.
not_blocking_trains
=
1
...
...
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