Guest User

Untitled

a guest
Aug 18th, 2019
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.87 KB | None | 0 0
  1.    local function rockUpdate(i, x, y, s, nt)
  2.     r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
  3.      if r~= nil then --1) LIME formation--
  4.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_SALT and math.random(1,250) == 1 then
  5.                 sim.partProperty(i, "type", elem.DEFAULT_PT_CNCT)
  6.                 sim.partProperty(r, "type", elem.DEFAULT_PT_CO2)
  7.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  8.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  9.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  10.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  11.                 end
  12.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_SLTW and math.random(1,50) == 1 then
  13.                 sim.partProperty(i, "type", elem.DEFAULT_PT_CNCT)
  14.                 sim.partProperty(r, "type", elem.DEFAULT_PT_CO2)
  15.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  16.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  17.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  18.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  19.                 end
  20.              if sim.partProperty(r, "type") == elem.KEV_PT_CAC2 and math.random(1,650) == 1 then
  21.                 sim.partProperty(i, "type", elem.DEFAULT_PT_CNCT)
  22.                 sim.partProperty(r, "type", elem.DEFAULT_PT_CNCT)
  23.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  24.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  25.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  26.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  27.                 end
  28.              if math.random(1,13650) == 1 then
  29.                 sim.partProperty(i, "type", elem.DEFAULT_PT_CNCT)
  30.                 sim.partProperty(r, "type", elem.DEFAULT_PT_CNCT)
  31.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  32.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  33.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  34.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  35.                 end --2) FE2O3 formation--
  36.              if math.random(1,32745) == 1 then
  37.                 sim.partProperty(i, "type", elem.DEFAULT_PT_BRMT)
  38.                 sim.partProperty(r, "type", elem.DEFAULT_PT_BRMT)
  39.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  40.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  41.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  42.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  43.                 end --3) STNE formation--
  44.              if math.random(1,21745) == 1 then
  45.                 sim.partProperty(i, "type", elem.DEFAULT_PT_STNE)
  46.                 sim.partProperty(r, "type", elem.DEFAULT_PT_STNE)
  47.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  48.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  49.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "n2")
  50.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "n2")
  51.                 end --4) ROCK formation--
  52.              if math.random(1,18945) == 1 then
  53.                 sim.partProperty(i, "type", elem.KEV_PT_ROCK)
  54.                 sim.partProperty(r, "type", elem.KEV_PT_ROCK)
  55.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  56.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  57.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  58.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  59.                 end  --5) AL2O3 formation--
  60.              if math.random(1,30590) == 1 then
  61.                 sim.partProperty(i, "type", elem.KEV_PT_AL2O3)
  62.                 sim.partProperty(r, "type", elem.KEV_PT_AL2O3)
  63.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  64.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  65.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  66.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  67.                 end  --6) CLST formation--
  68.              if math.random(1,97590) == 1 then
  69.                 sim.partProperty(i, "type", elem.DEFAULT_PT_CLST)
  70.                 sim.partProperty(r, "type", elem.DEFAULT_PT_CLST)
  71.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  72.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  73.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  74.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  75.                 end  --10) SIO2 formation--
  76.              if math.random(1,70250) == 1 then
  77.                 sim.partProperty(i, "type", elem.KEV_PT_SIO2)
  78.                 sim.partProperty(r, "type", elem.KEV_PT_SIO2)
  79.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  80.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  81.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  82.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  83.                 end   --11) CUO formation--
  84.              if math.random(1,80560) == 1 then
  85.                 sim.partProperty(i, "type", elem.KEV_PT_CUO)
  86.                 sim.partProperty(r, "type", elem.KEV_PT_CUO)
  87.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  88.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  89.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  90.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  91.                 end --12) BREL formation--
  92.              if math.random(1,85650) == 1 then
  93.                 sim.partProperty(i, "type", elem.DEFAULT_PT_BREL)
  94.                 sim.partProperty(r, "type", elem.DEFAULT_PT_BREL)
  95.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  96.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
  97.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  98.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  99.                 end  --13) ROCK reformation--
  100.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_STNE and math.random(1,10260) == 1 then
  101.                 sim.partProperty(i, "type", elem.KEV_PT_ROCK)
  102.                 sim.partKill(r)
  103.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "stne")
  104.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "stne")
  105.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "oxyg")
  106.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  107.                 end
  108.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_CNCT and math.random(1,58320) == 1 then
  109.                 sim.partProperty(i, "type", elem.KEV_PT_ROCK)
  110.                 sim.partProperty(r, "type", elem.KEV_PT_ROCK)
  111.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "stne")
  112.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "rock")
  113.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "oxyg")
  114.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  115.                 end
  116.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_BRMT and math.random(1,59400) == 1 then
  117.                 sim.partProperty(i, "type", elem.KEV_PT_ROCK)
  118.                 sim.partProperty(r, "type", elem.KEV_PT_ROCK)
  119.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "stne")
  120.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "rock")
  121.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "oxyg")
  122.                 tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
  123.                 end  --14) ROCK GAS and WATR porosity--
  124.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_WATR and math.random(1,3600) == 1 then
  125.                 sim.partProperty(i, "type", elem.DEFAULT_PT_WATR)
  126.                 sim.partProperty(r, "type", elem.KEV_PT_ROCK)
  127.                 end
  128.              if sim.partProperty(r, "type") == elem.KEV_PT_CH4 and math.random(1,2350) == 1 then
  129.                 sim.partProperty(i, "type", elem.KEV_PT_CH4)
  130.                 sim.partProperty(r, "type", elem.KEV_PT_ROCK)
  131.                 end
  132.              if sim.partProperty(r, "type") == elem.DEFAULT_PT_GAS and math.random(1,6880) == 1 then
  133.                 sim.partProperty(i, "type", elem.KEV_PT_CH4)
  134.                 sim.partProperty(r, "type", elem.KEV_PT_ROCK)
  135.                 end
  136.      end
  137.     end
Advertisement
Add Comment
Please, Sign In to add comment