Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Nokia element v 1.0
- Blocks pressure and temperature and it's a particle.
- It's also a powder and a solid at the same time!
- (cool it down to 0.00 C or below to make it a solid)
- okay until this doesn't work let's do it differently
- I can't get pressure blocking without TTAN's update function, so let's
- just use TTAN itself?
- local el = elements.allocate("packedbread", "NOKI")
- elements.element(el, elements.element(elements.DEFAULT_PT_TTAN))
- elements.property(el, "Weight", "45")
- elements.property(el, "State", elements.ST_SOLID)
- elements.property(el, "HeatConduct", "0")
- elements.property(el, "Meltable", "0")
- elements.property(el, "Hardness", "0")
- elements.property(el, "Gravity", "1")
- elements.property(el, "Falldown", "1")
- elements.property(el, "Diffusion", "1")
- elements.property(el, "Properties", bit.bor(elements.TYPE_PART, elements.PROP_BLACK, elements.PROP_NOAMBHEAT, elements.PROP_NEUTABSORB))
- elements.property(el, "Name", "NOKI")
- elements.property(el, "Description", "Nokias. Invulnerable. Don't conduct heat or pressure.")
- elements.property(el, "Colour", 0xDEADBEEF)
- elements.property(el, "MenuVisible", 1)
- elements.property(el, "MenuSection", elements.SC_SPECIAL)
- --]]--
- tpt.el.ttan.colour = 0xDEADBEEF
- tpt.el.ttan.name = "COCK"
- tpt.el.ttan.description = "Nokias. Survive anything. Block everything."
- tpt.el.ttan.meltable = 0
- tpt.el.ttan.hconduct = 0
- tpt.el.ttan.weight = 45
- tpt.el.ttan.gravity = 1
- tpt.el.ttan.falldown = 1
- tpt.el.ttan.diffusion = 1
- tpt.el.ttan.properties = bit.bor(elements.TYPE_PART, elements.PROP_BLACK, elements.PROP_NOAMBHEAT, elements.PROP_NEUTABSORB)
- tpt.el.ttan.msection = elements.SC_SPECIAL
- function el_Update(index, partx, party, surround_space, nt)
- -- Stand still stolen from EXOT
- if sim.partProperty(index, "temp") < 273.15 then
- sim.partProperty(index, "vx", 0)
- sim.partProperty(index, "vy", 0)
- end
- --[[--
- -- Pressure blocking stolen from TTAN
- local ttan = 0
- if nt <= 2 then
- ttan = 2
- else if sim.partProperty(index, "tmp") then
- ttan = 2
- else if nt <= 6 then
- for ry=-1,1,1 do
- for rx=-1,1,1 do
- if sim.partProperty(sim.partID(x, y), "type") == "TTAN" then
- ttan = ttan + 1
- end
- end
- end
- end
- if ttan >= 2 then
- --!! waits for pv blocking code
- end
- --]]--
- return 0
- end
- tpt.element_func(el_Update, tpt.element("ttan"))--, el)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement