1wallindicator = class:new()
2
3function wallindicator:init(x, y, r)
4	self.x = x
5	self.y = y
6	self.r = r
7
8	self.lighted = false
9end
10
11function wallindicator:link()
12	self.outtable = {}
13	if #self.r > 2 then
14		for j, w in pairs(outputs) do
15			for i, v in pairs(objects[w]) do
16				if tonumber(self.r[4]) == v.cox and tonumber(self.r[5]) == v.coy then
17					v:addoutput(self)
18				end
19			end
20		end
21	end
22end
23
24function wallindicator:update()
25
26end
27
28function wallindicator:draw()
29	love.graphics.setColor(255, 255, 255)
30	local quad = 1
31	if self.lighted then
32		quad = 2
33	end
34
35	love.graphics.drawq(wallindicatorimg, wallindicatorquad[quad], math.floor((self.x-1-xscroll)*16*scale), ((self.y-1)*16-8)*scale, 0, scale, scale)
36end
37
38function wallindicator:input(t)
39	if t == "on" then
40		self.lighted = true
41	elseif t == "off" then
42		self.lighted = false
43	elseif t == "toggle" then
44		self.lighted = not self.lighted
45	end
46end