mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-20 15:12:57 +00:00
* Gun sound updates Grenade Launcher sound source: https://freesound.org/people/LeMudCrab/sounds/163458/ * Actually, this is a better way to handle this. * Fixed accidental inconsistent indentation * Renames shotgun.ogg to Gunshot_shotgun.ogg Also actually changes the file names like I was supposed to last night. * *peers* Didn't I just fix this shit? * Actually fixes the missing files this time * Update audible_deception.dm * Changed tungsten core projectile sound by request * Actually no this line is stupid and makes me angry Simplifies dumb code that was badly copypasted. Also fixed missing D'eagle fire_sound * Smarter code Less copypasta, more runtimes prevented in case somebody decides to make a soundless gun whether done intentionally or not. * Update gun.dm
64 lines
1.6 KiB
Plaintext
64 lines
1.6 KiB
Plaintext
/obj/item/latexballon
|
|
name = "latex glove"
|
|
desc = "A latex glove, usually used as a balloon."
|
|
icon_state = "latexballon"
|
|
item_icons = list(
|
|
slot_l_hand_str = 'icons/mob/items/lefthand_gloves.dmi',
|
|
slot_r_hand_str = 'icons/mob/items/righthand_gloves.dmi',
|
|
)
|
|
item_state = "lgloves"
|
|
force = 0
|
|
throwforce = 0
|
|
w_class = ITEMSIZE_SMALL
|
|
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_old.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()
|
|
|
|
/*
|
|
/obj/item/latexballon/nitrile
|
|
name = "nitrile glove"
|
|
desc = "A nitrile glove, usually used as a balloon."
|
|
icon_state = "nitrileballon"
|
|
item_icons = list(
|
|
slot_l_hand_str = 'icons/mob/items/lefthand_gloves.dmi',
|
|
slot_r_hand_str = 'icons/mob/items/righthand_gloves.dmi',
|
|
)
|
|
item_state = "ngloves"
|
|
*/ |