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
2e413b52
Commit
2e413b52
authored
7 years ago
by
DS-Minetest
Committed by
paramat
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add backface_culling to open chests and fencegates
parent
0f7d0bfd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
game_api.txt
+2
-1
2 additions, 1 deletion
game_api.txt
mods/default/nodes.lua
+8
-1
8 additions, 1 deletion
mods/default/nodes.lua
mods/doors/init.lua
+11
-1
11 additions, 1 deletion
mods/doors/init.lua
with
21 additions
and
3 deletions
game_api.txt
+
2
−
1
View file @
2e413b52
...
...
@@ -155,7 +155,8 @@ The doors mod allows modders to register custom doors and trapdoors.
### Fence gate definition
description = "Wooden Fence Gate",
texture = "default_wood.png",
texture = "default_wood.png", -- `backface_culling` will automatically be
-- set to `true` if not specified.
material = "default:wood",
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2},
sounds = default.node_sound_wood_defaults(), -- optional
...
...
This diff is collapsed.
Click to expand it.
mods/default/nodes.lua
+
8
−
1
View file @
2e413b52
...
...
@@ -1990,12 +1990,19 @@ function default.register_chest(name, d)
local
def_closed
=
table
.
copy
(
def
)
def_opened
.
mesh
=
"chest_open.obj"
for
i
=
1
,
#
def_opened
.
tiles
do
if
type
(
def_opened
.
tiles
[
i
])
==
"string"
then
def_opened
.
tiles
[
i
]
=
{
name
=
def_opened
.
tiles
[
i
],
backface_culling
=
true
}
elseif
def_opened
.
tiles
[
i
].
backface_culling
==
nil
then
def_opened
.
tiles
[
i
].
backface_culling
=
true
end
end
def_opened
.
drop
=
"default:"
..
name
def_opened
.
groups
.
not_in_creative_inventory
=
1
def_opened
.
selection_box
=
{
type
=
"fixed"
,
fixed
=
{
-
1
/
2
,
-
1
/
2
,
-
1
/
2
,
1
/
2
,
3
/
16
,
1
/
2
},
}
}
def_opened
.
can_dig
=
function
()
return
false
end
...
...
This diff is collapsed.
Click to expand it.
mods/doors/init.lua
+
11
−
1
View file @
2e413b52
...
...
@@ -712,7 +712,7 @@ function doors.register_fencegate(name, def)
local
fence
=
{
description
=
def
.
description
,
drawtype
=
"mesh"
,
tiles
=
{
def
.
texture
},
tiles
=
{},
paramtype
=
"light"
,
paramtype2
=
"facedir"
,
sunlight_propagates
=
true
,
...
...
@@ -734,6 +734,16 @@ function doors.register_fencegate(name, def)
},
}
if
type
(
def
.
texture
)
==
"string"
then
fence
.
tiles
[
1
]
=
{
name
=
def
.
texture
,
backface_culling
=
true
}
elseif
def
.
texture
.
backface_culling
==
nil
then
fence
.
tiles
[
1
]
=
table
.
copy
(
def
.
texture
)
fence
.
tiles
[
1
].
backface_culling
=
true
else
fence
.
tiles
[
1
]
=
def
.
texture
end
if
not
fence
.
sounds
then
fence
.
sounds
=
default
.
node_sound_wood_defaults
()
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