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
cf45e24c
Commit
cf45e24c
authored
9 years ago
by
HybridDog
Browse files
Options
Downloads
Patches
Plain Diff
this way it works better because unknown nodes may not stay unknown
parent
3f00c1d1
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_mvps/init.lua
+8
-1
8 additions, 1 deletion
mesecons_mvps/init.lua
with
8 additions
and
1 deletion
mesecons_mvps/init.lua
+
8
−
1
View file @
cf45e24c
...
...
@@ -19,6 +19,12 @@ function mesecon.is_mvps_stopper(node, pushdir, stack, stackid)
if
type
(
get_stopper
)
==
"function"
then
get_stopper
=
get_stopper
(
node
,
pushdir
,
stack
,
stackid
)
end
if
get_stopper
==
nil
and
not
minetest
.
registered_nodes
[
node
.
name
]
then
-- unknown nodes must be stoppers
mesecon
.
mvps_stoppers
[
node
.
name
]
=
true
get_stopper
=
true
end
return
get_stopper
end
...
...
@@ -53,7 +59,8 @@ local function node_replaceable(name)
if
replaceable_cache
[
name
]
~=
nil
then
return
replaceable_cache
[
name
]
end
local
replaceable
=
not
minetest
.
registered_nodes
[
name
]
or
minetest
.
registered_nodes
[
name
].
buildable_to
or
false
--local replaceable = not minetest.registered_nodes[name] or minetest.registered_nodes[name].buildable_to or false
local
replaceable
=
(
minetest
.
registered_nodes
[
name
]
and
minetest
.
registered_nodes
[
name
].
buildable_to
)
or
false
replaceable_cache
[
name
]
=
replaceable
return
replaceable
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