From d49f6ad867d3fc77a9ebdb4aa13be41c1c776a9c Mon Sep 17 00:00:00 2001 From: rnd1 Date: Tue, 12 Jul 2016 07:34:09 +0200 Subject: [PATCH] fix ball spawner crash: when ball used but empty meta --- ball.lua | 3 ++- mover.lua | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ball.lua b/ball.lua index d22ff4e..dd81c67 100644 --- a/ball.lua +++ b/ball.lua @@ -547,9 +547,10 @@ minetest.register_tool("basic_machines:ball_spell", { local pos = user:getpos();pos.y=pos.y+1; local meta = minetest.deserialize(itemstack:get_metadata()); + if not meta then return end local owner = meta["owner"] or ""; - if minetest.is_protected(pos,owner) then return end + --if minetest.is_protected(pos,owner) then return end local t0 = spelltime[owner] or 0; local t1 = minetest.get_gametime(); diff --git a/mover.lua b/mover.lua index f3b5e06..56d3294 100644 --- a/mover.lua +++ b/mover.lua @@ -11,7 +11,7 @@ local machines_minstep = 1 -- minimal allowed activation timestep, if faster mac local max_range = 10; -- machines normal range of operation local machines_operations = 10; -- 1 coal will provide 10 mover basic operations ( moving dirt 1 block distance) local machines_TTL = 16; -- time to live for signals, how many hops before signal dissipates -basic_machines.version = "07/09/2016a"; +basic_machines.version = "07/12/2016a"; basic_machines.clockgen = 1; -- if 0 all background continuously running activity (clockgen/keypad) repeating is disabled -- how hard it is to move blocks, default factor 1, note fuel cost is this multiplied by distance and divided by machine_operations..