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
89
90
91
92
93
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
...
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
...
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
...
303
304
305
306
307
308
309
310
311
312
313
|
max_items = 3;
items = {
{rarity = 2, items = {'starlit:soil_clump'}};
{rarity = 3, items = {'starlit:soil_clump'}};
{rarity = 4, items = {'starlit:soil_clump'}};
};
}
minetest.register_node('starlit:soil', {
description = T 'Soil';
tiles = {'starlit-terrain-soil.png'};
groups = {looseClump = 2, soil = 1};
drop = soilDrop;
sounds = soilSounds;
_starlit = {
kind = 'block';
elements = {};
recover = soilRec;
};
})
minetest.register_node('starlit:sand', {
description = T 'Sand';
tiles = {'starlit-terrain-sand.png'};
groups = {looseClump = 1, sand = 1, falling_node = 1};
drop = '';
sounds = sandSounds;
_starlit = {
kind = 'block';
fab = starlit.type.fab { element = { silicon = 25 } };
};
})
minetest.register_node('starlit:lifesilt', {
description = T 'Lifesilt';
tiles = {'starlit-terrain-lifesilt.png'};
groups = {looseClump = 1, lifesilt = 1, falling_node = 1};
drop = '';
sounds = sandSounds;
_starlit = {
kind = 'block';
recover = starlit.type.fab { element = { carbon = 16, silicon = 16, rubidium = 4 } };
};
})
minetest.register_craftitem('starlit:soil_clump', {
short_description = T 'Soil';
description = starlit.ui.tooltip {
title = T 'Soil';
desc = 'A handful of nutrient-packed soil, suitable for growing plants';
color = lib.color(0.3,0.2,0.1);
};
inventory_image = 'starlit-item-soil.png';
groups = {looseClump = 2, soil = 1};
on_place = function(me, luser, point)
if me:get_count() < 3 then return end
if minetest.place_node(point.above, {name = 'starlit:soil'}, luser) then
me:take_item(3)
end
return me
end;
_starlit = {
recover = starlit.type.fab { element = { carbon = 25 / 4 } };
};
................................................................................
items = {
{
items = {'starlit:soil'}, rarity = 2;
tool_groups = { 'shovel', 'trowel' };
};
};
}
minetest.register_node(def.name, {
description = T 'Greengraze';
tiles = {
def.img .. '.png';
'starlit-terrain-soil.png';
{
name = 'starlit-terrain-soil.png^' .. def.img ..'-overlay.png';
tileable_vertical = false;
................................................................................
desc = T 'Undergloam';
-- fungal carpet
img = 'starlit-terrain-undergloam';
recover = soilRec;
}
for _, w in pairs {false,true} do
minetest.register_node('starlit:liquid_water' .. (w and '_flowing' or ''), {
description = T 'Water';
drawtype = 'liquid';
waving = 3;
tiles = {
{
-- name = "default_water_source_animated.png";
name = "starlit-water.png";
................................................................................
groups = {water = 3, liquid = 3};
});
end
starlit.world.mineral.foreach('starlit:mineral-generate', {}, function(node,m)
local grp = {mineral = 1}
minetest.register_node(node, {
short_description = m.name;
description = starlit.ui.tooltip {
title = m.name;
desc = m.desc;
color = m.tone;
};
tiles = m.tiles or
................................................................................
})
if not m.excludeOre then
local seed = 0
-- grp.ore = 1
for i = 1, #m.name do
seed = seed*50 + string.byte(m.name, i)
end
minetest.register_ore {
ore = node;
ore_type = m.dist.kind;
wherein = m.dist.among;
clust_scarcity = m.dist.rare;
clust_num_ores = m.dist.ores;
clust_size = m.dist.clust;
y_min = m.dist.height[1], y_max = m.dist.height[2];
................................................................................
time = { shred = 3; };
cost = { shredPower = 3; };
};
})
-- map generation
minetest.register_alias('mapgen_stone', 'starlit:mineral_feldspar')
minetest.register_alias('mapgen_water_source', 'starlit:liquid_water')
minetest.register_alias('mapgen_river_water_source', 'starlit:liquid_water')
|
|
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
89
90
91
92
93
..
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
...
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
...
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
...
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
...
303
304
305
306
307
308
309
310
311
312
313
|
max_items = 3;
items = {
{rarity = 2, items = {'starlit:soil_clump'}};
{rarity = 3, items = {'starlit:soil_clump'}};
{rarity = 4, items = {'starlit:soil_clump'}};
};
}
core.register_node('starlit:soil', {
description = T 'Soil';
tiles = {'starlit-terrain-soil.png'};
groups = {looseClump = 2, soil = 1};
drop = soilDrop;
sounds = soilSounds;
_starlit = {
kind = 'block';
elements = {};
recover = soilRec;
};
})
core.register_node('starlit:sand', {
description = T 'Sand';
tiles = {'starlit-terrain-sand.png'};
groups = {looseClump = 1, sand = 1, falling_node = 1};
drop = '';
sounds = sandSounds;
_starlit = {
kind = 'block';
fab = starlit.type.fab { element = { silicon = 25 } };
};
})
core.register_node('starlit:lifesilt', {
description = T 'Lifesilt';
tiles = {'starlit-terrain-lifesilt.png'};
groups = {looseClump = 1, lifesilt = 1, falling_node = 1};
drop = '';
sounds = sandSounds;
_starlit = {
kind = 'block';
recover = starlit.type.fab { element = { carbon = 16, silicon = 16, rubidium = 4 } };
};
})
core.register_craftitem('starlit:soil_clump', {
short_description = T 'Soil';
description = starlit.ui.tooltip {
title = T 'Soil';
desc = 'A handful of nutrient-packed soil, suitable for growing plants';
color = lib.color(0.3,0.2,0.1);
};
inventory_image = 'starlit-item-soil.png';
groups = {looseClump = 2, soil = 1};
on_place = function(me, luser, point)
if me:get_count() < 3 then return end
if core.place_node(point.above, {name = 'starlit:soil'}, luser) then
me:take_item(3)
end
return me
end;
_starlit = {
recover = starlit.type.fab { element = { carbon = 25 / 4 } };
};
................................................................................
items = {
{
items = {'starlit:soil'}, rarity = 2;
tool_groups = { 'shovel', 'trowel' };
};
};
}
core.register_node(def.name, {
description = T 'Greengraze';
tiles = {
def.img .. '.png';
'starlit-terrain-soil.png';
{
name = 'starlit-terrain-soil.png^' .. def.img ..'-overlay.png';
tileable_vertical = false;
................................................................................
desc = T 'Undergloam';
-- fungal carpet
img = 'starlit-terrain-undergloam';
recover = soilRec;
}
for _, w in pairs {false,true} do
core.register_node('starlit:liquid_water' .. (w and '_flowing' or ''), {
description = T 'Water';
drawtype = 'liquid';
waving = 3;
tiles = {
{
-- name = "default_water_source_animated.png";
name = "starlit-water.png";
................................................................................
groups = {water = 3, liquid = 3};
});
end
starlit.world.mineral.foreach('starlit:mineral-generate', {}, function(node,m)
local grp = {mineral = 1}
core.register_node(node, {
short_description = m.name;
description = starlit.ui.tooltip {
title = m.name;
desc = m.desc;
color = m.tone;
};
tiles = m.tiles or
................................................................................
})
if not m.excludeOre then
local seed = 0
-- grp.ore = 1
for i = 1, #m.name do
seed = seed*50 + string.byte(m.name, i)
end
core.register_ore {
ore = node;
ore_type = m.dist.kind;
wherein = m.dist.among;
clust_scarcity = m.dist.rare;
clust_num_ores = m.dist.ores;
clust_size = m.dist.clust;
y_min = m.dist.height[1], y_max = m.dist.height[2];
................................................................................
time = { shred = 3; };
cost = { shredPower = 3; };
};
})
-- map generation
core.register_alias('mapgen_stone', 'starlit:mineral_feldspar')
core.register_alias('mapgen_water_source', 'starlit:liquid_water')
core.register_alias('mapgen_river_water_source', 'starlit:liquid_water')
|