Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
farming
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
farming
Commits
38b41118
Commit
38b41118
authored
8 years ago
by
TenPlus1
Browse files
Options
Downloads
Patches
Plain Diff
Tweaked code slightly
parent
cbf7bee9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cotton.lua
+7
-0
7 additions, 0 deletions
cotton.lua
init.lua
+30
-34
30 additions, 34 deletions
init.lua
with
37 additions
and
34 deletions
cotton.lua
+
7
−
0
View file @
38b41118
...
...
@@ -114,3 +114,10 @@ crop_def.drop = {
}
}
minetest
.
register_node
(
"farming:cotton_8"
,
table
.
copy
(
crop_def
))
--[[ Cotton (example, is already registered in cotton.lua)
farming.register_plant("farming:cotton", {
description = "Cotton seed",
inventory_image = "farming_cotton_seed.png",
steps = 8,
})]]
This diff is collapsed.
Click to expand it.
init.lua
+
30
−
34
View file @
38b41118
--[[
Minetest Farming Redo Mod 1.22 (
30
th
May
2016)
Minetest Farming Redo Mod 1.22 (
4
th
June
2016)
by TenPlus1
NEW growing routine by prestidigitator
auto-refill by crabman77
...
...
@@ -50,6 +50,7 @@ end
local
statistics
=
dofile
(
farming
.
path
..
"/statistics.lua"
)
-- Intllib
local
S
if
minetest
.
get_modpath
(
"intllib"
)
then
S
=
intllib
.
Getter
()
...
...
@@ -58,31 +59,6 @@ else
end
farming
.
intllib
=
S
dofile
(
farming
.
path
..
"/soil.lua"
)
dofile
(
farming
.
path
..
"/hoes.lua"
)
dofile
(
farming
.
path
..
"/grass.lua"
)
dofile
(
farming
.
path
..
"/wheat.lua"
)
dofile
(
farming
.
path
..
"/cotton.lua"
)
dofile
(
farming
.
path
..
"/carrot.lua"
)
dofile
(
farming
.
path
..
"/potato.lua"
)
dofile
(
farming
.
path
..
"/tomato.lua"
)
dofile
(
farming
.
path
..
"/cucumber.lua"
)
dofile
(
farming
.
path
..
"/corn.lua"
)
dofile
(
farming
.
path
..
"/coffee.lua"
)
dofile
(
farming
.
path
..
"/melon.lua"
)
dofile
(
farming
.
path
..
"/sugar.lua"
)
dofile
(
farming
.
path
..
"/pumpkin.lua"
)
dofile
(
farming
.
path
..
"/cocoa.lua"
)
dofile
(
farming
.
path
..
"/raspberry.lua"
)
dofile
(
farming
.
path
..
"/blueberry.lua"
)
dofile
(
farming
.
path
..
"/rhubarb.lua"
)
dofile
(
farming
.
path
..
"/beanpole.lua"
)
dofile
(
farming
.
path
..
"/grapes.lua"
)
dofile
(
farming
.
path
..
"/barley.lua"
)
dofile
(
farming
.
path
..
"/donut.lua"
)
dofile
(
farming
.
path
..
"/mapgen.lua"
)
dofile
(
farming
.
path
..
"/compatibility.lua"
)
-- Farming Plus compatibility
-- Utility Functions
local
time_speed
=
tonumber
(
minetest
.
setting_get
(
"time_speed"
))
or
72
...
...
@@ -673,7 +649,7 @@ farming.register_plant = function(name, def)
-- Last step doesn't need growing=1 so Abm never has to check these
if
i
==
def
.
steps
then
g
=
{
snappy
=
3
,
flammable
=
2
,
plant
=
1
,
not_in_creative_inventory
=
1
,
attached_node
=
1
}
g
.
growing
=
0
end
local
node_name
=
mname
..
":"
..
pname
..
"_"
..
i
...
...
@@ -691,7 +667,7 @@ farming.register_plant = function(name, def)
sounds
=
default
.
node_sound_leaves_defaults
(),
})
register_plant_node
(
node_name
)
--
register_plant_node(node_name)
end
-- Return info
...
...
@@ -699,9 +675,29 @@ farming.register_plant = function(name, def)
return
r
end
--[[ Cotton (example, is already registered in cotton.lua)
farming.register_plant("farming:cotton", {
description = "Cotton2 seed",
inventory_image = "farming_cotton_seed.png",
steps = 8,
})]]
-- load crops
dofile
(
farming
.
path
..
"/soil.lua"
)
dofile
(
farming
.
path
..
"/hoes.lua"
)
dofile
(
farming
.
path
..
"/grass.lua"
)
dofile
(
farming
.
path
..
"/wheat.lua"
)
dofile
(
farming
.
path
..
"/cotton.lua"
)
dofile
(
farming
.
path
..
"/carrot.lua"
)
dofile
(
farming
.
path
..
"/potato.lua"
)
dofile
(
farming
.
path
..
"/tomato.lua"
)
dofile
(
farming
.
path
..
"/cucumber.lua"
)
dofile
(
farming
.
path
..
"/corn.lua"
)
dofile
(
farming
.
path
..
"/coffee.lua"
)
dofile
(
farming
.
path
..
"/melon.lua"
)
dofile
(
farming
.
path
..
"/sugar.lua"
)
dofile
(
farming
.
path
..
"/pumpkin.lua"
)
dofile
(
farming
.
path
..
"/cocoa.lua"
)
dofile
(
farming
.
path
..
"/raspberry.lua"
)
dofile
(
farming
.
path
..
"/blueberry.lua"
)
dofile
(
farming
.
path
..
"/rhubarb.lua"
)
dofile
(
farming
.
path
..
"/beanpole.lua"
)
dofile
(
farming
.
path
..
"/grapes.lua"
)
dofile
(
farming
.
path
..
"/barley.lua"
)
dofile
(
farming
.
path
..
"/donut.lua"
)
dofile
(
farming
.
path
..
"/mapgen.lua"
)
dofile
(
farming
.
path
..
"/compatibility.lua"
)
-- Farming Plus compatibility
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