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
5dcc5cb3
Commit
5dcc5cb3
authored
11 years ago
by
ShadowNinja
Browse files
Options
Downloads
Patches
Plain Diff
Allow changing screwdriver mode when pointing at a protected node
parent
4ea001fa
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/screwdriver/init.lua
+4
-4
4 additions, 4 deletions
mods/screwdriver/init.lua
with
4 additions
and
4 deletions
mods/screwdriver/init.lua
+
4
−
4
View file @
5dcc5cb3
...
...
@@ -60,16 +60,16 @@ local function screwdriver_handler(itemstack, user, pointed_thing)
return
end
local
pos
=
pointed_thing
.
under
if
minetest
.
is_protected
(
pos
,
user
:
get_player_name
())
then
minetest
.
record_protection_violation
(
pos
,
user
:
get_player_name
())
return
end
local
keys
=
user
:
get_player_control
()
local
player_name
=
user
:
get_player_name
()
local
mode
=
tonumber
(
itemstack
:
get_metadata
())
if
not
mode
or
keys
[
"sneak"
]
==
true
then
return
screwdriver_setmode
(
user
,
itemstack
)
end
if
minetest
.
is_protected
(
pos
,
user
:
get_player_name
())
then
minetest
.
record_protection_violation
(
pos
,
user
:
get_player_name
())
return
end
local
node
=
minetest
.
get_node
(
pos
)
local
node_name
=
node
.
name
local
ndef
=
minetest
.
registered_nodes
[
node
.
name
]
...
...
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