fix ball spawner crash: when ball used but empty meta
This commit is contained in:
parent
1e87defeee
commit
d49f6ad867
3
ball.lua
3
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();
|
||||
|
@ -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..
|
||||
|
Loading…
x
Reference in New Issue
Block a user