starlit  Diff

Differences From Artifact [c40c4aaae1]:

To Artifact [e52f2bba90]:


46
47
48
49
50
51
52

53
54
55
56
57
58
59
60
61
62
63
64
65
...
386
387
388
389
390
391
392
393
394


395
396
397
398
399
400
401
...
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433




434
435
436
437
438
439
	liveUI = {
		-- cached subset of activeUI containing those UIs needing live updates
	};

	interface = lib.registry.mk 'starlit:interface';
	item = {
		food = lib.registry.mk 'starlit:food';

	};

	region = {
		radiator = {
			store = AreaStore();
			emitters = {}
		};
	};

	-- standardized effects
	fx = {};

	type = {};
................................................................................
})
minetest.register_item("starlit:_hand_dig", {
	type = "none",
	wield_image = "wieldhand.png",
	wield_scale = {x=1,y=1,z=2.5},
	tool_capabilities = {
		groupcaps = {
			plant = {maxlevel=1, times = {.50,.5,.5}};
			dirt = {maxlevel=1, times = {2.5,1,1}};


		};
	}
})

minetest.register_on_player_inventory_action(function(luser, act, inv, p)
	local name = luser:get_player_name()
	local user = starlit.activeUsers[name]
................................................................................
		-- cranked by similarly
	end
	return delta
end, true)

function minetest.handle_node_drops(pos, drops, digger)
	local function jitter(pos)
		local function r(x) return x+math.random(-0.2, 0.2) end
		return vector.new(
			r(pos.x),
			r(pos.y),
			r(pos.z)
		)
	end
	for i, it in ipairs(drops) do
		minetest.add_item(jitter(pos), it)




	end
end


-- TODO timer iterates live UI








>





|







 







|
|
>
>







 







|







|
>
>
>
>






46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
...
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
...
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
	liveUI = {
		-- cached subset of activeUI containing those UIs needing live updates
	};

	interface = lib.registry.mk 'starlit:interface';
	item = {
		food = lib.registry.mk 'starlit:food';
		seed = lib.registry.mk 'starlit:seed';
	};

	region = {
		radiator = {
			store = AreaStore();
			emitters = {};
		};
	};

	-- standardized effects
	fx = {};

	type = {};
................................................................................
})
minetest.register_item("starlit:_hand_dig", {
	type = "none",
	wield_image = "wieldhand.png",
	wield_scale = {x=1,y=1,z=2.5},
	tool_capabilities = {
		groupcaps = {
			plant = {maxlevel=1, times = {.50}};
			dirt = {maxlevel=1, times = {2.5}};

			log = {maxlevel=1, times = {1}};
		};
	}
})

minetest.register_on_player_inventory_action(function(luser, act, inv, p)
	local name = luser:get_player_name()
	local user = starlit.activeUsers[name]
................................................................................
		-- cranked by similarly
	end
	return delta
end, true)

function minetest.handle_node_drops(pos, drops, digger)
	local function jitter(pos)
		local function r(x) return x+math.random(-0.01, 0.01) end
		return vector.new(
			r(pos.x),
			r(pos.y),
			r(pos.z)
		)
	end
	for i, it in ipairs(drops) do
		local it = minetest.add_item(jitter(pos), it)
		local dp = vector.new(0,0,0)
		if digger then dp = digger:get_pos() end
		local delta = dp - it:get_pos()
		it:add_velocity(vector.new(delta.x,0,delta.z));
	end
end


-- TODO timer iterates live UI