Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local a = elements.allocate("U235" , "U235")
- elements.element(a, elements.element(elements.DEFAULT_PT_PLUT))
- elements.property(a, "Name" , "U235")
- elements.property(a, "Description" , "Uranium 235")
- function plutonium(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-1,1), y + math.random(-1,1)) == tpt.el.neut.id then
- if math.random(1,3) == 1 then
- tpt.parts[i].type = tpt.el.neut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 2 then
- tpt.parts[i].type = tpt.el.exot.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x, y)
- elseif math.random(1,3) == 3 then
- tpt.parts[i].type = tpt.el.plut.id
- sim.pressure(x/4,y/4,75)
- tpt.set_property("temp", math.huge, x ,y)
- end
- end
- if sim.pressure(x/4,y/4) > 1 then
- if math.random(1,250) == 10 then
- tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'neut')
- end
- end
- end
- tpt.element_func(plutonium,a)
- function neutron(i,x,y,s,n)
- if tpt.get_property("type", x + math.random(-1,1), y + math.random(-1,1)) == a then
- if math.random(1,30) == 10 then
- tpt.create(x + math.random(-1,1), y + math.random(-1,1), 'neut')
- end
- end
- end
- tpt.element_func(neutron,tpt.el.neut.id)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement