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
44dc6110
Commit
44dc6110
authored
10 years ago
by
ShadowNinja
Browse files
Options
Downloads
Patches
Plain Diff
Fix farming unloaded node crash
parent
49a8ddc8
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/farming/api.lua
+3
-0
3 additions, 0 deletions
mods/farming/api.lua
with
3 additions
and
0 deletions
mods/farming/api.lua
+
3
−
0
View file @
44dc6110
...
...
@@ -241,6 +241,9 @@ farming.register_plant = function(name, def)
if
minetest
.
get_item_group
(
node
.
name
,
"seed"
)
and
node_def
.
fertility
then
local
can_grow
=
false
local
soil_node
=
minetest
.
get_node_or_nil
({
x
=
pos
.
x
,
y
=
pos
.
y
-
1
,
z
=
pos
.
z
})
if
not
soil_node
then
return
end
for
_
,
v
in
pairs
(
node_def
.
fertility
)
do
if
minetest
.
get_item_group
(
soil_node
.
name
,
v
)
~=
0
then
can_grow
=
true
...
...
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