Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PowdPowe = {
- setname="NONE",
- }
- function PowdPowe.loadset(setname)
- if setname=="nitrousSet" then
- print("Loading set...")
- local ntoo = elements.allocate("POWDERPOWER", "N2O")
- local ntol = elements.allocate("POWDERPOWER", "N2OL")
- local ntwo = elements.allocate("POWDERPOWER", "N2")
- local ntod = elements.allocate("POWDERPOWER", "N2OD")
- elements.element(ntoo, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(ntoo, "Name", "N2O")
- elements.property(ntoo, "Description", "Nitrous Oxide. Explodes under pressure or by fire. Liquifies into N2OL at -123C.")
- elements.property(ntoo, "Colour", 0x448D9C)
- elements.property(ntoo, "MenuSection", elem.SC_GAS)
- elements.property(ntoo, "Diffusion", 0.5)
- elements.property(ntoo, "Weight", 1)
- elements.property(ntoo, "Temperature", 300)
- elements.property(ntoo, "HighPressure", 20)
- elements.property(ntoo, "HighPressureTransition", elements.DEFAULT_PT_FIRE)
- elements.property(ntoo, "Explosive", 1)
- elements.property(ntoo, "Flammable", 1)
- elements.property(ntoo, "LowTemperature", 150)
- elements.property(ntoo, "LowTemperatureTransition", elements.POWDERPOWER_PT_N2OL)
- elements.property(ntoo, "MenuVisible", 1)
- elements.property(ntoo, "Properties", TYPE_GAS)
- elements.element(ntol, elements.element(elements.DEFAULT_PT_LOXY))
- elements.property(ntol, "Name", "N2OL")
- elements.property(ntol, "Description", "Nitrous Oxide as a liquid. Same thing as N2O. Evaporates at -123C. There is a bug where N2OL just sucks up DESL.")
- elements.property(ntol, "Colour", 0x448D9C)
- elements.property(ntol, "MenuSection", elem.SC_LIQUID)
- elements.property(ntol, "Falldown", 2)
- elements.property(ntol, "Diffusion", 0)
- elements.property(ntol, "Weight", 49)
- elements.property(ntol, "Temperature", 140)
- elements.property(ntol, "HighPressure", 20)
- elements.property(ntol, "HighPressureTransition", elements.DEFAULT_PT_FIRE)
- elements.property(ntol, "Explosive", 1)
- elements.property(ntol, "Flammable", 1)
- elements.property(ntol, "LowTemperature", ITL)
- elements.property(ntol, "HighTemperature", 150)
- elements.property(ntol, "HighTemperatureTransition", elements.POWDERPOWER_PT_N2O)
- elements.property(ntol, "MenuVisible", 1)
- elements.property(ntol, "Gravity", 0.04)
- elements.property(ntol, "Properties", TYPE_LIQUID)
- local function funcUpdate(i,x,y,s,nt)
- for r in sim.neighbors(x,y,1,1) do
- if sim.partProperty(r, "type") == elem.DEFAULT_PT_DESL then
- sim.partChangeType(r, elem.DEFAULT_PT_N2OD)
- end
- end
- end
- elements.property(ntoo, "Update", funcUpdate)
- elements.property(ntol, "Update", funcUpdate)
- elements.element(ntwo, elements.element(elements.DEFAULT_PT_HYGN))
- elements.property(ntwo, "Name", "N2")
- elements.property(ntwo, "Description", "Nitrogen. Mixes with OXYG to make N2O on contact. This can only be spawned by itself, as N2 from LN2 dissipates fast.")
- elements.property(ntwo, "Colour", 0x448D9C)
- elements.property(ntwo, "MenuSection", elem.SC_GAS)
- elements.property(ntwo, "Diffusion", 0.5)
- elements.property(ntwo, "Weight", 1)
- elements.property(ntwo, "Temperature", 300)
- elements.property(ntwo, "Explosive", 1)
- elements.property(ntwo, "Flammable", 1)
- elements.property(ntwo, "LowTemperature", 45)
- elements.property(ntwo, "LowTemperatureTransition", elements.DEFAULT_PT_LN2)
- elements.property(ntwo, "MenuVisible", 1)
- elements.element(ntod, elements.element(elements.DEFAULT_PT_DESL))
- elements.property(ntod, "Name", "N2OD")
- elements.property(ntod, "Description", "Nitrous Oxide mixed with diesel. HIGHLY explosive. Handle with care.")
- elements.property(ntod, "Colour", 0x930DDB)
- elements.property(ntod, "MenuSection", elem.SC_LIQUID)
- elements.property(ntod, "Falldown", 2)
- elements.property(ntod, "Diffusion", 0)
- elements.property(ntod, "Weight", 49)
- elements.property(ntod, "Temperature", 300)
- elements.property(ntod, "HighPressure", 20)
- elements.property(ntod, "HighPressureTransition", elements.DEFAULT_PT_FIRE)
- elements.property(ntod, "Explosive", 1)
- elements.property(ntod, "Flammable", 1)
- elements.property(ntod, "MenuVisible", 1)
- elements.property(ntod, "Gravity", 0.04)
- elements.property(ntod, "Properties", TYPE_LIQUID)
- print("Loaded.")
- print("N2 can only be spawned by its own.")
- end
- if setname=="copperSet" then
- print("Loading Copper Set... Please wait")
- local copr = elements.allocate("POWDERPOWER", "COPR")
- local mocp = elements.allocate("POWDERPOWER", "MOCP")
- elements.element(mocp, elements.element(elements.DEFAULT_PT_LAVA))
- elements.property(mocp, "Name", "Molten Copper")
- elements.property(mocp, "Description", "Molten Copper.")
- elements.property(mocp, "Properties", TYPE_LIQUID)
- elements.property(mocp, "LowTemperature", "1360.15")
- elements.property(mocp, "LowTemperatureTransition", POWDERPOWER_PT_COPR)
- elements.property(mocp, "MenuVisible", 0)
- elements.element(copr, elements.element(elements.DEFAULT_PT_METL))
- elements.property(copr, "Properties", PROP_CONDUCTS, PROP_LIFE_DEC, PROP_HOT_GLOW)
- elements.property(copr, "Name", "COPR")
- elements.property(copr, "Description", "Copper. Melts at 1,085 C. Conducts.")
- elements.property(copr, "Color", "0X6B6830")
- elements.property(copr, "HighTemperature", "1360.15")
- elements.property(copr, "HighTemperatureTransition", POWDERPOWER_PT_MOCP)
- print("Loaded")
- end
- end
- function PowdPowe.clearAll()
- elements.loadDefault()
- print("Cleared added elements")
- end
- function PowdPowe.loadextra(extra)
- print("Command not avaliable yet")
- end
- print("POWDER POWER. Use PowdPowe.loadset(SETNAMEHERE) (Surrounded by quotation marks, I do not want to confuse tpt)")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement