starlit  Diff

Differences From Artifact [c6afb91b3d]:

To Artifact [cc61bb3736]:


   172    172   	if not B.path[from] then return nil end
   173    173   	return B.path[from][kind][what]
   174    174   end
   175    175   
   176    176   B.stage.foreach('starlit:stageGen', {}, function(id, e)
   177    177   	local grp = e.groups and table.copy(e.groups) or {}
   178    178   	grp.stage = 1
          179  +	local meta = {
          180  +		stage = id;
          181  +		recover = e.recover;
          182  +	}
          183  +	for k,v in pairs(e.meta or {}) do meta[k] = v end
   179    184   	minetest.register_node(id, {
   180    185   		description = 'Construction';
   181    186   		drawtype = (e.box  and 'nodebox')
   182    187   		        or (e.mesh and 'mesh')
   183    188   		        or 'regular';
   184    189   		paramtype  = e.paramtype or (e.box or e.mesh or e.light) and 'light' or nil;
   185    190   		paramtype2 = e.paramtype2 or 'none';
   186    191   		tiles = e.tex;
   187    192   		node_box = e.box;
   188    193   		mesh = e.mesh;
   189    194   		groups = grp;
   190         -		_starlit = {
   191         -			stage = id;
   192         -			recover = e.recover;
   193         -		};
          195  +		_starlit = meta;
   194    196   	})
   195    197   	if e.begin then
   196    198   		for _, kind in ipairs {'part', 'tool'} do
   197    199   			for i, v in ipairs(e.begin[kind] or {}) do
   198    200   				assert(B.begin[kind][v] == nil, 'attempted to overwrite buildpath beginning')
   199    201   				B.begin[kind][v] = id
   200    202   			end