1entity = class:new()
2
3entitylist = {
4	"remove",
5	"mushroom",
6	"oneup",
7	"star",
8	"manycoins",
9	"goomba",
10	"koopa",
11	"spawn",
12	"goombahalf",
13	"koopahalf",
14	"flag",
15	"koopared",
16	"kooparedhalf",
17	"vine",
18	"hammerbro",
19	"cheepred",
20	"cheepwhite",
21	"platformup", --my mouse is dying :(
22	"platformright",
23	"box",
24	"pipe",
25	"lakito",
26	"mazestart",
27	"mazeend",
28	"mazegate",
29	"emancehor",
30	"emancever",
31	"doorver",
32	"doorhor",
33	"wallindicator",
34	"pipespawn",
35	"platformfall",
36	"bulletbillstart",
37	"bulletbillend",
38	"drain",
39	"lightbridgeright",
40	"lightbridgeleft",
41	"lightbridgedown",
42	"lightbridgeup",
43	"button",
44	"platformspawnerdown",
45	"platformspawnerup",
46	"groundlightver",
47	"groundlighthor",
48	"groundlightupright",
49	"groundlightrightdown",
50	"groundlightdownleft",
51	"groundlightleftup",
52	"faithplateup",
53	"faithplateright",
54	"faithplateleft",
55	"laserright",
56	"laserdown",
57	"laserleft",
58	"laserup",
59	"laserdetectorright",
60	"laserdetectordown",
61	"laserdetectorleft",
62	"laserdetectorup",
63	"bulletbill",
64	"bluegeldown",
65	"bluegelright",
66	"bluegelleft",
67	"orangegeldown",
68	"orangegelright",
69	"orangegelleft",
70	"boxtube",
71	"pushbuttonleft",
72	"pushbuttonright",
73	"plant",
74	"whitegeldown",
75	"whitegelright",
76	"whitegelleft",
77	"timer",
78	"beetle",
79	"beetlehalf",
80	"kooparedflying",
81	"koopaflying",
82	"castlefireccw",
83	"seesaw",
84	"warppipe",
85	"castlefirecw",
86	"lakitoend",
87	"notgate",
88	"geltop",
89	"gelleft",
90	"gelbottom",
91	"gelright",
92	"firestart",
93	"bowser",
94	"axe",
95	"platformbonus",
96	"spring",
97	"squid",
98	"flyingfishstart",
99	"flyingfishend",
100	"upfire",
101	"spikey",
102	"spikeyhalf",
103	"checkpoint"
104}
105
106entitydescriptions = {
107	"place anywhere - acts as an entity eraser", --"remove",
108	"place on a wall - mushroom", --"mushroom",
109	"place on a wall - 1-up", --"oneup",
110	"place on a wall - star", --"star",
111	"place on a non question mark block - gives several coins", --"manycoins",
112	"place on empty tile - goomba", --"goomba",
113	"place on empty tile - koopa", --"koopa",
114	"place on empty tile - mario's starting point", --"spawn",
115	"place on empty tile - goomba - more to the right", --"goombahalf",
116	"place on empty tile - koopa - more to the right", --"koopahalf",
117	"place on a wall - bottom of the flag } end of level", --"flag",
118	"place on empty tile - red koopa - will turn around at an edge", --"koopared",
119	"place on empty tile - red koopa - more to the right", --"kooparedhalf",
120	"place on wall - vine - right click to choose destination", --"vine",
121	"place on empty tile - hammer bro", --"hammerbro",
122	"place on empty underwater tile - cheep cheep fish - red", --"cheepred",
123	"place on empty underwater tile - cheep cheep fish - white", --"cheepwhite",
124	"place on empty tile - oscillating platform - right click for width", --"platformup", --my mouse is dying :(
125	"place on empty tile - oscillating platform - right click for width", --"platformright",
126	"place on empty tile - companion cube", --"box",
127	"place on pipe tile - pipe - right click for destination sublevel", --"pipe",
128	"place on empty tile - lakito - you can also add a lakito end tile", --"lakito",
129	"place on empty tile - logical maze start", --"mazestart",
130	"place on empty tile - logical maze end", --"mazeend",
131	"place on empty tile - maze gate - right click for the gate number", --"mazegate",
132	"place on empty tile - horizontal emancipate grill - stops portals and companion cubes", --"emancehor",
133	"place on empty tile - vertical emancipate grill - stops portals and companion cubes", --"emancever",
134	"place on empty tile - vertical door - use link tool", --"doorver",
135	"place on empty tile - horizontal door - use link tool", --"doorhor",
136	"place on a wall - use link tool to show on or off state", --"wallindicator",
137	"place on a pipe tile - right click for origin sublevel", --"pipespawn",
138	"place on empty tile - falling platforms - right click for width", --"platformfall",
139	"place anywhere - beginning of bullet zone", --"bulletbillstart",
140	"place anywhere - end of bullet zone", --"bulletbillend",
141	"place at the very bottom in an underwater level - drain - attracts mario down", --"drain",
142	"place on empty tile - light bridge to right", --"lightbridgeright",
143	"place on empty tile - light bridge to left", --"lightbridgeleft",
144	"place on empty tile - light bridge to down", --"lightbridgedown",
145	"place on empty tile - light bridge to up", --"lightbridgeup",
146	"place on empty tile - floor button - use link", --"button",
147	"place on top - down platform spawner - right click for width", --"platformspawnerdown",
148	"place at the bottom - up platform spawner - right click for width", --"platformspawnerup",
149	"place on wall - use link to show on/off state", --"groundlightver",
150	"place on wall - use link to show on/off state", --"groundlighthor",
151	"place on wall - use link to show on/off state", --"groundlightupright",
152	"place on wall - use link to show on/off state", --"groundlightrightdown",
153	"place on wall - use link to show on/off state", --"groundlightdownleft",
154	"place on wall - use link to show on/off state", --"groundlightleftup",
155	"place on ground wall - faith plate to the sky", --"faithplateup",
156	"place on ground wall - faith plate to the right", --"faithplateright",
157	"place on ground wall - faith plate to the left", --"faithplateleft",
158	"place on empty tile - laser to right", --"laserright",
159	"place on empty tile - laser to bottom", --"laserdown",
160	"place on empty tile - laser to left", --"laserleft",
161	"place on empty tile - laser to up", --"laserup",
162	"place on right edge wall or empty tile - will send off signal if laser is detected - use link tool", --"laserdetectorright",
163	"place on down edge wall or empty tile - will send off signal if laser is detected - use link tool", --"laserdetectordown",
164	"place on left edge wall or empty tile - will send off signal if laser is detected - use link tool", --"laserdetectorleft",
165	"place on up edge wall or empty tile - will send off signal if laser is detected - use link tool", --"laserdetectorup",
166	"place on bulletbill launchers - will make the launcher actually launch bulletbills", --"bulletbill",
167	"place on empty tile - will produce blue gel to down - blue gel } jump", --"bluegeldown",
168	"place on empty tile - will produce blue gel to right - blue gel } jump", --"bluegelright",
169	"place on empty tile - will produce blue gel to left - blue gel } jump", --"bluegelleft",
170	"place on empty tile - will produce orange gel to down - orange gel } run", --"orangegeldown",
171	"place on empty tile - will produce orange gel to right - orange gel } run", --"orangegelright",
172	"place on empty tile - will produce orange gel to left - orange gel } run", --"orangegelleft",
173	"place on empty tile - will drop a box and remove previous one - use link tool", --"boxtube",
174	"place on empty tile - will send a single on signal when used - use link tool", --"pushbuttonleft",
175	"place on empty tile - will send a single on signal when used - use link tool", --"pushbuttonright",
176	"place on empty tile - piranha plant will go up and down", --"plant",
177	"place on empty tile - will produce white gel to down - white gel } portalable", --"whitegeldown",
178	"place on empty tile - will produce white gel to right - white gel } portalable", --"whitegelright",
179	"place on empty tile - will produce white gel to left - white gel } portalable", --"whitegelleft",
180	"place anywhere - will send on signal for a duration - right click to set duration", --"timer",
181	"place on empty tile - beetle - runs fast and resists fireballs", --"beetle",
182	"place on empty tile - beetle - more to the right", --"beetlehalf",
183	"place on empty tile - red flying koopa, goes up and down", --"kooparedflying",
184	"place on empty tile - green flying koopa, jumps around", --"koopaflying",
185	"place on wall - counterclockwise rotating fire - right click for length", --"castlefireccw",
186	"place on empty tile - see-saw - right click for see-saw type", --"seesaw",
187	"place on wall - warp pipe - right click for destination world", --"warppipe",
188	"place on wall - clockwise rotating fire - right click for width", --"castlefirecw",
189	"place anywhere - defines a right border for lakito - use with lakito", --"lakitoend",
190	"place anywhere - turns in input around", --notgate
191	"place on tile - creates gel on this block. 1: blue, 2: orange, 3: white",
192	"place on tile - creates gel on this block. 1: blue, 2: orange, 3: white",
193	"place on tile - creates gel on this block. 1: blue, 2: orange, 3: white",
194	"place on tile - creates gel on this block. 1: blue, 2: orange, 3: white",
195	"place anywhere - fire start - bowser firethings will regularly cross the screen", --"firestart",
196	"place on empty tile preferably on the first block on a bridge with an axe - bowser", --"bowser",
197	"place on empty tile preferably behind a bridge - axe } end of level", --"axe",
198	"place on empty tile - platform in coin worlds", --"platformbonus",
199	"place on empty tile - spring", --"spring",
200	"place on empty tile preferably underwater - squid", --"squid",
201	"place anywhere - defines the start of a flying cheep cheep zone", --"flyingfishstart",
202	"place anywhere - defines the end of a flying cheep cheep zone", --"flyingfishend",
203	"place anywhere - a lava ball will jump up and down on this line", --"upfire",
204	"place on empty tile - spikey", --"spikey",
205	"place on empty tile - spikey - more to the right", --"spikeyhalf",
206	"place on empty tile - checkpoint - mario will spawn there if he dies after reaching it", --"checkpoint"
207}
208
209rightclickvalues = {}
210rightclickvalues["platformspawnerup"] = {"width", 1.5, 2, 3, 5}
211rightclickvalues["platformspawnerdown"] = {"width", 1.5, 2, 3, 5}
212rightclickvalues["platformup"] = {"width", 1.5, 2, 3, 5}
213rightclickvalues["platformright"] = {"width", 1.5, 2, 3, 5}
214rightclickvalues["platformfall"] = {"width", 1.5, 2, 3, 5}
215rightclickvalues["timer"] = {"time", 1, 2, 4, 8}
216rightclickvalues["seesaw"] = {"type", 1, 2, 3, 4, 5, 6, 7, 8, 9}
217
218rightclickvalues["pipe"] = {"target", 0, 1, 2, 3, 4, 5}
219rightclickvalues["pipespawn"] = {"target", 0, 1, 2, 3, 4, 5}
220rightclickvalues["warppipe"] = {"target", 1, 2, 3, 4, 5, 6, 7, 8}
221rightclickvalues["vine"] = {"target", 0, 1, 2, 3, 4, 5}
222
223rightclickvalues["castlefirecw"] = {"length", 6, 12}
224rightclickvalues["castlefireccw"] = {"length", 6, 12}
225
226rightclickvalues["mazegate"] = {"gateno", 1, 2, 3, 4, 5}
227
228rightclickvalues["geltop"] = {"gelid", 1, 2, 3}
229rightclickvalues["gelleft"] = {"gelid", 1, 2, 3}
230rightclickvalues["gelbottom"] = {"gelid", 1, 2, 3}
231rightclickvalues["gelright"] = {"gelid", 1, 2, 3}
232
233function entity:init(img, x, y, width, height)
234	self.image = img
235	self.quad = love.graphics.newQuad((x-1)*17, (y-1)*17, 16, 16, width, height)
236end
237
238function entity:sett(i)
239	for j = 1, #entitylist do
240		if i == j then
241			self.t = entitylist[j]
242		end
243	end
244end