39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
..
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
...
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
base.groups.wood = 1
base.groups.log = 1
base.groups.falling_node = 1
local live = table.copy(base)
live.drop = id
live.groups.alive = 1
minetest.register_node(id, base)
minetest.register_node(id..'_live', live)
end
regLog('starlit_eco:lambent_pine_log', {
description = 'Lambent Pine Log';
drawtype = 'normal';
tiles = {
'starlit-eco-tree-lambent-pine-trunk-top.png';
................................................................................
starlit.item.seed.link('starlit_eco:lambent_pine_seed', {
name = 'Lambent Pine Seed';
tex = lib.image('starlit-eco-plant-seeds.png'):shift{hue=150, sat=-.5, lum=.8}:render();
grow = {kind = 'tree', id = 'starlit_eco:lambent_pine'};
})
minetest.register_node('starlit_eco:lambent_pine_bulb', {
description = 'Lambent Pine Bulb';
drawtype = 'nodebox';
connects_to = {'starlit_eco:lambent_pine_needles'};
node_box = {
type = 'connected';
connect_top = {
{-.1, .5, -.1,
................................................................................
groups = {plant=1, attached_node = 4};
tiles = {
'starlit-eco-tree-lambent-pine-bulb.png';
};
_starlit = woodProps{};
})
minetest.register_node('starlit_eco:lambent_pine_needles', {
description = 'Lambent Pine Needles';
groups = {plant = 1;};
drop = '';
tiles = {
'starlit-eco-tree-lambent-pine-needles.png';
'starlit-eco-tree-lambent-pine-needles.png';
};
................................................................................
tiles = {
'starlit-eco-tree-starblossom-trunk-top.png';
'starlit-eco-tree-starblossom-trunk.png';
};
_starlit = woodProps{};
})
minetest.register_node('starlit_eco:starblossom_leaves', {
description = 'Starblossom Leaves';
groups = {plant = 1;};
drop = '';
tiles = {
'starlit-eco-tree-starblossom-leaves.png';
'starlit-eco-tree-starblossom-leaves.png';
};
_starlit = leafProps{};
});
minetest.register_node('starlit_eco:starblossom_leaves_shine', {
description = 'Shining Starblossom Leaves';
groups = {plant = 1;};
drop = '';
paramtype = 'light';
light_source = 4;
tiles = {
'starlit-eco-tree-starblossom-leaves.png';
................................................................................
fill_ratio = 0.001;
y_min = 0, y_max = 512;
};
};
};
}
minetest.register_abm {
label = "lambent pine fruiting";
nodenames = {'starlit_eco:lambent_pine_needles'};
neighbors = {'starlit_eco:lambent_pine_log_live'};
chance = 40;
interval = 80;
catch_up = true;
action = function(pos, node)
local po = pos:offset(0,-1,0)
if minetest.get_node(po).name == "air" then
minetest.add_node(po, {name='starlit_eco:lambent_pine_bulb'})
end
end;
}
|
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
..
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
...
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
base.groups.wood = 1
base.groups.log = 1
base.groups.falling_node = 1
local live = table.copy(base)
live.drop = id
live.groups.alive = 1
core.register_node(id, base)
core.register_node(id..'_live', live)
end
regLog('starlit_eco:lambent_pine_log', {
description = 'Lambent Pine Log';
drawtype = 'normal';
tiles = {
'starlit-eco-tree-lambent-pine-trunk-top.png';
................................................................................
starlit.item.seed.link('starlit_eco:lambent_pine_seed', {
name = 'Lambent Pine Seed';
tex = lib.image('starlit-eco-plant-seeds.png'):shift{hue=150, sat=-.5, lum=.8}:render();
grow = {kind = 'tree', id = 'starlit_eco:lambent_pine'};
})
core.register_node('starlit_eco:lambent_pine_bulb', {
description = 'Lambent Pine Bulb';
drawtype = 'nodebox';
connects_to = {'starlit_eco:lambent_pine_needles'};
node_box = {
type = 'connected';
connect_top = {
{-.1, .5, -.1,
................................................................................
groups = {plant=1, attached_node = 4};
tiles = {
'starlit-eco-tree-lambent-pine-bulb.png';
};
_starlit = woodProps{};
})
core.register_node('starlit_eco:lambent_pine_needles', {
description = 'Lambent Pine Needles';
groups = {plant = 1;};
drop = '';
tiles = {
'starlit-eco-tree-lambent-pine-needles.png';
'starlit-eco-tree-lambent-pine-needles.png';
};
................................................................................
tiles = {
'starlit-eco-tree-starblossom-trunk-top.png';
'starlit-eco-tree-starblossom-trunk.png';
};
_starlit = woodProps{};
})
core.register_node('starlit_eco:starblossom_leaves', {
description = 'Starblossom Leaves';
groups = {plant = 1;};
drop = '';
tiles = {
'starlit-eco-tree-starblossom-leaves.png';
'starlit-eco-tree-starblossom-leaves.png';
};
_starlit = leafProps{};
});
core.register_node('starlit_eco:starblossom_leaves_shine', {
description = 'Shining Starblossom Leaves';
groups = {plant = 1;};
drop = '';
paramtype = 'light';
light_source = 4;
tiles = {
'starlit-eco-tree-starblossom-leaves.png';
................................................................................
fill_ratio = 0.001;
y_min = 0, y_max = 512;
};
};
};
}
core.register_abm {
label = "lambent pine fruiting";
nodenames = {'starlit_eco:lambent_pine_needles'};
neighbors = {'starlit_eco:lambent_pine_log_live'};
chance = 40;
interval = 80;
catch_up = true;
action = function(pos, node)
local po = pos:offset(0,-1,0)
if core.get_node(po).name == "air" then
core.add_node(po, {name='starlit_eco:lambent_pine_bulb'})
end
end;
}
|