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
f33cc020
Commit
f33cc020
authored
7 years ago
by
danielmeek32
Committed by
SmallJoker
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Chests: Fix locked chest protection against explosions (#1886)
Fixes #1885
parent
c5c9e423
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/default/nodes.lua
+8
-7
8 additions, 7 deletions
mods/default/nodes.lua
with
8 additions
and
7 deletions
mods/default/nodes.lua
+
8
−
7
View file @
f33cc020
...
...
@@ -1973,6 +1973,13 @@ function default.register_chest(name, d)
open_chests
[
clicker
:
get_player_name
()]
=
{
pos
=
pos
,
sound
=
def
.
sound_close
,
swap
=
name
}
end
def
.
on_blast
=
function
(
pos
)
local
drops
=
{}
default
.
get_inventory_drops
(
pos
,
"main"
,
drops
)
drops
[
#
drops
+
1
]
=
"default:"
..
name
minetest
.
remove_node
(
pos
)
return
drops
end
end
def
.
on_metadata_inventory_move
=
function
(
pos
,
from_list
,
from_index
,
...
...
@@ -1990,13 +1997,6 @@ function default.register_chest(name, d)
" takes "
..
stack
:
get_name
()
..
" from chest at "
..
minetest
.
pos_to_string
(
pos
))
end
def
.
on_blast
=
function
(
pos
)
local
drops
=
{}
default
.
get_inventory_drops
(
pos
,
"main"
,
drops
)
drops
[
#
drops
+
1
]
=
"default:chest"
minetest
.
remove_node
(
pos
)
return
drops
end
local
def_opened
=
table
.
copy
(
def
)
local
def_closed
=
table
.
copy
(
def
)
...
...
@@ -2018,6 +2018,7 @@ function default.register_chest(name, d)
def_opened
.
can_dig
=
function
()
return
false
end
def_opened
.
on_blast
=
function
()
end
def_closed
.
mesh
=
nil
def_closed
.
drawtype
=
nil
...
...
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