local lib = starlit.mod.lib
local B = starlit.mod.building
B.stage.link('starlit_building:stage_foundation', {
	tex = {
		'starlit-node-concrete.png';
	};
	begin = {
		part = {
			'starlit_building:concrete';
		};
	};
	build = {
		part = {
			['starlit_building:insulation'] = 'starlit_building:stage_foundation_insulation';
		};
	};
	box = {
		type = 'fixed';
		fixed = {
			-.5, -.5,         -.5;
			 .5, -.5 + (2/16), .5;
		};
	};
})

B.stage.link('starlit_building:stage_foundation_insulation', {
	tex = {
		'starlit-node-insulation-top.png';
		'starlit-node-concrete.png';
		'starlit-node-floor-panel-side.png';
	};
	build = {
		part = {
			['starlit_building:insulation'] = 'starlit_building:stage_foundation_insulation_x2';
			['starlit_building:cable_electric'] = 'starlit_building:stage_foundation_insulation_conduit';
		};
	};
	box = {
		type = 'fixed';
		fixed = {
			-.5, -.5,         -.5;
			 .5, -.5 + (6/16), .5;
		};
	};
})

B.stage.link('starlit_building:stage_foundation_insulation_x2', {
	tex = {
		'starlit-node-insulation-top.png';
		'starlit-node-concrete.png';
		'starlit-node-floor-panel-side.png';
	};
	build = {
		part = {
			['starlit_building:panel'] = 'starlit_building:floor';
		};
	};
	box = {
		type = 'fixed';
		fixed = {
			-.5, -.5,         -.5;
			 .5, -.5 + (14/16), .5;
		};
	};
})

B.stage.link('starlit_building:stage_foundation_insulation_conduit', {
	tex = {
		'starlit-node-insulation-cable-top.png';
		'starlit-node-concrete.png';
		'starlit-node-floor-panel-side-conduit.png';
	};
	groups = {
		conduit = 1;
	};
	build = {
		part = {
			['starlit_building:insulation'] = 'starlit_building:stage_foundation_insulated_conduit';
		};
	};
	box = {
		type = 'fixed';
		fixed = {
			-.5, -.5,         -.5;
			 .5, -.5 + (8/16), .5;
		};
	};
})

B.stage.link('starlit_building:stage_foundation_insulated_conduit', {
	tex = {
		'starlit-node-insulation-top.png';
		'starlit-node-concrete.png';
		'starlit-node-floor-panel-side-conduit.png';
	};
	build = {
		part = {
			['starlit_building:panel'] = 'starlit_building:conduit';
		};
	};
	groups = {
		conduit = 1;
	};
	box = {
		type = 'fixed';
		fixed = {
			-.5, -.5,         -.5;
			 .5, -.5 + (14/16), .5;
		};
	};
})

B.stage.link('starlit_building:conduit', {
	tex = {
		'starlit-node-floor-panel-top.png';
		'starlit-node-concrete.png';
		'starlit-node-floor-panel-side-conduit.png';
	};
	groups = {
		conduit = 1;
	};
})

B.stage.link('starlit_building:floor', {
	tex = {
		'starlit-node-floor-panel-top.png';
		'starlit-node-concrete.png';
		'starlit-node-floor-panel-side.png';
	};
})