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
7a29d26e
Commit
7a29d26e
authored
8 years ago
by
Jean-Patrick Guerrero
Committed by
paramat
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fire: Allow placing only above flammable blocks
parent
7cba7af8
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/fire/init.lua
+10
-6
10 additions, 6 deletions
mods/fire/init.lua
with
10 additions
and
6 deletions
mods/fire/init.lua
+
10
−
6
View file @
7a29d26e
...
...
@@ -78,15 +78,19 @@ minetest.register_tool("fire:flint_and_steel", {
local
pt
=
pointed_thing
if
pt
.
type
==
"node"
and
minetest
.
get_node
(
pt
.
above
).
name
==
"air"
then
if
not
minetest
.
is_protected
(
pt
.
above
,
player_name
)
then
minetest
.
set_node
(
pt
.
above
,
{
name
=
"fire:basic_flame"
})
else
minetest
.
chat_send_player
(
player_name
,
"This area is protected"
)
itemstack
:
add_wear
(
1000
)
local
node_under
=
minetest
.
get_node
(
pt
.
under
).
name
if
minetest
.
get_node_group
(
node_under
,
"flammable"
)
>=
1
then
if
not
minetest
.
is_protected
(
pt
.
above
,
player_name
)
then
minetest
.
set_node
(
pt
.
above
,
{
name
=
"fire:basic_flame"
})
else
minetest
.
chat_send_player
(
player_name
,
"This area is protected"
)
end
end
end
if
not
minetest
.
setting_getbool
(
"creative_mode"
)
then
itemstack
:
add_wear
(
1000
)
return
itemstack
end
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