Differences From
Artifact [798314c789]:
10 10 a = strdrop(a)
11 11 b = strdrop(b)
12 12 return {
13 13 max_items = a.max_items + b.max_items;
14 14 items = lib.tbl.append(a.items, b.items);
15 15 }
16 16 end
17 +
18 +local function simpleDrop(rarity, what)
19 + return {
20 + max_items = 1;
21 + items = {
22 + {rarity = rarity, items = {what}};
23 + };
24 + };
25 +end
26 +
27 +local function biomeGrass(biomes, seed)
28 + return function(def)
29 + world.ecology.plants.link(def.id, {
30 + stages = {{
31 + tex = def.tex;
32 + drop = simpleDrop(4, 'starlit_eco:fiber');
33 + }};
34 + decoration = {
35 + deco_type = 'simple';
36 + place_on = 'starlit:greengraze';
37 + biomes = biomes;
38 + noise_params = {
39 + offset = def.ofs;
40 + spread = vector.new(10,10,10);
41 + seed = seed;
42 + octaves = 3;
43 + };
44 + }
45 + })
46 + end
47 +end
48 +
49 +do gg = biomeGrass({'starlit:steppe', 'starlit:forest'}, 0x5e8fa0)
50 + gg {
51 + id = 'starlit_eco:greengraze_low';
52 + name = 'Low Greengraze';
53 + tex = 'starlit-eco-plant-grass-sprig.png';
54 + ofs = -.3;
55 + }
56 + gg {
57 + id = 'starlit_eco:greengraze_high';
58 + name = 'High Greengraze';
59 + tex = 'starlit-eco-plant-grass-high.png';
60 + ofs = -.5;
61 + }
62 + gg {
63 + id = 'starlit_eco:greengraze_tall';
64 + name = 'Tall Greengraze';
65 + tex = 'starlit-eco-plant-grass-tall.png';
66 + ofs = -.7;
67 + }
68 +end
69 +
17 70 local function stalkPlant(def)
18 71 local function stage(s, drops, swap)
19 72 return {
20 - tex = lib.image(string.format('starlit-eco-plant-stalk%s.png',s)):shift(def.color);
73 + tex = lib.image(string.format('starlit-eco-plant-stalk%s.png',s)):colorize(def.color);
21 74 drop = drops;
22 75 swap = swap;
23 76 }
24 77 end
25 78 local function plantMatter(opts)
26 79 local dps = {
27 80 seed = def.seed;
................................................................................
64 117 name = def.name;
65 118 stages = stages;
66 119 decoration = def.decoration;
67 120 meshOpt = 3;
68 121 })
69 122 end
70 123
71 -local function simpleDrop(rarity, what)
72 - return {
73 - max_items = 1;
74 - items = {
75 - {rarity = rarity, items = {what}};
76 - };
77 - };
78 -end
79 124
80 125 function stalkPlantAuto(def)
81 126 local id = def.id
82 127 local id_berries = def.id .. '_berry'
83 128 local id_seed = def.id .. '_seed'
84 129
85 130 local p = lib.tbl.proto({}, def)
................................................................................
121 166 biolum = 5;
122 167 leaf = {
123 168 color = lib.color(.6, .8, .8);
124 169 drop = simpleDrop(2, 'starlit_eco:moondrop_petal');
125 170 };
126 171 berries = {
127 172 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";
128 - color = lib.color(1,0,.4);
173 + color = lib.color(.5,0,.1);
129 174 mass = 1;
130 175 impact = starlit.type.impact {
131 176 nutrition = 10;
132 177 hydration = 0.05;
133 178 taste = 1*60;
134 179 };
135 180 };
................................................................................
143 188 }
144 189
145 190 stalkPlantAuto {
146 191 id = 'starlit_eco:dustrose';
147 192 name = "Dust Rose";
148 193 fiber = simpleDrop(2, 'starlit_eco:fiber');
149 194 seed = {};
150 - color = lib.color(.3, .1, .2);
195 + color = lib.color(.9, .8, .3);
151 196 leaf = {
152 197 color = lib.color(.7, .4, .8);
153 198 drop = simpleDrop(2, 'starlit_eco:dustrose_petal');
154 199 };
155 200 decoration = {
156 201 place_on = 'starlit:greengraze';
157 202 fill_ratio = 0.03;