1
0
의 미러 https://github.com/mt-mods/pipeworks.git synced 2025-09-18 19:40:38 +02:00

local-ize a few more variables, move all of the nodebox models

into their own file and confine them and pretty much everything
else to the pipeworks.{} table (still global though).  More to
come.
This commit is contained in:
Vanessa Ezekowitz
2013-12-15 04:35:59 -05:00
부모 bd80f18cfc
커밋 659b4e42b2
7개의 변경된 파일310개의 추가작업 그리고 301개의 파일을 삭제

파일 보기

@@ -120,18 +120,18 @@ function tube_autoroute(pos)
-- all sides checked, now figure which tube to use.
nsurround = ""
for i,n in ipairs(active) do
nsurround = nsurround .. n
end
local newname=string.sub(nctr.name,1,-7)..nsurround
if newname == nctr.name then return end
local meta=minetest.get_meta(pos)
local meta0=meta:to_table() -- XXX: hacky_swap_node
nctr.name = newname
minetest.add_node(pos, nctr)
local meta=minetest.get_meta(pos)
meta:from_table(meta0)
local nsurround = ""
for i,n in ipairs(active) do
nsurround = nsurround .. n
end
local newname=string.sub(nctr.name,1,-7)..nsurround
if newname == nctr.name then return end
local meta=minetest.get_meta(pos)
local meta0=meta:to_table() -- XXX: hacky_swap_node
nctr.name = newname
minetest.add_node(pos, nctr)
local meta=minetest.get_meta(pos)
meta:from_table(meta0)
local nctr = minetest.get_node(pos)
end