-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsea_grass.lua
executable file
·88 lines (68 loc) · 2.46 KB
/
sea_grass.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
local S = aqua_farming.S
local step = 5
local light = 4
local del = 6
local chan = 10
local name = "aqua_farming:sea_grass"
local desc = S("Sea Grass")
local def = {
basenode = "default:sand",
nodename = name,
description = desc,
steps = step,
min_light = light,
delay = del,
chance = chan,
drop = {items = {
{items = {name .. "_item 1"}},
{items = {name .. "_seed 2"}},
{items = {name .. "_seed 3", rarity = 10}},
}, -- items
}, -- drop
} -- def
aqua_farming.register_plant(def)
minetest.register_craftitem(name .. "_item", {
description = desc,
groups = {food = 1, food_vegan = 1, seafood = 1},
inventory_image = "aqua_farming_" .. name:split(":")[2] .. "_item.png",
})
minetest.register_craftitem(name .. "_roasted_item", {
description = desc .. " (" .. S("dry") .. ")",
groups = {food = 1, food_vegan = 1},
inventory_image = "aqua_farming_" .. name:split(":")[2] .. "_roasted_item.png",
})
minetest.register_craftitem("aqua_farming:salt", {
description = S("Sea Salt"),
groups = {food = 1, food_vegan = 1, food_salt = 1},
inventory_image = "aqua_farming_salt.png",
})
minetest.register_craft({
type = "cooking",
cooktime = 10,
output = name .. "_roasted_item",
recipe = name .. "_item",
})
minetest.register_craft({
type = "shapeless",
output = "aqua_farming:salt",
recipe = {name .. "_roasted_item"},
replacements = {{name .. "_roasted_item", "dye:dark_green"}}
})
dofile(aqua_farming.modpath .. "/mapgen_" .. name:split(":")[2] .. ".lua")
if(minetest.get_modpath("signs_bot")) then
local fs = signs_bot.register_farming_plant
--local ts = signs_bot.register_tree_saplings
--local fs = signs_bot.register_farming_seed
--local fc = signs_bot.register_farming_crop
fs(name .. "_seed", name .. "_1", name .. "_" .. step)
--fc(name .. "_" .. step, name .. "_item", name .. "_seed")
end
--[[
if(signs_bot) then
local fs = signs_bot.register_farming_seed
local fc = signs_bot.register_farming_crop
fs(name .. "_seed", name .. "_1")
fc(name .. "_" .. step, name .. "_item", name .. "_seed")
end
]]--
aqua_farming.report(" module " .. name .. ".lua loaded.")