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
Snippets
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
Zadrog Pzvotrügen
minetest_game
Commits
22dd46dc
Commit
22dd46dc
authored
10 years ago
by
PilzAdam
Browse files
Options
Downloads
Patches
Plain Diff
Dont dry out soil if unloaded blocks are nearby
parent
20f938e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mods/farming/nodes.lua
+13
-9
13 additions, 9 deletions
mods/farming/nodes.lua
with
13 additions
and
9 deletions
mods/farming/nodes.lua
+
13
−
9
View file @
22dd46dc
...
...
@@ -113,16 +113,20 @@ minetest.register_abm({
minetest
.
set_node
(
pos
,
{
name
=
wet
})
end
else
-- turn it back into base if it is already dry
if
wet_lvl
==
0
then
-- only turn it back if there is no plant/seed on top of it
if
minetest
.
get_item_group
(
nn
.
name
,
"plant"
)
==
0
and
minetest
.
get_item_group
(
nn
.
name
,
"seed"
)
==
0
then
minetest
.
set_node
(
pos
,
{
name
=
base
})
-- only turn back if there are no unloaded blocks (and therefore
-- possible water sources) nearby
if
not
minetest
.
find_node_near
(
pos
,
3
,
{
"ignore"
})
then
-- turn it back into base if it is already dry
if
wet_lvl
==
0
then
-- only turn it back if there is no plant/seed on top of it
if
minetest
.
get_item_group
(
nn
.
name
,
"plant"
)
==
0
and
minetest
.
get_item_group
(
nn
.
name
,
"seed"
)
==
0
then
minetest
.
set_node
(
pos
,
{
name
=
base
})
end
-- if its wet turn it back into dry soil
elseif
wet_lvl
==
1
then
minetest
.
set_node
(
pos
,
{
name
=
dry
})
end
-- if its wet turn it back into dry soil
elseif
wet_lvl
==
1
then
minetest
.
set_node
(
pos
,
{
name
=
dry
})
end
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