-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathalga.lua
executable file
·53 lines (39 loc) · 1.52 KB
/
alga.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
local S = aqua_farming.S
local step = 6
local light = 10
local del = 10
local chan = 10
local name = "aqua_farming:alga"
local desc = S("Green Alga")
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 .. "_item 2", 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",
on_use = minetest.item_eat(1),
})
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
aqua_farming.report(" module " .. name .. ".lua loaded.")