sorcery  Check-in [ecfe4b244e]

Overview
Comment:fix sap interval
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: ecfe4b244e8c82c26b626f1f3582373606a68febb42bb1642cf74ffbc12d99b4
User & Date: lexi on 2021-07-06 04:32:13
Other Links: manifest | tags
Context
2021-07-06
13:35
tweaks, add getting started guide check-in: 6a4d5ed7c7 user: lexi tags: trunk
04:32
fix sap interval check-in: ecfe4b244e user: lexi tags: trunk
04:18
replace hellaciously overcomplicated function with simpler, faster one check-in: 5322b9e068 user: lexi tags: trunk
Changes

Modified lib/node.lua from [483baaca72] to [b21e3fad50].

203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
		local leaftype = treedef and treedef.leaves or nil
		if not leaftype then return false end

		local uppermost, lowermost
		local found_leaves = false

		local treemap, treenodes = amass(pos,function(node, where)
			print(where, 'treetype',treetype,'node',node.name,node.param1,node.param2)
			if node.name == treetype and node.param1 == 0 then
				-- abuse predicate so we can avoid iterating over it all later
				-- again -- this function is expensive enough already
				if (not lowermost) or where.y < lowermost.y then
					lowermost = where
				end








<







203
204
205
206
207
208
209

210
211
212
213
214
215
216
		local leaftype = treedef and treedef.leaves or nil
		if not leaftype then return false end

		local uppermost, lowermost
		local found_leaves = false

		local treemap, treenodes = amass(pos,function(node, where)

			if node.name == treetype and node.param1 == 0 then
				-- abuse predicate so we can avoid iterating over it all later
				-- again -- this function is expensive enough already
				if (not lowermost) or where.y < lowermost.y then
					lowermost = where
				end

Modified tap.lua from [87f184e80e] to [c0cf444eb7].

1
2
3
4
5
6
7
8
9
local log = sorcery.logger('tap')
local sap_interval = 20;

local function tapdrip(liq, pos)
	return sorcery.vfx.drip(liq, vector.offset(pos, 0, -0.3, 0), math.random(5,12), sap_interval, 2)
end

minetest.register_node('sorcery:tap',{
	description = 'Tree Tap';

|







1
2
3
4
5
6
7
8
9
local log = sorcery.logger('tap')
local sap_interval = 50;

local function tapdrip(liq, pos)
	return sorcery.vfx.drip(liq, vector.offset(pos, 0, -0.3, 0), math.random(5,12), sap_interval, 2)
end

minetest.register_node('sorcery:tap',{
	description = 'Tree Tap';