Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
minetest_game
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
minetest_game
Commits
ab494050
Commit
ab494050
authored
6 years ago
by
kakalak-lumberJack
Committed by
SmallJoker
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
wall.register: Allow table as texture value
parent
506eca22
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
mods/walls/init.lua
+9
-5
9 additions, 5 deletions
mods/walls/init.lua
with
9 additions
and
5 deletions
mods/walls/init.lua
+
9
−
5
View file @
ab494050
walls
=
{}
walls
.
register
=
function
(
wall_name
,
wall_desc
,
wall_texture
,
wall_mat
,
wall_sounds
)
walls
.
register
=
function
(
wall_name
,
wall_desc
,
wall_texture_table
,
wall_mat
,
wall_sounds
)
--make wall_texture_table paramenter backwards compatible for mods passing single texture
if
type
(
wall_texture_table
)
~=
"table"
then
wall_texture_table
=
{
wall_texture_table
}
end
-- inventory node, and pole-type wall start item
minetest
.
register_node
(
wall_name
,
{
description
=
wall_desc
,
...
...
@@ -17,7 +21,7 @@ walls.register = function(wall_name, wall_desc, wall_texture, wall_mat, wall_sou
connects_to
=
{
"group:wall"
,
"group:stone"
,
"group:fence"
},
paramtype
=
"light"
,
is_ground_content
=
false
,
tiles
=
{
wall_texture
,
}
,
tiles
=
wall_texture
_table
,
walkable
=
true
,
groups
=
{
cracky
=
3
,
wall
=
1
,
stone
=
2
},
sounds
=
wall_sounds
,
...
...
@@ -35,12 +39,12 @@ walls.register = function(wall_name, wall_desc, wall_texture, wall_mat, wall_sou
end
walls
.
register
(
"walls:cobble"
,
"Cobblestone Wall"
,
"default_cobble.png"
,
walls
.
register
(
"walls:cobble"
,
"Cobblestone Wall"
,
{
"default_cobble.png"
}
,
"default:cobble"
,
default
.
node_sound_stone_defaults
())
walls
.
register
(
"walls:mossycobble"
,
"Mossy Cobblestone Wall"
,
"default_mossycobble.png"
,
walls
.
register
(
"walls:mossycobble"
,
"Mossy Cobblestone Wall"
,
{
"default_mossycobble.png"
}
,
"default:mossycobble"
,
default
.
node_sound_stone_defaults
())
walls
.
register
(
"walls:desertcobble"
,
"Desert Cobblestone Wall"
,
"default_desert_cobble.png"
,
walls
.
register
(
"walls:desertcobble"
,
"Desert Cobblestone Wall"
,
{
"default_desert_cobble.png"
}
,
"default:desert_cobble"
,
default
.
node_sound_stone_defaults
())
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