Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mtwt = elem.allocate("MARKHUSS", "MTWT")
- elem.element(mtwt, elem.element(elem.DEFAULT_PT_DMND))
- elem.property(mtwt, "Name", "MTWT")
- elem.property(mtwt, "Description", "markHuss test water for ctype shenanigans")
- elem.property(mtwt, "Colour", 0x2030d0)
- elem.property(mtwt, "MenuVisible", 0)
- elem.property(mtwt, "MenuSection", elem.SC_SPECIAL)
- elem.property(mtwt, "Advection", 0.6)
- elem.property(mtwt, "AirDrag", 0.01)
- elem.property(mtwt, "AirLoss", 0.98)
- elem.property(mtwt, "Loss", 0.95)
- elem.property(mtwt, "Collision", 0)
- elem.property(mtwt, "Gravity", 0.1)
- elem.property(mtwt, "Diffusion", 0)
- elem.property(mtwt, "HotAir", 0)
- elem.property(mtwt, "Explosive", 0)
- elem.property(mtwt, "Flammable", 0)
- elem.property(mtwt, "Hardness", 20)
- elem.property(mtwt, "Meltable", 0)
- elem.property(mtwt, "Weight", 30)
- elem.property(mtwt, "HeatConduct", 29)
- elem.property(mtwt, "Temperature", 293.15)
- elem.property(mtwt, "Falldown", 2)
- elem.property(mtwt, "State", elem.ST_LIQUID)
- elem.property(mtwt, "Properties", elem.TYPE_LIQUID)
- elem.property(mtwt, "LowPressure", 10000)
- elem.property(mtwt, "LowPressureTransition", 0)
- elem.property(mtwt, "HighPressure", 10000)
- elem.property(mtwt, "HighPressureTransition", 0)
- elem.property(mtwt, "LowTemperature", 10000)
- elem.property(mtwt, "LowTemperatureTransition", 0)
- elem.property(mtwt, "HighTemperature", 10000)
- elem.property(mtwt, "HighTemperatureTransition", 0)
- elem.property(elem.DEFAULT_PT_WATR, "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)
- elem.property(mtwt, "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