starlit  Diff

Differences From Artifact [e1d816e7a5]:

To Artifact [18098e5201]:


1
2







3
4
5
6
7
8
9
..
32
33
34
35
36
37
38

39
40
41
42
43
44
45
..
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
..
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
...
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
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
149
150

151
152
153
154
155
156
157
158
159
160

161
162
163
164
165
166
167
local T = starlit.translator
local lib = starlit.mod.lib








starlit.terrain = {}
local soilSounds = {
	footstep = 'default-dirt-footstep';
	dug = 'default-dug-node';
}
local sandSounds = {
................................................................................
	tiles = {'starlit-terrain-soil.png'};
	groups = {looseClump = 2, soil = 1};
	drop = soilDrop;
	sounds = soilSounds;
	_starlit = {
		kind = 'block';
		elements = {};

	};
})


minetest.register_node('starlit:sand', {
	description = T 'Sand';
	tiles = {'starlit-terrain-sand.png'};
................................................................................
	description = T 'Lifesilt';
	tiles = {'starlit-terrain-lifesilt.png'};
	groups = {looseClump = 1, lifesilt = 1, falling_node = 1};
	drop = '';
	sounds = sandSounds;
	_starlit = {
		kind = 'block';
		fab = starlit.type.fab { element = { carbon = 8, silicon = 4 } };
	};
})

minetest.register_craftitem('starlit:soil_clump', {
	short_description = T 'Soil';
	description = starlit.ui.tooltip {
		title = T 'Soil';
................................................................................
		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 = {
		fab = starlit.type.fab { element = { carbon = 12 / 4 } };
	};
})

function starlit.terrain.createGrass(def)
	local drop = {
		max_items = 4;
		items = {
................................................................................
				tileable_vertical = false;
			};
		};
		groups = {looseClump = 2, grass = 1, soil = 1, sub_walk = 1};
		drop = soilDrop;
		sounds = grassSounds;
		_starlit = {
			fab = def.fab;
			recover = def.recover;
			recover_vary = def.recover_vary;
		};
	})
end


starlit.terrain.createGrass {
	name = 'starlit:greengraze';
	desc = T 'Greengraze';
	img = 'starlit-terrain-greengraze';
	fab = starlit.type.fab {
		element = { carbon = 12; };
		time = { shred = 2.5; };
	};
}

starlit.terrain.createGrass {
	name = 'starlit:undergloam';
	desc = T 'Undergloam';
	-- fungal carpet
	img = 'starlit-terrain-undergloam';
	fab = starlit.type.fab {
		element = {
			carbon = 12;
		};
		time = { shred = 2.5; };
	};
}

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";

				backface_culling = false;
				animation = {
					type = "vertical_frames";
					aspect_w = 16;
					aspect_h = 16;
					length = 2.0;
				};
			};
			{
				name = "default_water_source_animated.png";

				backface_culling = true;
				animation = {
					type = "vertical_frames";
					aspect_w = 16;
					aspect_h = 16;
					length = 2.0;
				};


>
>
>
>
>
>
>







 







>







 







|







 







|







 







<











|
<
<
<







|
<
<
<
<
<









|
>









|
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
..
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
..
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
..
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
...
113
114
115
116
117
118
119

120
121
122
123
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
local T = starlit.translator
local lib = starlit.mod.lib

local soilRec = starlit.type.fab {
	element = {
		carbon = 25;
	};
	time = { shred = 2.5; };
};

starlit.terrain = {}
local soilSounds = {
	footstep = 'default-dirt-footstep';
	dug = 'default-dug-node';
}
local sandSounds = {
................................................................................
	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'};
................................................................................
	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';
................................................................................
		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 } };
	};
})

function starlit.terrain.createGrass(def)
	local drop = {
		max_items = 4;
		items = {
................................................................................
				tileable_vertical = false;
			};
		};
		groups = {looseClump = 2, grass = 1, soil = 1, sub_walk = 1};
		drop = soilDrop;
		sounds = grassSounds;
		_starlit = {

			recover = def.recover;
			recover_vary = def.recover_vary;
		};
	})
end


starlit.terrain.createGrass {
	name = 'starlit:greengraze';
	desc = T 'Greengraze';
	img = 'starlit-terrain-greengraze';
	recover = soilRec;



}

starlit.terrain.createGrass {
	name = 'starlit:undergloam';
	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";
				backface_culling = false;
				animation = {
					type = "vertical_frames";
					aspect_w = 16;
					aspect_h = 16;
					length = 2.0;
				};
			};
			{
-- 				name = "default_water_source_animated.png";
				name = "starlit-water.png";
				backface_culling = true;
				animation = {
					type = "vertical_frames";
					aspect_w = 16;
					aspect_h = 16;
					length = 2.0;
				};