Advertisement
LBPHacker

.23434/3

Jun 9th, 2019
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local mtwt = elem.allocate("MARKHUSS", "MTWT")
  2. elem.element(mtwt, elem.element(elem.DEFAULT_PT_DMND))
  3. elem.property(mtwt, "Name", "MTWT")
  4. elem.property(mtwt, "Description", "markHuss test water for ctype shenanigans")
  5. elem.property(mtwt, "Colour", 0x2030d0)
  6. elem.property(mtwt, "MenuVisible", 0)
  7. elem.property(mtwt, "MenuSection", elem.SC_SPECIAL)
  8. elem.property(mtwt, "Advection", 0.6)
  9. elem.property(mtwt, "AirDrag", 0.01)
  10. elem.property(mtwt, "AirLoss", 0.98)
  11. elem.property(mtwt, "Loss", 0.95)
  12. elem.property(mtwt, "Collision", 0)
  13. elem.property(mtwt, "Gravity", 0.1)
  14. elem.property(mtwt, "Diffusion", 0)
  15. elem.property(mtwt, "HotAir", 0)
  16. elem.property(mtwt, "Explosive", 0)
  17. elem.property(mtwt, "Flammable", 0)
  18. elem.property(mtwt, "Hardness", 20)
  19. elem.property(mtwt, "Meltable", 0)
  20. elem.property(mtwt, "Weight", 30)
  21. elem.property(mtwt, "HeatConduct", 29)
  22. elem.property(mtwt, "Temperature", 293.15)
  23. elem.property(mtwt, "Falldown", 2)
  24. elem.property(mtwt, "State", elem.ST_LIQUID)
  25. elem.property(mtwt, "Properties", elem.TYPE_LIQUID)
  26. elem.property(mtwt, "LowPressure", 10000)
  27. elem.property(mtwt, "LowPressureTransition", 0)
  28. elem.property(mtwt, "HighPressure", 10000)
  29. elem.property(mtwt, "HighPressureTransition", 0)
  30. elem.property(mtwt, "LowTemperature", 10000)
  31. elem.property(mtwt, "LowTemperatureTransition", 0)
  32. elem.property(mtwt, "HighTemperature", 10000)
  33. elem.property(mtwt, "HighTemperatureTransition", 0)
  34. elem.property(elem.DEFAULT_PT_WATR, "Update", function(i, x, y, ss, nt)
  35.     local close = nt - ss
  36.     if close >= 4 then
  37.         local neighbour = sim.partID(x, y + 1)
  38.         if neighbour then
  39.             local neighbour_ctype = sim.partProperty(neighbour, "ctype")
  40.             if neighbour_ctype ~= elem.DEFAULT_PT_WATR then
  41.                 sim.partKill(x, y + 1)
  42.                 local repl = sim.partCreate(-3, x, y + 1, elem.DEFAULT_PT_WATR)
  43.                 if repl ~= -1 then
  44.                     sim.partProperty(repl, "ctype", neighbour_ctype)
  45.                     sim.partProperty(repl, "dcolour", sim.decoColour(
  46.                         neighbour_ctype * 2,
  47.                         close * 45,
  48.                         neighbour_ctype * 2 + close * 20
  49.                     ))
  50.                 end
  51.             end
  52.         end
  53.     end
  54. end, 1)
  55. elem.property(mtwt, "Graphics", function(i, colr, colg, colb)
  56.     return 1, ren.PMODE_FLAT, 255, colr, colg, colb, 0, 0, 0, 0
  57. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement