starlit  Diff

Differences From Artifact [91056054d4]:

To Artifact [9e988e1fe2]:


    14     14   		local grp = {
    15     15   			object = 1;
    16     16   			attached_node = 1;
    17     17   		}
    18     18   		if def.group then
    19     19   			for k,v in pairs(def.group((i/stages))) do grp[k]=v end
    20     20   		end
    21         -		minetest.register_node(stID(i), {
           21  +		core.register_node(stID(i), {
    22     22   			short_description = def.name;
    23     23   			description = starlit.ui.tooltip {
    24     24   				title = def.name;
    25     25   				desc = def.desc;
    26     26   				color = def.color;
    27     27   				props = {
    28     28   					{title = 'Burn Remaining', desc=lib.math.timespec(stageTimeout * i), affinity=i > (stages/2) and 'good' or 'bad'};
................................................................................
    40     40   			};
    41     41   			tiles = def.tile((i/stages));
    42     42   			paramtype = 'light';
    43     43   			paramtype2 = 'wallmounted';
    44     44   			wallmounted_rotate_vertical = true;
    45     45   			light_source = math.floor(lib.math.lerp(i/stages, 0, def.glow));
    46     46   			on_construct = i ~= 0 and function(pos)
    47         -				local t = minetest.get_node_timer(pos)
           47  +				local t = core.get_node_timer(pos)
    48     48   				t:start(stageTimeout)
    49     49   				if def.ctor then def.ctor(pos, (i/stages)) end
    50     50   			end or nil;
    51     51   			on_destruct = def.dtor and function(pos)
    52     52   				def.dtor(pos, (i/stages))
    53     53   			end or nil;
    54     54   			on_timer = i ~= 0 and function(pos)
    55         -				local me = minetest.get_node(pos)
    56         -				minetest.swap_node(pos, {name=stID(i-1), param2=me.param2})
           55  +				local me = core.get_node(pos)
           56  +				core.swap_node(pos, {name=stID(i-1), param2=me.param2})
    57     57   				return i > 1
    58     58   			end or nil;
    59     59   			_starlit = (function()
    60     60   				local meta = {
    61     61   					mass = def.mass;
    62     62   					reverseEngineer = {
    63     63   						complexity = 1;
................................................................................
   154    154   			radiate = function(rp, pos)
   155    155   				return 15 * f
   156    156   			end;
   157    157   		};
   158    158   	} end;
   159    159   }
   160    160   
   161         -minetest.register_node('starlit_tech:crate', {
          161  +core.register_node('starlit_tech:crate', {
   162    162   	short_description = 'Crate';
   163    163   	description = starlit.ui.tooltip {
   164    164   		title = 'Crate';
   165    165   		desc = 'A sturdy but lightweight aluminum storage crate.';
   166    166   		props = { {title='Mass', affinity='info', desc='100g'} };
   167    167   	};
   168    168   	drawtype = 'nodebox';
................................................................................
   199    199   			time = {
   200    200   				shred = 1;
   201    201   				shredPower = 3;
   202    202   			};
   203    203   		};
   204    204   	};
   205    205   	on_construct = function(pos)
   206         -		local m = minetest.get_meta(pos)
          206  +		local m = core.get_meta(pos)
   207    207   		local inv = m:get_inventory()
   208    208   		inv:set_size('starlit:contents', 12)
   209    209   	end;
   210    210   	on_rightclick = function(pos, node, luser)
   211    211   		if not luser then return end
   212    212   		local user = starlit.activeUsers[luser:get_player_name()]
   213    213   		user:openUI('starlit:box', 'index', {