10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
..
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
...
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
a = strdrop(a)
b = strdrop(b)
return {
max_items = a.max_items + b.max_items;
items = lib.tbl.append(a.items, b.items);
}
end
local function stalkPlant(def)
local function stage(s, drops, swap)
return {
tex = lib.image(string.format('starlit-eco-plant-stalk%s.png',s)):shift(def.color);
drop = drops;
swap = swap;
}
end
local function plantMatter(opts)
local dps = {
seed = def.seed;
................................................................................
name = def.name;
stages = stages;
decoration = def.decoration;
meshOpt = 3;
})
end
local function simpleDrop(rarity, what)
return {
max_items = 1;
items = {
{rarity = rarity, items = {what}};
};
};
end
function stalkPlantAuto(def)
local id = def.id
local id_berries = def.id .. '_berry'
local id_seed = def.id .. '_seed'
local p = lib.tbl.proto({}, def)
................................................................................
biolum = 5;
leaf = {
color = lib.color(.6, .8, .8);
drop = simpleDrop(2, 'starlit_eco:moondrop_petal');
};
berries = {
desc = "The fruits of the moondrop are not very nutritious, but their peculiar sweet-sour flavor profile makes them one of Farthest Shadow's great delicacies";
color = lib.color(1,0,.4);
mass = 1;
impact = starlit.type.impact {
nutrition = 10;
hydration = 0.05;
taste = 1*60;
};
};
................................................................................
}
stalkPlantAuto {
id = 'starlit_eco:dustrose';
name = "Dust Rose";
fiber = simpleDrop(2, 'starlit_eco:fiber');
seed = {};
color = lib.color(.3, .1, .2);
leaf = {
color = lib.color(.7, .4, .8);
drop = simpleDrop(2, 'starlit_eco:dustrose_petal');
};
decoration = {
place_on = 'starlit:greengraze';
fill_ratio = 0.03;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
<
<
<
<
<
<
<
<
|
|
|
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
...
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
...
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
a = strdrop(a)
b = strdrop(b)
return {
max_items = a.max_items + b.max_items;
items = lib.tbl.append(a.items, b.items);
}
end
local function simpleDrop(rarity, what)
return {
max_items = 1;
items = {
{rarity = rarity, items = {what}};
};
};
end
local function biomeGrass(biomes, seed)
return function(def)
world.ecology.plants.link(def.id, {
stages = {{
tex = def.tex;
drop = simpleDrop(4, 'starlit_eco:fiber');
}};
decoration = {
deco_type = 'simple';
place_on = 'starlit:greengraze';
biomes = biomes;
noise_params = {
offset = def.ofs;
spread = vector.new(10,10,10);
seed = seed;
octaves = 3;
};
}
})
end
end
do gg = biomeGrass({'starlit:steppe', 'starlit:forest'}, 0x5e8fa0)
gg {
id = 'starlit_eco:greengraze_low';
name = 'Low Greengraze';
tex = 'starlit-eco-plant-grass-sprig.png';
ofs = -.3;
}
gg {
id = 'starlit_eco:greengraze_high';
name = 'High Greengraze';
tex = 'starlit-eco-plant-grass-high.png';
ofs = -.5;
}
gg {
id = 'starlit_eco:greengraze_tall';
name = 'Tall Greengraze';
tex = 'starlit-eco-plant-grass-tall.png';
ofs = -.7;
}
end
local function stalkPlant(def)
local function stage(s, drops, swap)
return {
tex = lib.image(string.format('starlit-eco-plant-stalk%s.png',s)):colorize(def.color);
drop = drops;
swap = swap;
}
end
local function plantMatter(opts)
local dps = {
seed = def.seed;
................................................................................
name = def.name;
stages = stages;
decoration = def.decoration;
meshOpt = 3;
})
end
function stalkPlantAuto(def)
local id = def.id
local id_berries = def.id .. '_berry'
local id_seed = def.id .. '_seed'
local p = lib.tbl.proto({}, def)
................................................................................
biolum = 5;
leaf = {
color = lib.color(.6, .8, .8);
drop = simpleDrop(2, 'starlit_eco:moondrop_petal');
};
berries = {
desc = "The fruits of the moondrop are not very nutritious, but their peculiar sweet-sour flavor profile makes them one of Farthest Shadow's great delicacies";
color = lib.color(.5,0,.1);
mass = 1;
impact = starlit.type.impact {
nutrition = 10;
hydration = 0.05;
taste = 1*60;
};
};
................................................................................
}
stalkPlantAuto {
id = 'starlit_eco:dustrose';
name = "Dust Rose";
fiber = simpleDrop(2, 'starlit_eco:fiber');
seed = {};
color = lib.color(.9, .8, .3);
leaf = {
color = lib.color(.7, .4, .8);
drop = simpleDrop(2, 'starlit_eco:dustrose_petal');
};
decoration = {
place_on = 'starlit:greengraze';
fill_ratio = 0.03;
|