Use vector helper functions instead of old builtin cmpPos and addPosRule functions

此提交包含在:
Jeija
2016-02-14 20:55:50 +01:00
父節點 6b54f025c1
當前提交 809192f353
共有 12 個檔案被更改,包括 44 行新增56 行删除

查看文件

@ -17,7 +17,7 @@ pp_on_timer = function (pos, elapsed)
if not basename then return end
local objs = minetest.get_objects_inside_radius(pos, 1)
local two_below = mesecon.addPosRule(pos, {x = 0, y = -2, z = 0})
local two_below = vector.add(pos, vector.new(0, -2, 0))
if objs[1] == nil and node.name == basename .. "_on" then
minetest.add_node(pos, {name = basename .. "_off"})