Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
plantlife_modpack
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
plantlife_modpack
Commits
2ad8c73f
Commit
2ad8c73f
authored
9 years ago
by
Rogier
Browse files
Options
Downloads
Patches
Plain Diff
Fix trunks mod start failure if some type of trunk does not exist.
parent
16db34a9
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
trunks/nodes.lua
+34
-29
34 additions, 29 deletions
trunks/nodes.lua
with
34 additions
and
29 deletions
trunks/nodes.lua
+
34
−
29
View file @
2ad8c73f
...
...
@@ -327,35 +327,40 @@ for i in pairs(TRuNKS) do
local
TRuNK
=
TRuNKS
[
i
][
2
]
if
minetest
.
get_modpath
(
MoD
)
~=
nil
then
local
des
=
minetest
.
registered_nodes
[
MoD
..
":"
..
TRuNK
].
description
minetest
.
register_node
(
"trunks:"
..
TRuNK
..
"root"
,
{
description
=
des
..
" Root"
,
paramtype
=
"light"
,
paramtype2
=
"facedir"
,
tiles
=
{
--[[top]]
MoD
..
"_"
..
TRuNK
..
".png"
,
--[[bottom]]
MoD
..
"_"
..
TRuNK
..
".png"
,
--[[right]]
MoD
..
"_"
..
TRuNK
..
".png^trunks_root_mask.png^[makealpha:0,0,0"
,
--[[left]]
MoD
..
"_"
..
TRuNK
..
".png^trunks_root_mask.png^[transformFX^[makealpha:0,0,0"
,
--[[back]]
MoD
..
"_"
..
TRuNK
..
".png"
,
--[[front]]
MoD
..
"_"
..
TRuNK
..
".png"
},
drawtype
=
"nodebox"
,
selection_box
=
{
type
=
"fixed"
,
fixed
=
roots_cube
},
node_box
=
{
type
=
"fixed"
,
fixed
=
roots_sheet
},
groups
=
{
tree
=
1
,
snappy
=
1
,
choppy
=
2
,
oddly_breakable_by_hand
=
1
,
flammable
=
2
--,
--not_in_creative_inventory=1 -- atm in inv for testing
},
--drop = "trunks:twig_1", -- not sure about this yet
sounds
=
default
.
node_sound_wood_defaults
(),
})
local
node
=
minetest
.
registered_nodes
[
MoD
..
":"
..
TRuNK
]
if
node
then
local
des
=
node
.
description
minetest
.
register_node
(
"trunks:"
..
TRuNK
..
"root"
,
{
description
=
des
..
" Root"
,
paramtype
=
"light"
,
paramtype2
=
"facedir"
,
tiles
=
{
--[[top]]
MoD
..
"_"
..
TRuNK
..
".png"
,
--[[bottom]]
MoD
..
"_"
..
TRuNK
..
".png"
,
--[[right]]
MoD
..
"_"
..
TRuNK
..
".png^trunks_root_mask.png^[makealpha:0,0,0"
,
--[[left]]
MoD
..
"_"
..
TRuNK
..
".png^trunks_root_mask.png^[transformFX^[makealpha:0,0,0"
,
--[[back]]
MoD
..
"_"
..
TRuNK
..
".png"
,
--[[front]]
MoD
..
"_"
..
TRuNK
..
".png"
},
drawtype
=
"nodebox"
,
selection_box
=
{
type
=
"fixed"
,
fixed
=
roots_cube
},
node_box
=
{
type
=
"fixed"
,
fixed
=
roots_sheet
},
groups
=
{
tree
=
1
,
snappy
=
1
,
choppy
=
2
,
oddly_breakable_by_hand
=
1
,
flammable
=
2
--,
--not_in_creative_inventory=1 -- atm in inv for testing
},
--drop = "trunks:twig_1", -- not sure about this yet
sounds
=
default
.
node_sound_wood_defaults
(),
})
else
print
(
string.format
(
"[Trunks] warning: tree type '%s:%s' not found"
,
MoD
,
TRuNK
))
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