Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local nmeta = {}
- nmeta.property = function(self,...) return elem.property(self,...) end
- nmeta.element = function(self,...) return elem.element(self,...) end
- nmeta.__call = print
- nmeta.__index = nmeta
- debug.setmetatable(0,nmeta)
- local mtwt = elem.allocate("MARKHUSS", "MTWT")
- mtwt:element(elem.element(elem.DEFAULT_PT_DMND))
- mtwt:property("Name", "MTWT")
- mtwt:property("Description", "markHuss test water for ctype shenanigans")
- mtwt:property("Colour", 0x2030d0)
- mtwt:property("MenuVisible", 0)
- mtwt:property("MenuSection", elem.SC_SPECIAL)
- mtwt:property("Advection", 0.6)
- mtwt:property("AirDrag", 0.01)
- mtwt:property("AirLoss", 0.98)
- mtwt:property("Loss", 0.95)
- mtwt:property("Collision", 0)
- mtwt:property("Gravity", 0.1)
- mtwt:property("Diffusion", 0)
- mtwt:property("HotAir", 0)
- mtwt:property("Explosive", 0)
- mtwt:property("Flammable", 0)
- mtwt:property("Hardness", 20)
- mtwt:property("Meltable", 0)
- mtwt:property("Weight", 30)
- mtwt:property("HeatConduct", 29)
- mtwt:property("Temperature", 293.15)
- mtwt:property("Falldown", 2)
- mtwt:property("State", elem.ST_LIQUID)
- mtwt:property("Properties", elem.TYPE_LIQUID)
- mtwt:property("LowPressure", 10000)
- mtwt:property("LowPressureTransition", 0)
- mtwt:property("HighPressure", 10000)
- mtwt:property("HighPressureTransition", 0)
- mtwt:property("LowTemperature", 10000)
- mtwt:property("LowTemperatureTransition", 0)
- mtwt:property("HighTemperature", 10000)
- mtwt:property("HighTemperatureTransition", 0)
- elem.DEFAULT_PT_WATR:property("Update", function(i, x, y, ss, nt)
- local close = nt - ss
- if close >= 4 then
- local neighbour = sim.partID(x, y + 1)
- if neighbour then
- local neighbour_ctype = sim.partProperty(neighbour, "ctype")
- if neighbour_ctype ~= elem.DEFAULT_PT_WATR then
- sim.partKill(x, y + 1)
- local repl = sim.partCreate(-3, x, y + 1, elem.DEFAULT_PT_WATR)
- if repl ~= -1 then
- sim.partProperty(repl, "ctype", neighbour_ctype)
- sim.partProperty(repl, "dcolour", sim.decoColour(
- neighbour_ctype * 2,
- close * 45,
- neighbour_ctype * 2 + close * 20
- ))
- end
- end
- end
- end
- end, 1)
- mtwt:property("Graphics", function(i, colr, colg, colb)
- return 1, ren.PMODE_FLAT, 255, colr, colg, colb, 0, 0, 0, 0
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement