sorcery  Check-in [b79f4e8611]

Overview
Comment:tweak interval
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b79f4e8611dfe089aa3872d6d87e89b16c52dc0e01892a435de11ac5918cbf33
User & Date: lexi on 2021-07-07 07:56:28
Other Links: manifest | tags
Context
2021-07-07
08:23
bug fixes check-in: 612f10a00d user: lexi tags: trunk
07:56
tweak interval check-in: b79f4e8611 user: lexi tags: trunk
2021-07-06
22:21
correct recipe check-in: 99e19cc14f user: lexi tags: trunk
Changes

Modified tap.lua from [c0cf444eb7] to [4e48d35701].

     1      1   local log = sorcery.logger('tap')
     2         -local sap_interval = 50;
            2  +local sap_interval = 60;
     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         -	description = 'Tree Tap';
            9  +	description = 'Tap';
    10     10   	drawtype = 'mesh';
    11     11   	mesh = 'sorcery-tap.obj';
    12     12   	inventory_image = 'sorcery_tap_inv.png';
    13     13   	tiles = {
    14     14   		'default_copper_block.png';
    15     15   		'default_steel_block.png';
    16     16   	};
................................................................................
    66     66   local abm_cache
    67     67   local abm_cache_time
    68     68   minetest.register_abm {
    69     69   	label = 'Sap drip';
    70     70   	nodenames = {'sorcery:tap'};
    71     71   	neighbors = {'group:tree'};
    72     72   	interval = sap_interval;
    73         -	chance = 4;
           73  +	chance = 5;
    74     74   	catch_up = true;
    75     75   	action = function(pos, node)
    76     76   		local now = os.time()
    77     77   		if abm_cache_time == nil or now > abm_cache_time + (sap_interval-1) then
    78     78   			abm_cache = { treehash = {} }
    79     79   			abm_cache_time = now
    80     80   		end