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    203   		local leaftype = treedef and treedef.leaves or nil
   204    204   		if not leaftype then return false end
   205    205   
   206    206   		local uppermost, lowermost
   207    207   		local found_leaves = false
   208    208   
   209    209   		local treemap, treenodes = amass(pos,function(node, where)
   210         -			print(where, 'treetype',treetype,'node',node.name,node.param1,node.param2)
   211    210   			if node.name == treetype and node.param1 == 0 then
   212    211   				-- abuse predicate so we can avoid iterating over it all later
   213    212   				-- again -- this function is expensive enough already
   214    213   				if (not lowermost) or where.y < lowermost.y then
   215    214   					lowermost = where
   216    215   				end
   217    216   

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

     1      1   local log = sorcery.logger('tap')
     2         -local sap_interval = 20;
            2  +local sap_interval = 50;
     3      3   
     4      4   local function tapdrip(liq, pos)
     5      5   	return sorcery.vfx.drip(liq, vector.offset(pos, 0, -0.3, 0), math.random(5,12), sap_interval, 2)
     6      6   end
     7      7   
     8      8   minetest.register_node('sorcery:tap',{
     9      9   	description = 'Tree Tap';