Superfluid Helium is weird. It's super cold, basically absolute zero, and it creeps up walls when placed in a container. Anybody think they can put together the lua for this? It should also be able to flow through one-pixel thick walls, bonus points if you can make it flow backwards in PIPE
I like the idea. Sometime ago I was thinking about doing a new (lua) element: Liquid Noble, My idea was to make a superfluid and superconductor liquid. The best thing that I made was a very awful element. Here's the code if someone want improve it:
-- code:
local lnble = elements.allocate("MOD", "LNBL")
elements.element(elements.MOD_PT_LNBL, elements.element(elements.DEFAULT_PT_MERC))
elements.property(elements.MOD_PT_LNBL, "Name", "LNBL")
elements.property(elements.MOD_PT_LNBL, "Description", "Liquid Helium. Extremely cold. Conductive.")
elements.property(elements.MOD_PT_LNBL, "Colour", 0xFF6026)
elements.property(elements.MOD_PT_LNBL, "Meltable", 1)
elements.property(elements.MOD_PT_LNBL, "Temperature", 3)
elements.property(elements.MOD_PT_LNBL, "HighTemperature", 7.0)
elements.property(elements.MOD_PT_LNBL, "HighTemperatureTransition", elements.DEFAULT_PT_NBLE)
elements.property(elements.MOD_PT_LNBL, "Gravity", 0.4)
elements.property(elements.MOD_PT_LNBL, "Diffusion", 0.2)
(Thanks to NDR149 for improve the code)
I think the obvious problem with LNBL is the HighTemperature value. I'll bet it turns into NBLE almost instantly. Or... not? Just tested it, it shouldn't behave like that at all...
Update on Superfluid Helium: Code nearly ready, but there's room for extra detail
local supfluid = elem.allocate("OUR", "HSFL")
elem.element(supfluid, elem.element(elem.DEFAULT_PT_SOAP))
elem.property(supfluid, "Name", "HSFL")
elem.property(supfluid, "Description", "Helium superfluid, extremely cold, strange behavior in containers.")
elem.property(supfluid, "Color", 0xFF9900)
elem.property(supfluid, "Weight", 5)
elem.property(supfluid, "Temperature", 0)
elem.property(supfluid, "Flammable", 1000)
elem.property(supfluid, "HeatConduct", 10)
elem.property(supfluid, "Meltable", 1)elem.property(supfluid, "LowPressure", IPL)
elem.property(supfluid, "LowPressureTransition", NT)
elem.property(supfluid, "HighPressure", IPH)
elem.property(supfluid, "HighPressureTransition", NT)
elem.property(supfluid, "LowTemperature", ITL)
elem.property(supfluid, "LowTemperatureTransition", NT)
elem.property(supfluid, "HighTemperature", ITH)
elem.property(supfluid, "HighTemperatureTransition", NT)
local function wallClimb(i, x, y, s, nt)
local contained
r = sim.partID(math.random(x-1, x+1), y-1)
if r ~= nil then
rtype = sim.partProperty(r, "type")
contained = (bit.band(elem.property(rtype, "Properties"), elem.TYPE_PART) ~= 0) or (bit.band(elem.property(rtype, "Properties"), elem.TYPE_SOLID) ~= 0)
rx = (sim.partProperty(r, "x")-sim.partProperty(i, "x"))
end
if contained then
sim.partProperty(i, "vy", -2)
sim.partProperty(i, "vx", rx)
end
end
elem.property(supfluid, "Update", wallClimb)
function supfluid_Graphics(i, colr, colg, colb)
return 1, 0x0000001, 255, colr, colg, colb, 0, 0, 0, 0
end
elem.property(supfluid, "Graphics", supfluid_Graphics)
I never thought that would be possible make a superfluid on TPT, great work! You can add this if you want the element with blur effect:
tpt.graphics_func(Lflare, supfluid)
I knooow. It's sooo laggy, I don't know what it is. If you want to add it to your mod, go ahead, but put me in the little credits on the startup HUD or something.