Files
Polaris/code/game/objects/items/latexballoon.dm
PsiOmega 1ae0ad6d92 Updates the atom_pool, now datum_pool, to handle any datum object.
Makes the garbage collector similarly robust. Continues the whole Destroy/qdel porting.
2015-04-24 09:59:05 +02:00

49 lines
1.1 KiB
Plaintext

/obj/item/latexballon
name = "latex glove"
desc = "A latex glove, usually used as a balloon."
icon_state = "latexballon"
item_state = "lgloves"
force = 0
throwforce = 0
w_class = 2.0
throw_speed = 1
throw_range = 15
var/state
var/datum/gas_mixture/air_contents = null
/obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank)
if (icon_state == "latexballon_bursted")
return
src.air_contents = tank.remove_air_volume(3)
icon_state = "latexballon_blow"
item_state = "latexballon"
/obj/item/latexballon/proc/burst()
if (!air_contents)
return
playsound(src, 'sound/weapons/Gunshot.ogg', 100, 1)
icon_state = "latexballon_bursted"
item_state = "lgloves"
loc.assume_air(air_contents)
/obj/item/latexballon/ex_act(severity)
burst()
switch(severity)
if (1)
qdel(src)
if (2)
if (prob(50))
qdel(src)
/obj/item/latexballon/bullet_act()
burst()
/obj/item/latexballon/fire_act(datum/gas_mixture/air, temperature, volume)
if(temperature > T0C+100)
burst()
return
/obj/item/latexballon/attackby(obj/item/W as obj, mob/user as mob)
if (can_puncture(W))
burst()