Files
Bubberstation/code/game/objects/items/latexballoon.dm
SkyratBot f79e91462c [MIRROR] LINDA Reforged (#2573)
* LINDA Reforged

* Update airlock.dm

* Update biohazard_blob_controller.dm

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2021-01-08 18:52:35 +01:00

65 lines
1.7 KiB
Plaintext

/obj/item/latexballon
name = "latex glove"
desc = "Sterile and airtight."
icon_state = "latexballon"
inhand_icon_state = "lgloves"
force = 0
throwforce = 0
w_class = WEIGHT_CLASS_TINY
throw_speed = 1
throw_range = 7
var/state
var/datum/gas_mixture/air_contents = null
/obj/item/latexballon/ComponentInitialize()
. = ..()
AddElement(/datum/element/atmos_sensitive)
/obj/item/latexballon/proc/blow(obj/item/tank/tank, mob/user)
if (icon_state == "latexballon_bursted")
return
icon_state = "latexballon_blow"
inhand_icon_state = "latexballon"
user.update_inv_hands()
to_chat(user, "<span class='notice'>You blow up [src] with [tank].</span>")
air_contents = tank.remove_air_volume(3)
/obj/item/latexballon/should_atmos_process(datum/gas_mixture/air, exposed_temperature)
return (exposed_temperature > T0C+100)
/obj/item/latexballon/atmos_expose(datum/gas_mixture/air, exposed_temperature)
burst()
/obj/item/latexballon/proc/burst()
if (!air_contents || icon_state != "latexballon_blow")
return
playsound(src, 'sound/weapons/gun/pistol/shot.ogg', 100, TRUE)
icon_state = "latexballon_bursted"
inhand_icon_state = "lgloves"
if(isliving(loc))
var/mob/living/user = src.loc
user.update_inv_hands()
loc.assume_air(air_contents)
/obj/item/latexballon/ex_act(severity, target)
burst()
switch(severity)
if (1)
qdel(src)
if (2)
if (prob(50))
qdel(src)
/obj/item/latexballon/bullet_act(obj/projectile/P)
if(!P.nodamage)
burst()
return ..()
/obj/item/latexballon/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/tank))
var/obj/item/tank/T = W
blow(T, user)
return
if (W.get_sharpness() || W.get_temperature())
burst()