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
b06368ad
Commit
b06368ad
authored
8 years ago
by
rubenwardy
Browse files
Options
Downloads
Patches
Plain Diff
Fix node drops not being added to inventory when not in creative mode
parent
1dd9fdb5
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
mods/creative/init.lua
+5
-2
5 additions, 2 deletions
mods/creative/init.lua
with
5 additions
and
2 deletions
mods/creative/init.lua
+
5
−
2
View file @
b06368ad
...
...
@@ -42,11 +42,14 @@ minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack
end
)
-- Don't pick up if the item is already in the inventory
local
old_handle_node_drops
=
minetest
.
handle_node_drops
function
minetest
.
handle_node_drops
(
pos
,
drops
,
digger
)
if
not
digger
or
not
digger
:
is_player
()
or
not
creative
.
is_enabled_for
(
digger
:
get_player_name
())
then
if
not
digger
or
not
digger
:
is_player
()
then
return
end
if
not
creative
.
is_enabled_for
(
digger
:
get_player_name
())
then
return
old_handle_node_drops
(
pos
,
drops
,
digger
)
end
local
inv
=
digger
:
get_inventory
()
if
inv
then
for
_
,
item
in
ipairs
(
drops
)
do
...
...
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