Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Mod made by MrSalit0s
- tpt.setfpscap(120)
- --[[ hidden elements in regular menus ]]
- elements.property(elements.DEFAULT_PT_EMBR, "MenuSection", 5)
- elements.property(elements.DEFAULT_PT_EMBR, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_BIZRG, "MenuSection", 6)
- elements.property(elements.DEFAULT_PT_BIZRG, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_FRZW, "MenuSection", 7)
- elements.property(elements.DEFAULT_PT_FRZW, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_BIZRS, "MenuSection", 9)
- elements.property(elements.DEFAULT_PT_BIZRS, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_MORT, "MenuSection", 8)
- elements.property(elements.DEFAULT_PT_MORT, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_DYST, "MenuSection", 8)
- elements.property(elements.DEFAULT_PT_DYST, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_RIME, "MenuSection", 9)
- elements.property(elements.DEFAULT_PT_RIME, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_SHLD2, "MenuSection", 9)
- elements.property(elements.DEFAULT_PT_SHLD2, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_SHLD3, "MenuSection", 98)
- elements.property(elements.DEFAULT_PT_SHLD3, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_SHLD4, "MenuSection", 9)
- elements.property(elements.DEFAULT_PT_SHLD4, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_PSTS, "MenuSection", 8)
- elements.property(elements.DEFAULT_PT_PSTS, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_LOVE, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_LOVE, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_LOLZ, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_LOLZ, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_FOG, "MenuSection", 6)
- elements.property(elements.DEFAULT_PT_FOG, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_SPAWN, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_SPAWN, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_SPAWN2, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_SPAWN2, "MenuVisible", 1)
- elements.property(elements.DEFAULT_PT_SPAWN2, "Name", "SPW2")
- elements.property(elements.DEFAULT_PT_BRAY, "MenuSection", 11)
- elements.property(elements.DEFAULT_PT_BRAY, "MenuVisible", 1)
- --[[ element: Termites ]]
- local Termites = elements.allocate("MOD", "TRMT")
- elements.element(elements.MOD_PT_TRMT, elements.element(elements.DEFAULT_PT_ACID))
- elements.property(elements.MOD_PT_TRMT, "Name", "TRMT")
- elements.property(elements.MOD_PT_TRMT, "Description", "termites")
- elements.property(elements.MOD_PT_TRMT, "Colour", 0xFFB33702)
- elements.property(elements.MOD_PT_TRMT, "MenuSection", 11)
- elements.property(elements.MOD_PT_TRMT, "Gravity", 0.1)
- elements.property(elements.MOD_PT_TRMT, "Loss", 0.8)
- elements.property(elements.MOD_PT_TRMT, "AirLoss", 0.56)
- elements.property(elements.MOD_PT_TRMT, "AirDrag", 0.02)
- elements.property(elements.MOD_PT_TRMT, "Advection", 0.7)
- elements.property(elements.MOD_PT_TRMT, "Weight", 0.1)
- elements.property(elements.MOD_PT_TRMT, "Diffusion", 0.2)
- local Element2 = elements.allocate("MOD", "TRM2")
- elements.element(elements.MOD_PT_TRM2, elements.element(elements.DEFAULT_PT_CAUS))
- elements.property(elements.MOD_PT_TRM2, "Name", "TRM2")
- elements.property(elements.MOD_PT_TRM2, "Description", "termites")
- elements.property(elements.MOD_PT_TRM2, "Colour", 0xFFB33702)
- elements.property(elements.MOD_PT_TRM2, "MenuSection", 11)
- elements.property(elements.MOD_PT_TRM2, "MenuVisible", 0)
- math.randomseed(os.time())
- local function termites(i,x,y,s,n)
- local ox=math.random(x-2,x+2)
- local oy=math.random(y-2,y+2)
- local oz=math.random(0,30)
- local oc=math.random(0,300)
- if oz==10 then
- tpt.set_property("type",elements.MOD_PT_TRM2,ox,oy)
- end
- if oz==20 then
- tpt.set_property("type",elements.MOD_PT_TRMT,ox,oy)
- end
- if oc==150 then
- tpt.delete(i)
- end
- end
- local function trmgraphics(i, colr, colg, colb)
- return 1,0x00000001,255,200,48,0,255,200,48,0
- end
- tpt.element_func(termites,elements.MOD_PT_TRMT)
- tpt.element_func(termites,elements.MOD_PT_TRM2)
- tpt.graphics_func(trmgraphics,elements.MOD_PT_TRMT)
- tpt.graphics_func(trmgraphics,elements.MOD_PT_TRM2)
- --[[ element: Nanobot ]]
- local Nano = elements.allocate("MOD", "NANO")
- elements.element(elements.MOD_PT_NANO, elements.element(elements.DEFAULT_PT_METL))
- elements.property(elements.MOD_PT_NANO, "Name", "NANO")
- elements.property(elements.MOD_PT_NANO, "Description", "Nanobot - create it's ctype - controllable with arrow keys")
- elements.property(elements.MOD_PT_NANO, "Colour", 0x0000FF00)
- elements.property(elements.MOD_PT_NANO, "MenuSection", 1)
- elements.property(elements.MOD_PT_NANO, "MenuVisible", 1)
- local nup = false
- local ndown = false
- local nright = false
- local nleft = false
- local active = true
- local function ctrl(key,dkey,_,event)
- if dkey == 273 then
- nup = true
- ndown = false
- nright = false
- nleft = false
- active = true
- end
- if dkey == 274 then
- nup = false
- ndown = true
- nright = false
- nleft = false
- active = true
- end
- if dkey == 276 then
- nup = false
- ndown = false
- nright = true
- nleft = false
- active = true
- end
- if dkey == 275 then
- nup = false
- ndown = false
- nright = false
- nleft = true
- active = true
- end
- end
- local function nanoctrl(i,x,y,s,n)
- if tpt.get_property("ctype",i)==elements.DEFAULT_PT_NONE then
- tpt.set_property("ctype",elements.DEFAULT_PT_METL,i)
- end
- if tpt.get_property("tmp2",i)==0 then
- if active then
- if nup then
- tpt.set_property('y',y-2,i)
- tpt.create(x,y-1,tpt.get_property("ctype", i))
- end
- if ndown then
- tpt.set_property('y',y+2,i)
- tpt.create(x,y+1,tpt.get_property("ctype", i))
- end
- if nright then
- tpt.set_property('x',x-2,i)
- tpt.create(x-1,y,tpt.get_property("ctype", i))
- end
- if nleft then
- tpt.set_property('x',x+2,i)
- tpt.create(x+1,y,tpt.get_property("ctype", i))
- end
- active = false
- end
- end
- end
- tpt.element_func(nanoctrl,elements.MOD_PT_NANO)
- tpt.register_keypress(ctrl)
- --[[ element: Gold ]]
- local Gold = elements.allocate("MOD", "GOLD")
- elements.element(elements.MOD_PT_GOLD, elements.element(elements.DEFAULT_PT_METL))
- elements.property(elements.MOD_PT_GOLD, "Name", "GOLD")
- elements.property(elements.MOD_PT_GOLD, "Description", "Gold")
- elements.property(elements.MOD_PT_GOLD, "Colour", 0xFFFE9E19)
- elements.property(elements.MOD_PT_GOLD, "MenuSection", 9)
- elements.property(elements.MOD_PT_GOLD, "Properties", 0x4024)
- local function gold(i,x,y,s,n)
- local g=math.random(0,300)
- if g==60 then
- tpt.set_property("dcolour",0xFFFE9E19,i)
- end
- if g==120 then
- tpt.set_property("dcolour",0xFFFEA31B,i)
- end
- if g==180 then
- tpt.set_property("dcolour",0xFFDA8C18,i)
- end
- if g==240 then
- tpt.set_property("dcolour",0xFFF28705,i)
- end
- if g==300 then
- tpt.set_property("dcolour",0xFFF29D01,i)
- end
- end
- local function goldgraphics(i, colr, colg, colb)
- return 1,0x00000124,255,250,130,0,255,250,130,0
- end
- tpt.graphics_func(goldgraphics,elements.MOD_PT_GOLD)
- tpt.element_func(gold,elements.MOD_PT_GOLD)
- --[[ element: Seeds ]]
- local Seed = elements.allocate("MOD", "SEED")
- elements.element(elements.MOD_PT_SEED, elements.element(elements.DEFAULT_PT_DUST))
- elements.property(elements.MOD_PT_SEED, "Name", "SEED")
- elements.property(elements.MOD_PT_SEED, "Description", "Seeds")
- elements.property(elements.MOD_PT_SEED, "Colour", 0xFFA15410)
- elements.property(elements.MOD_PT_SEED, "MenuSection", 8)
- elements.property(elements.MOD_PT_SEED, "Weight", 0.1)
- local function seed(i,x,y,s,n)
- local etype=tpt.get_property("type",x+math.random(-1,1),y+math.random(-1,1))
- if etype==elements.DEFAULT_PT_WOOD or etype==elements.DEFAULT_PT_SAND or etype==elements.DEFAULT_PT_DUST or etype==elements.DEFAULT_PT_WATR or etype==elements.DEFAULT_PT_CLAY or etype==elements.DEFAULT_PT_PLNT or etype==elements.DEFAULT_PT_VINE then
- tpt.parts[i].type=elements.DEFAULT_PT_VINE
- end
- end
- tpt.element_func(seed,elements.MOD_PT_SEED)
- --[[ element: Cloud ]]
- local Cloud = elements.allocate("MOD", "CLD")
- elements.element(elements.MOD_PT_CLD, elements.element(elements.DEFAULT_PT_WTRV))
- elements.property(elements.MOD_PT_CLD, "Name", "CLD")
- elements.property(elements.MOD_PT_CLD, "Description", "Cloud - produces water")
- elements.property(elements.MOD_PT_CLD, "Colour", 0x00FFFFFF)
- elements.property(elements.MOD_PT_CLD, "MenuSection", 6)
- elements.property(elements.MOD_PT_CLD, "Loss", 0.1)
- elements.property(elements.MOD_PT_CLD, "AirLoss", 0.3)
- elements.property(elements.MOD_PT_CLD, "Advection", 1)
- elements.property(elements.MOD_PT_CLD, "Diffusion", 0.3)
- elements.property(elements.MOD_PT_CLD, "Temperature", 273.15)
- local function cloud(i,x,y,s,n)
- local w=math.random(0,2000)
- if w==1000 then
- tpt.parts[i].type=elements.DEFAULT_PT_WATR
- end
- end
- tpt.element_func(cloud,elements.MOD_PT_CLD)
- --[[ element: Neon gas ]]
- 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+math.random(0,20),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)
- --[[ element: Pressure detector ]]
- local PressureDTEC = elements.allocate("MOD", "PDTC")
- elements.element(elements.MOD_PT_PDTC, elements.element(elements.DEFAULT_PT_DTEC))
- elements.property(elements.MOD_PT_PDTC, "Name", "PDTC")
- elements.property(elements.MOD_PT_PDTC, "Description", "Creates a spark when pressure nearby (tmp 1 detects pressure of 0.1)")
- elements.property(elements.MOD_PT_PDTC, "Colour", 0x00202060)
- elements.property(elements.MOD_PT_PDTC, "MenuSection", 3)
- elements.property(elements.MOD_PT_PDTC, "MenuVisible", 1)
- local function pdtc(i,x,y,s,n)
- local ptmp = tpt.get_property("tmp",i)
- if tpt.get_property("tmp",i)==0 then
- tpt.set_property("tmp",1,i)
- end
- if simulation.pressure(x/4,y/4)>=ptmp/10 then
- tpt.create(x,y+1,elements.DEFAULT_PT_SPRK)
- tpt.create(x,y-1,elements.DEFAULT_PT_SPRK)
- tpt.create(x+1,y,elements.DEFAULT_PT_SPRK)
- tpt.create(x-1,y,elements.DEFAULT_PT_SPRK)
- tpt.create(x+1,y+1,elements.DEFAULT_PT_SPRK)
- tpt.create(x+1,y-1,elements.DEFAULT_PT_SPRK)
- tpt.create(x-1,y+1,elements.DEFAULT_PT_SPRK)
- tpt.create(x-1,y-1,elements.DEFAULT_PT_SPRK)
- end
- end
- tpt.element_func(pdtc,elements.MOD_PT_PDTC)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement