Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function rockUpdate(i, x, y, s, nt)
- r = sim.partID(x+math.random(-1,1),y+math.random(-1,1))
- if r~= nil then --1) LIME formation--
- if sim.partProperty(r, "type") == elem.DEFAULT_PT_SALT and math.random(1,250) == 1 then
- sim.partProperty(i, "type", elem.DEFAULT_PT_CNCT)
- sim.partProperty(r, "type", elem.DEFAULT_PT_CO2)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- end
- if sim.partProperty(r, "type") == elem.DEFAULT_PT_SLTW and math.random(1,50) == 1 then
- sim.partProperty(i, "type", elem.DEFAULT_PT_CNCT)
- sim.partProperty(r, "type", elem.DEFAULT_PT_CO2)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- end
- if sim.partProperty(r, "type") == elem.KEV_PT_CAC2 and math.random(1,650) == 1 then
- sim.partProperty(i, "type", elem.DEFAULT_PT_CNCT)
- sim.partProperty(r, "type", elem.DEFAULT_PT_CNCT)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- end
- if math.random(1,13650) == 1 then
- sim.partProperty(i, "type", elem.DEFAULT_PT_CNCT)
- sim.partProperty(r, "type", elem.DEFAULT_PT_CNCT)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- end --2) FE2O3 formation--
- if math.random(1,32745) == 1 then
- sim.partProperty(i, "type", elem.DEFAULT_PT_BRMT)
- sim.partProperty(r, "type", elem.DEFAULT_PT_BRMT)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- end --3) STNE formation--
- if math.random(1,21745) == 1 then
- sim.partProperty(i, "type", elem.DEFAULT_PT_STNE)
- sim.partProperty(r, "type", elem.DEFAULT_PT_STNE)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "n2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "n2")
- end --4) ROCK formation--
- if math.random(1,18945) == 1 then
- sim.partProperty(i, "type", elem.KEV_PT_ROCK)
- sim.partProperty(r, "type", elem.KEV_PT_ROCK)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- end --5) AL2O3 formation--
- if math.random(1,30590) == 1 then
- sim.partProperty(i, "type", elem.KEV_PT_AL2O3)
- sim.partProperty(r, "type", elem.KEV_PT_AL2O3)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- end --6) CLST formation--
- if math.random(1,97590) == 1 then
- sim.partProperty(i, "type", elem.DEFAULT_PT_CLST)
- sim.partProperty(r, "type", elem.DEFAULT_PT_CLST)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- end --10) SIO2 formation--
- if math.random(1,70250) == 1 then
- sim.partProperty(i, "type", elem.KEV_PT_SIO2)
- sim.partProperty(r, "type", elem.KEV_PT_SIO2)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- end --11) CUO formation--
- if math.random(1,80560) == 1 then
- sim.partProperty(i, "type", elem.KEV_PT_CUO)
- sim.partProperty(r, "type", elem.KEV_PT_CUO)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- end --12) BREL formation--
- if math.random(1,85650) == 1 then
- sim.partProperty(i, "type", elem.DEFAULT_PT_BREL)
- sim.partProperty(r, "type", elem.DEFAULT_PT_BREL)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "co2")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- end --13) ROCK reformation--
- if sim.partProperty(r, "type") == elem.DEFAULT_PT_STNE and math.random(1,10260) == 1 then
- sim.partProperty(i, "type", elem.KEV_PT_ROCK)
- sim.partKill(r)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "stne")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "stne")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "oxyg")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- end
- if sim.partProperty(r, "type") == elem.DEFAULT_PT_CNCT and math.random(1,58320) == 1 then
- sim.partProperty(i, "type", elem.KEV_PT_ROCK)
- sim.partProperty(r, "type", elem.KEV_PT_ROCK)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "stne")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "rock")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "oxyg")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- end
- if sim.partProperty(r, "type") == elem.DEFAULT_PT_BRMT and math.random(1,59400) == 1 then
- sim.partProperty(i, "type", elem.KEV_PT_ROCK)
- sim.partProperty(r, "type", elem.KEV_PT_ROCK)
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "stne")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "rock")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "oxyg")
- tpt.create(x+math.random(-1,1), y+math.random(-1,1), "c3h8")
- end --14) ROCK GAS and WATR porosity--
- if sim.partProperty(r, "type") == elem.DEFAULT_PT_WATR and math.random(1,3600) == 1 then
- sim.partProperty(i, "type", elem.DEFAULT_PT_WATR)
- sim.partProperty(r, "type", elem.KEV_PT_ROCK)
- end
- if sim.partProperty(r, "type") == elem.KEV_PT_CH4 and math.random(1,2350) == 1 then
- sim.partProperty(i, "type", elem.KEV_PT_CH4)
- sim.partProperty(r, "type", elem.KEV_PT_ROCK)
- end
- if sim.partProperty(r, "type") == elem.DEFAULT_PT_GAS and math.random(1,6880) == 1 then
- sim.partProperty(i, "type", elem.KEV_PT_CH4)
- sim.partProperty(r, "type", elem.KEV_PT_ROCK)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment