add stuff

This commit is contained in:
abbie 2022-03-28 19:25:39 +01:00
parent b74dca584f
commit be7152475c
No known key found for this signature in database
GPG key ID: 04DDE463F9200F87
2 changed files with 63 additions and 5 deletions

View file

@ -1,5 +1,5 @@
VirusLabs
0.0.2
0.0.3
threeoh6000
Elements that are experimental and scary! VirusLabs brings the best in elemental technology!
0.2.0

66
run.lua
View file

@ -26,6 +26,7 @@ local function updatesettings()
io.close()
end
local bluevirus = elements.allocate("VIRUSLABS","BVIR")
elements.element(bluevirus, elements.element(elements.DEFAULT_PT_VIRS))
elements.property(bluevirus, "Name", "BVIR")
@ -50,23 +51,80 @@ local superheat = elements.allocate("VIRUSLABS","FLSA")
elements.element(superheat, elements.element(elements.DEFAULT_PT_SAND))
elements.property(superheat, "Name", "FLSA")
elements.property(superheat, "Description", "Flaming sand, extremely hot.")
elements.property(superheat, "Temperature", 10000)
elements.property(superheat, "Temperature", 10000+273.15)
elements.property(superheat, "Colour", 0xBC544B)
elements.property(superheat, "Meltable", 0)
elements.property(superheat, "LowTemperature", 75+273.15)
elements.property(superheat, "LowTemperatureTransition", elements.DEFAULT_PT_SAND)
local tap = elements.allocate("VIRUSLABS","TAP")
elements.property(tap, "Name", "TAP")
elements.property(tap, "Description", "Generates water around it.")
elements.property(tap, "Colour", 0xAAAAAA)
elements.property(tap, "MenuSection", elem.SC_SPECIAL)
elements.property(tap, "MenuVisible", 1)
elements.property(tap, "Properties", TYPE_SOLID)
local function spawnwater(i,x,y,s,nt)
sim.partCreate(-1, x+1, y, elements.DEFAULT_PT_WATR)
end
elements.property(tap, "Update", spawnwater)
local superbattery = elements.allocate("VIRUSLABS","HYBT")
elements.element(superbattery, elements.element(elements.DEFAULT_PT_BTRY))
elements.property(superbattery, "HighTemperature", ITH)
elements.property(superbattery, "HighTemperatureTransition", NT)
elements.property(superbattery, "HighPressure", IPH)
elements.property(superbattery, "HighPressureTransition", NT)
elements.property(superbattery, "HeatConduct", 0)
elements.property(superbattery, "Name", "HYBT")
elements.property(superbattery, "Description", "Hyper Battery, can't melt.")
elements.property(superbattery, "HighTemperature", ITL)
elements.property(superbattery, "Meltable", 0)
local function spark(i,x,y,s,nt)
for r in sim.neighbors(x,y,1,1) do
if sim.partProperty(r,"type") ~= elem.VIRUSLABS_PT_HYBT then
sim.partChangeType(r,DEFAULT_PT_SPRK)
if sim.partProperty(r,"type") ~= elem.VIRUSLABS_PT_HYBT and sim.partProperty(r,"type") ~= elem.DEFAULT_PT_SPRK then
local rt = sim.partProperty(r,"type")
if rt ~= elem.DEFAULT_PT_WATR and rt~=elem.DEFAULT_PT_SLTW and rt~=elem.DEFAULT_PT_NTCT and rt~=elem.DEFAULT_PT_PTCT and rt~=elem.DEFAULT_PT_INWR then
sim.partProperty(r, "life", 4)
sim.partProperty(r, "ctype", sim.partProperty(r,"type"))
sim.partChangeType(r, elements.DEFAULT_PT_SPRK)
end
end
end
end
elements.property(superbattery, "Update", spark)
local carbon = elements.allocate("VIRUSLABS","CRBN")
elements.property(carbon, "Name", "CRBN")
elements.property(carbon, "Description", "Carbon, Extremely versatile and light, has many forms.")
elements.property(carbon, "Colour", 0x323232)
elements.property(carbon, "MenuSection", elem.SC_GAS)
elements.property(carbon, "Advection", 1)
elements.property(carbon, "AirDrag", 0.01)
elements.property(carbon, "AirLoss", 1)
elements.property(carbon, "Loss", 0.70)
elements.property(carbon, "Collision", 0)
elements.property(carbon, "Gravity", -0.02)
elements.property(carbon, "Diffusion", 0.75)
elements.property(carbon, "Falldown", 0)
elements.property(carbon, "Weight", 1)
elements.property(carbon, "HeatConduct", 5)
elements.property(carbon, "HighPressure", 100)
elements.property(carbon, "HighPressureTransition", elements.DEFAULT_PT_DMND)
elements.property(carbon, "MenuVisible", 1)
if not vanilla then
elements.property(elements.DEFAULT_PT_TUNG, "LowTemperature", -4000+273.15)
elements.property(elements.DEFAULT_PT_TUNG, "LowTemperatureTransition", elements.VIRUSLABS_PT_TAP)
elements.property(elements.DEFAULT_PT_DMND, "HighTemperature", 5250+273.15)
elements.property(elements.DEFAULT_PT_DMND, "HighTemperatureTransition", elements.VIRUSLABS_PT_CRBN)
elements.property(elements.DEFAULT_PT_COAL, "Explosive", 1)
elements.property(elements.DEFAULT_PT_COAL, "LowPressure", 0)
elements.property(elements.DEFAULT_PT_COAL, "LowPressureTransition", elements.VIRUSLABS_PT_CRBN)
elements.property(elements.DEFAULT_PT_SAND, "HighTemperature", 1000+273.15)
elements.property(elements.DEFAULT_PT_SAND, "HighTemperatureTransition", elements.VIRUSLABS_PT_FLSA)
end
local modmenu = Window:new(-1,-1,92,48)
local vanillabox = Checkbox:new(6,24,16,16,"Vanilla Mode")
local closebut = Button:new(77,0,15,15,"X")