Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Be = elem.allocate("YOL0", "BERY")
- elem.element(Be, elem.element(elem.DEFAULT_PT_METL))
- elem.property(Be, "Name", "BERY")
- elem.property(Be, "Description", "Beryllium, breaks into slightly toxic dust.")
- elem.property(Be, "Color", 0x669999)
- elem.property(Be, "MenuSection", elem.SC_SOLIDS)
- local function beryllium(i, x, y, s, nt)
- if sim.pressure(x/4, y/4) >= 1 then
- sim.partChangeType(i, elem.DEFAULT_PT_BRMT)
- sim.partProperty(i, "tmp", 1)
- end
- end
- elem.property(Be, "Update", beryllium)
- local function broken(i, x, y, s, nt)
- r = sim.partID(math.random(x-1, x+1), math.random(y-1, y+1))
- if r ~= nil then
- if sim.partProperty(r, "type") == elem.DEFAULT_PT_BREC then
- sim.partChangeType(i, elem.DEFAULT_PT_THRM)
- sim.partChangeType(r, elem.DEFAULT_PT_THRM)
- elseif sim.partProperty(r, "type") == elem.DEFAULT_PT_STKM or sim.partProperty(r, "type") == elem.DEFAULT_PT_STK2 or sim.partProperty(r, "type") == elem.DEFAULT_PT_FIGH then
- if sim.partProperty(i, "tmp") == 1 then
- sim.partProperty(r, "life", sim.partProperty(r, "life")-1)
- end
- end
- end
- end
- elem.property(elem.DEFAULT_PT_BRMT, "HighTemperatureTransition", NT)
- elem.property(elem.DEFAULT_PT_BRMT, "Update", broken)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement