Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By MrSalit0s
- local NEON = elements.allocate("MOD", "NEON")
- elements.element(elements.MOD_PT_NEON, elements.element(elements.DEFAULT_PT_NBLE))
- elements.property(elements.MOD_PT_NEON, "Name", "NEON")
- elements.property(elements.MOD_PT_NEON, "Description", "Neon gas - glows in contact with electricity")
- elements.property(elements.MOD_PT_NEON, "Colour", 0x00242424)
- elements.property(elements.MOD_PT_NEON, "MenuSection", 6)
- elements.property(elements.MOD_PT_NEON, "Loss", 0.1)
- elements.property(elements.MOD_PT_NEON, "AirLoss", 1)
- elements.property(elements.MOD_PT_NEON, "Advection", 0.4)
- elements.property(elements.MOD_PT_NEON, "Diffusion", 0.5)
- elements.property(elements.MOD_PT_NEON, "Temperature", 295)
- elements.property(elements.MOD_PT_NEON, "Gravity", 0)
- elements.property(elements.MOD_PT_NEON, "Flammable", 0)
- elements.property(elements.MOD_PT_NEON, "Weight", 0)
- elements.property(elements.MOD_PT_NEON, "Properties", 0x4828)
- local colour={0xFFAA0000,0xFFFF6600,0xFFFFFF00,0xFF00FF00,0xFF00FFFF,0xFF0000FF,0xFF9900CC}
- local none=0x00242424
- local function neon(i,x,y,s,n)
- if tpt.get_property("tmp",i)== 0 then
- tpt.set_property("tmp",1,i)
- end
- if tpt.get_property("tmp2",i)== 1 then
- tpt.set_property("life",180,i)
- tpt.set_property("tmp2",0,i)
- end
- if tpt.parts[i].life<=0 then
- tpt.set_property("dcolour",none,i)
- end
- end
- local function neonsprk(i,x,y,s,n)
- local ntmp=tpt.get_property("tmp",i)
- local neontype=tpt.get_property("ctype",i)
- if tpt.get_property("ctype",i)==elements.MOD_PT_NEON then
- if tpt.get_property("tmp",i)==ntmp then
- tpt.set_property("dcolour",colour[ntmp],i)
- tpt.set_property("tmp2",1,i)
- end
- if tpt.get_property("tmp",i)==8 then
- tpt.set_property("dcolour",colour[math.random(1,7)],i)
- tpt.set_property("tmp2",1,i)
- end
- end
- end
- local function neongraphics(i, colr, colg, colb)
- return 1,0x00022110,30,30,30,30,30,30,30,30
- end
- tpt.graphics_func(neongraphics,elements.MOD_PT_NEON)
- tpt.element_func(neon,elements.MOD_PT_NEON)
- tpt.element_func(neonsprk,elements.DEFAULT_PT_SPRK)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement