summaryrefslogtreecommitdiff
path: root/mesecons_mvps/init.lua
blob: 150f59f95010c27dd39a51b276d3f635bd666a32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--register stoppers for movestones/pistons

mesecon.mvps_stoppers={}

function mesecon:is_mvps_stopper(nodename)
	local i=1
	repeat
		i=i+1
		if mesecon.mvps_stoppers[i]==nodename then return true end
	until mesecon.mvps_stoppers[i]==nil
	return false
end

function mesecon:register_mvps_stopper(nodename)
	local i=1
	repeat
		i=i+1
		if mesecon.mvps_stoppers[i]==nil then break end
	until false
	mesecon.mvps_stoppers[i]=nodename
end

mesecon:register_mvps_stopper("default:chest")
mesecon:register_mvps_stopper("default:chest_locked")
mesecon:register_mvps_stopper("default:furnace")