mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 13:42:44 +00:00
Adds holster, lighter, and seatbelt sounds from World Server.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
slot = ACCESSORY_SLOT_TORSO //Legacy/balance purposes
|
||||
concealed_holster = 1
|
||||
var/obj/item/holstered = null
|
||||
var/holster_in = 'sound/items/holsterin.ogg'
|
||||
var/holster_out = 'sound/items/holsterout.ogg'
|
||||
|
||||
/obj/item/clothing/accessory/holster/proc/holster(var/obj/item/I, var/mob/living/user)
|
||||
if(holstered && istype(user))
|
||||
@@ -15,6 +17,9 @@
|
||||
to_chat(user, "<span class='warning'>[I] won't fit in [src]!</span>")
|
||||
return
|
||||
|
||||
if(holster_in)
|
||||
playsound(get_turf(src), holster_in, 50)
|
||||
|
||||
if(istype(user))
|
||||
user.stop_aiming(no_message=1)
|
||||
holstered = I
|
||||
@@ -36,7 +41,9 @@
|
||||
if(istype(user.get_active_hand(),/obj) && istype(user.get_inactive_hand(),/obj))
|
||||
to_chat(user, "<span class='warning'>You need an empty hand to draw \the [holstered]!</span>")
|
||||
else
|
||||
var/sound_vol = 25
|
||||
if(user.a_intent == I_HURT)
|
||||
sound_vol = 50
|
||||
usr.visible_message(
|
||||
"<span class='danger'>[user] draws \the [holstered], ready to shoot!</span>",
|
||||
"<span class='warning'>You draw \the [holstered], ready to shoot!</span>"
|
||||
@@ -46,6 +53,10 @@
|
||||
"<span class='notice'>[user] draws \the [holstered], pointing it at the ground.</span>",
|
||||
"<span class='notice'>You draw \the [holstered], pointing it at the ground.</span>"
|
||||
)
|
||||
|
||||
if(holster_out)
|
||||
playsound(get_turf(src), holster_out, sound_vol)
|
||||
|
||||
user.put_in_hands(holstered)
|
||||
holstered.add_fingerprint(user)
|
||||
w_class = initial(w_class)
|
||||
|
||||
Reference in New Issue
Block a user