Just a Lua Version of VIRS:
local a = elements.allocate("QUENTIN" , "VRS2")
elements.element(elements.QUENTIN_PT_VRS2, elements.element(elements.DEFAULT_PT_BCOL))
elements.property(elements.QUENTIN_PT_VRS2, "Name" , "VRS2")
elements.property(elements.QUENTIN_PT_VRS2, "Description" , "Virus 2")
elements.property(elements.QUENTIN_PT_VRS2, "MenuSection" , 5)
elements.property(elements.QUENTIN_PT_VRS2, "Gravity" , 1)
elements.property(elements.QUENTIN_PT_VRS2, "Falldown" , 2)
elements.property(elements.QUENTIN_PT_VRS2, "Flammable" , 0)
elements.property(elements.QUENTIN_PT_VRS2, "Explosive" , 1)
elements.property(elements.QUENTIN_PT_VRS2, "Diffusion" , 0)
elements.property(elements.QUENTIN_PT_VRS2, "Weight" , 100)
elements.property(elements.QUENTIN_PT_VRS2, "Advection" , 0.1)
elements.property(elements.QUENTIN_PT_VRS2, "AirLoss" , 0.95)
elements.property(elements.QUENTIN_PT_VRS2, "Loss" , 0.15)
elements.property(elements.QUENTIN_PT_VRS2, "Temperature" , 295.15)
elements.property(elements.QUENTIN_PT_VRS2, "HeatConduct" , 255)
elements.property(elements.QUENTIN_PT_VRS2, "MenuVisible" , 1)
elements.property(elements.QUENTIN_PT_VRS2, "Color", 0xFF00FF)
function VRS2UPDATE(i,x,y,s,n)
type = tpt.get_property("ctype", x, y)
if type == 0 then
tpt.set_property("type", elements.QUENTIN_PT_VRS2, x + math.random(-1,1), y + math.random(-1,1))
end
end
tpt.element_func(VRS2UPDATE,elements.QUENTIN_PT_VRS2)