Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Kerosine, rocket fuel.
- local element1 = elements.allocate("L0L", "KERO")
- elements.element(elements.L0L_PT_KERO, elements.element(elements.DEFAULT_PT_BCOL))
- elements.property(elements.L0L_PT_KERO, "Name", "KERO")
- elements.property(elements.L0L_PT_KERO, "Description", "Kerosine, burns very hot, used in rocket fuel.")
- elements.property(elements.L0L_PT_KERO, "Colour", 0x3399ff)
- elements.property(elements.L0L_PT_KERO, "MenuSection", elem.SC_EXPLOSIVE)
- elements.property(elements.L0L_PT_KERO, "Gravity", .5)
- elements.property(elements.L0L_PT_KERO, "Flammable", 0)
- elements.property(elements.L0L_PT_KERO, "Explosive", 0)
- elements.property(elements.L0L_PT_KERO, "Loss", 1)
- elements.property(elements.L0L_PT_KERO, "Falldown", 2)
- elements.property(elements.L0L_PT_KERO, "AirLoss", .5)
- elements.property(elements.L0L_PT_KERO, "AirDrag", .01)
- elements.property(elements.L0L_PT_KERO, "Advection", .01)
- elements.property(elements.L0L_PT_KERO, "Weight", 50)
- elements.property(elements.L0L_PT_KERO, "Diffusion", 0)
- KEROUpdate = function(i, x, y, s, n)
- local clife = tpt.get_property('life', x, y)
- if clife > 1 then
- for cx = -1, 1, 2 do
- for cy = -1, 1, 2 do
- tpt.create(x + cx, y + cy, 'plsm')
- end
- end
- tpt.set_property('life', clife - 1, x, y)
- elseif clife == 1 then
- tpt.set_property('type', 0, x, y)
- elseif s > 0 then
- for cx = -1, 1, 2 do
- for cy = -1, 1, 2 do
- if tpt.get_property('type', x + cx, y + cy) == 4 or tpt.get_property('type', x + cx, y + cy) == 49 then
- tpt.set_property('life', 20, x, y)
- return true
- end
- end
- end
- end
- end
- tpt.element_func(KEROUpdate, tpt.element('kero'))
- --Acidic napalm
- local element2 = elements.allocate("L0L", "CHEM")
- elements.element(elements.L0L_PT_CHEM, elements.element(elements.DEFAULT_PT_BCOL))
- elements.property(elements.L0L_PT_CHEM, "Name", "CHEM")
- elements.property(elements.L0L_PT_CHEM, "Description", "Toxic chemicals, release CAUS when in contact with fire.")
- elements.property(elements.L0L_PT_CHEM, "Colour", 0xccff33)
- elements.property(elements.L0L_PT_CHEM, "MenuSection", elem.SC_LIQUID)
- elements.property(elements.L0L_PT_CHEM, "Gravity", .5)
- elements.property(elements.L0L_PT_CHEM, "Flammable", 0)
- elements.property(elements.L0L_PT_CHEM, "Explosive", 0)
- elements.property(elements.L0L_PT_CHEM, "Loss", 1)
- elements.property(elements.L0L_PT_CHEM, "Falldown", 2)
- elements.property(elements.L0L_PT_CHEM, "AirLoss", .5)
- elements.property(elements.L0L_PT_CHEM, "AirDrag", .01)
- elements.property(elements.L0L_PT_CHEM, "Advection", .01)
- elements.property(elements.L0L_PT_CHEM, "Weight", 50)
- elements.property(elements.L0L_PT_CHEM, "Diffusion", 0)
- elements.property(elements.L0L_PT_CHEM, "Hardness", 0)
- CHEMUpdate = function(i, x, y, s, n)
- local clife = tpt.get_property('life', x, y)
- if clife > 1 then
- for cx = -1, 1, 2 do
- for cy = -1, 1, 2 do
- tpt.create(x + cx, y + cy, 'caus')
- end
- end
- tpt.set_property('life', clife - 1, x, y)
- elseif clife == 1 then
- tpt.set_property('type', elem.DEFAULT_PT_ACID, x, y)
- elseif s > 0 then
- for cx = -1, 1, 2 do
- for cy = -1, 1, 2 do
- if tpt.get_property('type', x + cx, y + cy) == 4 or tpt.get_property('type', x + cx, y + cy) == 49 or tpt.get_property('type', x + cx, y + cy) == elem.DEFAULT_PT_CAUS or tpt.get_property('type', x + cx, y + cy) == elem.DEFAULT_PT_ACID then
- tpt.set_property('life', 20, x, y)
- return true
- end
- end
- end
- end
- end
- tpt.element_func(CHEMUpdate, tpt.element('chem'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement