mirror of
https://github.com/HybridDog/vector_extras.git
synced 2024-11-29 19:03:51 +01:00
automatic update
This commit is contained in:
parent
a34d7eb231
commit
052a995875
12
init.lua
12
init.lua
@ -1,7 +1,7 @@
|
|||||||
local load_time_start = os.clock()
|
local load_time_start = os.clock()
|
||||||
|
|
||||||
function vector.pos_to_string(pos)
|
function vector.pos_to_string(pos)
|
||||||
return "("..pos.x.."|"..pos.y.."|"..pos.z..")"
|
return "{x="..pos.x.."; y="..pos.y.."; z="..pos.z.."}"
|
||||||
end
|
end
|
||||||
|
|
||||||
local r_corr = 0.25 --remove a bit more nodes (if shooting diagonal) to let it look like a hole (sth like antialiasing)
|
local r_corr = 0.25 --remove a bit more nodes (if shooting diagonal) to let it look like a hole (sth like antialiasing)
|
||||||
@ -190,7 +190,7 @@ function vector.threeline(x, y, z)
|
|||||||
return line
|
return line
|
||||||
end
|
end
|
||||||
if x ~= math.floor(x) then
|
if x ~= math.floor(x) then
|
||||||
print("[vector_extras] INFO: The position used for vector.threeline isn't round.")
|
minetest.log("error", "[vector_extras] INFO: The position used for vector.threeline isn't round.")
|
||||||
end
|
end
|
||||||
local two_line = vector.twoline(x, y)
|
local two_line = vector.twoline(x, y)
|
||||||
line = {}
|
line = {}
|
||||||
@ -304,7 +304,7 @@ function vector.explosion_table(r)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
explosion_tables[r] = tab
|
explosion_tables[r] = tab
|
||||||
print(string.format("[vector_extras] table created after ca. %.2fs", os.clock() - t1))
|
minetest.log("info", string.format("[vector_extras] table created after ca. %.2fs", os.clock() - t1))
|
||||||
return tab
|
return tab
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -327,7 +327,7 @@ function vector.circle(r)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
circle_tables[r] = tab
|
circle_tables[r] = tab
|
||||||
print(string.format("[vector_extras] table created after ca. %.2fs", os.clock() - t1))
|
minetest.log("info", string.format("[vector_extras] table created after ca. %.2fs", os.clock() - t1))
|
||||||
return tab
|
return tab
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -369,7 +369,7 @@ function vector.ring(r)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
ring_tables[r] = tab2
|
ring_tables[r] = tab2
|
||||||
print(string.format("[vector_extras] table created after ca. %.2fs", os.clock() - t1))
|
minetest.log("info", string.format("[vector_extras] table created after ca. %.2fs", os.clock() - t1))
|
||||||
return tab2
|
return tab2
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -379,4 +379,4 @@ end
|
|||||||
|
|
||||||
dofile(minetest.get_modpath("vector_extras").."/vector_meta.lua")
|
dofile(minetest.get_modpath("vector_extras").."/vector_meta.lua")
|
||||||
|
|
||||||
print(string.format("[vector_extras] loaded after ca. %.2fs", os.clock() - load_time_start))
|
minetest.log("info", string.format("[vector_extras] loaded after ca. %.2fs", os.clock() - load_time_start))
|
||||||
|
Loading…
Reference in New Issue
Block a user