Merge branch 'master' into Arokha/offtherails

This commit is contained in:
Aronai Sieyes
2020-05-30 16:27:44 -04:00
committed by GitHub
375 changed files with 1896 additions and 1821 deletions

View File

@@ -134,7 +134,7 @@
AC.loc = src
stored_ammo.Insert(1, AC) //add it to the head of our magazine's list
L.update_icon()
playsound(user.loc, 'sound/weapons/flipblade.ogg', 50, 1)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
// This dumps all the bullets right on the floor
@@ -144,11 +144,11 @@
to_chat(user, "<span class='notice'>[src] is already empty!</span>")
return
to_chat(user, "<span class='notice'>You empty [src].</span>")
playsound(user.loc, "casing_sound", 50, 1)
playsound(src, "casing_sound", 50, 1)
spawn(7)
playsound(user.loc, "casing_sound", 50, 1)
playsound(src, "casing_sound", 50, 1)
spawn(10)
playsound(user.loc, "casing_sound", 50, 1)
playsound(src, "casing_sound", 50, 1)
for(var/obj/item/ammo_casing/C in stored_ammo)
C.loc = user.loc
C.set_dir(pick(cardinal))

View File

@@ -493,7 +493,7 @@
user.visible_message("*click click*", "<span class='danger'>*click*</span>")
else
src.visible_message("*click click*")
playsound(src.loc, 'sound/weapons/empty.ogg', 100, 1)
playsound(src, 'sound/weapons/empty.ogg', 100, 1)
// Called when the user is about to fire.
// Moved from handle_post_fire() because if using a laser, the message for when someone got shot would show up before the firing message.
@@ -643,9 +643,9 @@
return
if(silenced)
playsound(user, shot_sound, 10, 1)
playsound(src, shot_sound, 10, 1)
else
playsound(user, shot_sound, 50, 1)
playsound(src, shot_sound, 50, 1)
//Suicide handling.
/obj/item/weapon/gun/var/mouthshoot = 0 //To stop people from suiciding twice... >.>

View File

@@ -127,7 +127,7 @@
power_supply = P
P.loc = src
user.visible_message("[user] inserts [P] into [src].", "<span class='notice'>You insert [P] into [src].</span>")
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
update_held_icon()
else
@@ -143,7 +143,7 @@
power_supply.update_icon()
user.visible_message("[user] removes [power_supply] from [src].", "<span class='notice'>You remove [power_supply] from [src].</span>")
power_supply = null
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
update_icon()
update_held_icon()
else

View File

@@ -150,7 +150,7 @@
user.visible_message("*fizzle*", "<span class='danger'>*fizzle*</span>")
else
src.visible_message("*fizzle*")
playsound(src.loc, 'sound/effects/sparks1.ogg', 100, 1)
playsound(src, 'sound/effects/sparks1.ogg', 100, 1)
/*
/obj/item/weapon/gun/energy/staff/animate
name = "staff of animation"

View File

@@ -61,7 +61,7 @@
grenades.len--
user.put_in_hands(G)
user.visible_message("[user] removes \a [G] from [src].", "<span class='notice'>You remove \a [G] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
to_chat(user, "<span class='warning'>[src] is empty.</span>")
@@ -119,7 +119,7 @@
if(chambered)
user.put_in_hands(chambered)
user.visible_message("[user] removes \a [chambered] from [src].", "<span class='notice'>You remove \a [chambered] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
chambered = null
else
to_chat(user, "<span class='warning'>[src] is empty.</span>")

View File

@@ -53,7 +53,7 @@
item_storage.remove_from_storage(removing, src.loc)
user.put_in_hands(removing)
to_chat(user, "You remove [removing] from the hopper.")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
to_chat(user, "There is nothing to remove in \the [src].")

View File

@@ -30,7 +30,7 @@
/obj/item/weapon/syringe_cartridge/attack_self(mob/user)
if(syringe)
to_chat(user, "<span class='notice'>You remove [syringe] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
user.put_in_hands(syringe)
syringe = null
sharp = initial(sharp)
@@ -97,7 +97,7 @@
user.visible_message("[user] unlatches and carefully relaxes the bolt on [src].", "<span class='warning'>You unlatch and carefully relax the bolt on [src], unloading the spring.</span>")
next = null
else if(darts.len)
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
user.visible_message("[user] draws back the bolt on [src], clicking it into place.", "<span class='warning'>You draw back the bolt on the [src], loading the spring!</span>")
next = darts[1]
add_fingerprint(user)
@@ -114,7 +114,7 @@
darts -= C
user.put_in_hands(C)
user.visible_message("[user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
..()

View File

@@ -58,7 +58,7 @@
removing.forceMove(get_turf(src))
user.put_in_hands(removing)
user.visible_message("<span class='notice'>\The [user] removes \the [removing] from \the [src].</span>")
playsound(loc, 'sound/machines/click.ogg', 10, 1)
playsound(src, 'sound/machines/click.ogg', 10, 1)
update_icon()
return
. = ..()
@@ -84,7 +84,7 @@
cell = thing
user.drop_from_inventory(cell)
cell.forceMove(src)
playsound(loc, 'sound/machines/click.ogg', 10, 1)
playsound(src, 'sound/machines/click.ogg', 10, 1)
user.visible_message("<span class='notice'>\The [user] slots \the [cell] into \the [src].</span>")
update_icon()
return
@@ -95,7 +95,7 @@
manipulator.forceMove(get_turf(src))
user.put_in_hands(manipulator)
user.visible_message("<span class='notice'>\The [user] levers \the [manipulator] from \the [src].</span>")
playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
manipulator = null
update_icon()
return
@@ -106,7 +106,7 @@
capacitor.forceMove(get_turf(src))
user.put_in_hands(capacitor)
user.visible_message("<span class='notice'>\The [user] unscrews \the [capacitor] from \the [src].</span>")
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
capacitor = null
update_icon()
return
@@ -118,7 +118,7 @@
capacitor = thing
user.drop_from_inventory(capacitor)
capacitor.forceMove(src)
playsound(loc, 'sound/machines/click.ogg', 10, 1)
playsound(src, 'sound/machines/click.ogg', 10, 1)
power_per_tick = (power_cost*0.15) * capacitor.rating
user.visible_message("<span class='notice'>\The [user] slots \the [capacitor] into \the [src].</span>")
update_icon()
@@ -131,7 +131,7 @@
manipulator = thing
user.drop_from_inventory(manipulator)
manipulator.forceMove(src)
playsound(loc, 'sound/machines/click.ogg', 10,1)
playsound(src, 'sound/machines/click.ogg', 10,1)
mat_cost = initial(mat_cost) % (2*manipulator.rating)
user.visible_message("<span class='notice'>\The [user] slots \the [manipulator] into \the [src].</span>")
update_icon()
@@ -154,14 +154,14 @@
if(mat_storage + 2000 <= max_mat_storage && do_after(user,1.5 SECONDS))
can_hold_val ++
mat_storage += 2000
playsound(loc, 'sound/effects/phasein.ogg', 15, 1)
playsound(src, 'sound/effects/phasein.ogg', 15, 1)
else
loading = FALSE
break
M.use(can_hold_val)
user.visible_message("<span class='notice'>\The [user] loads \the [src] with \the [M].</span>")
playsound(loc, 'sound/weapons/flipblade.ogg', 50, 1)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
return
. = ..()

View File

@@ -155,7 +155,7 @@
cell = thing
user.drop_from_inventory(cell)
cell.forceMove(src)
playsound(loc, 'sound/machines/click.ogg', 10, 1)
playsound(src, 'sound/machines/click.ogg', 10, 1)
user.visible_message("<span class='notice'>\The [user] slots \the [cell] into \the [src].</span>")
update_icon()
return
@@ -167,7 +167,7 @@
capacitor.forceMove(get_turf(src))
user.put_in_hands(capacitor)
user.visible_message("<span class='notice'>\The [user] unscrews \the [capacitor] from \the [src].</span>")
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
capacitor = null
update_icon()
return
@@ -179,7 +179,7 @@
capacitor = thing
user.drop_from_inventory(capacitor)
capacitor.forceMove(src)
playsound(loc, 'sound/machines/click.ogg', 10, 1)
playsound(src, 'sound/machines/click.ogg', 10, 1)
power_per_tick = (power_cost*0.15) * capacitor.rating
user.visible_message("<span class='notice'>\The [user] slots \the [capacitor] into \the [src].</span>")
update_icon()
@@ -203,7 +203,7 @@
ammo.use(1)
user.visible_message("<span class='notice'>\The [user] loads \the [src] with \the [loaded].</span>")
playsound(loc, 'sound/weapons/flipblade.ogg', 50, 1)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
return
. = ..()
@@ -223,7 +223,7 @@
removing.forceMove(get_turf(src))
user.put_in_hands(removing)
user.visible_message("<span class='notice'>\The [user] removes \the [removing] from \the [src].</span>")
playsound(loc, 'sound/machines/click.ogg', 10, 1)
playsound(src, 'sound/machines/click.ogg', 10, 1)
update_icon()
return
. = ..()
@@ -292,7 +292,7 @@
removable_components = FALSE
spawn(15)
audible_message("<span class='critical'>\The [src]'s power supply begins to overload as the device crumples!</span>") //Why are you still holding this?
playsound(loc, 'sound/effects/grillehit.ogg', 10, 1)
playsound(src, 'sound/effects/grillehit.ogg', 10, 1)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
var/turf/T = get_turf(src)
sparks.set_up(2, 1, T)

View File

@@ -45,7 +45,7 @@
return
user.visible_message("<span class='notice'>\The [user] welds the barrel of \the [src] into place.</span>")
playsound(src.loc, 'sound/items/Welder2.ogg', 100, 1)
playsound(src, 'sound/items/Welder2.ogg', 100, 1)
increment_construction_stage()
return
@@ -68,7 +68,7 @@
if(thing.is_screwdriver() && construction_stage >= 9)
user.visible_message("<span class='notice'>\The [user] secures \the [src] and finishes it off.</span>")
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
var/obj/item/weapon/gun/magnetic/coilgun = new(loc)
var/put_in_hands
var/mob/M = src.loc

View File

@@ -142,7 +142,7 @@
power_supply = P
P.loc = src
user.visible_message("[user] inserts [P] into [src].", "<span class='notice'>You insert [P] into [src].</span>")
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
update_held_icon()
return

View File

@@ -89,7 +89,7 @@
return
else
chambered.loc = get_turf(src)
playsound(src.loc, "casing", 50, 1)
playsound(src, "casing", 50, 1)
if(CYCLE_CASINGS) //cycle the casing back to the end.
if(ammo_magazine)
ammo_magazine.stored_ammo += chambered
@@ -117,7 +117,7 @@
AM.loc = src
ammo_magazine = AM
user.visible_message("[user] inserts [AM] into [src].", "<span class='notice'>You insert [AM] into [src].</span>")
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
if(SPEEDLOADER)
if(loaded.len >= max_shells)
to_chat(user, "<span class='warning'>[src] is full!</span>")
@@ -133,7 +133,7 @@
count++
if(count)
user.visible_message("[user] reloads [src].", "<span class='notice'>You load [count] round\s into [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
AM.update_icon()
else if(istype(A, /obj/item/ammo_casing))
var/obj/item/ammo_casing/C = A
@@ -147,7 +147,7 @@
C.loc = src
loaded.Insert(1, C) //add to the head of the list
user.visible_message("[user] inserts \a [C] into [src].", "<span class='notice'>You insert \a [C] into [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else if(istype(A, /obj/item/weapon/storage))
var/obj/item/weapon/storage/storage = A
@@ -174,7 +174,7 @@
if(ammo_magazine)
user.put_in_hands(ammo_magazine)
user.visible_message("[user] removes [ammo_magazine] from [src].", "<span class='notice'>You remove [ammo_magazine] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
ammo_magazine.update_icon()
ammo_magazine = null
else if(loaded.len)
@@ -194,7 +194,7 @@
loaded.len--
user.put_in_hands(C)
user.visible_message("[user] removes \a [C] from [src].", "<span class='notice'>You remove \a [C] from [src].</span>")
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
to_chat(user, "<span class='warning'>[src] is empty.</span>")
update_icon()
@@ -224,7 +224,7 @@
"<span class='notice'>[ammo_magazine] falls out and clatters on the floor!</span>"
)
if(auto_eject_sound)
playsound(user, auto_eject_sound, 40, 1)
playsound(src, auto_eject_sound, 40, 1)
ammo_magazine.update_icon()
ammo_magazine = null
update_icon() //make sure to do this after unsetting ammo_magazine

View File

@@ -30,7 +30,7 @@
to_chat(user, "<span class='notice'>You begin to shorten the barrel and stock of \the [src].</span>")
if(loaded.len)
afterattack(user, user)
playsound(user, fire_sound, 50, 1)
playsound(src, fire_sound, 50, 1)
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='danger'>The rifle goes off in your face!</span>")
return
if(do_after(user, 30))

View File

@@ -19,7 +19,7 @@
chamber_offset = 0
visible_message("<span class='warning'>\The [usr] spins the cylinder of \the [src]!</span>", \
"<span class='notice'>You hear something metallic spin and click.</span>")
playsound(src.loc, 'sound/weapons/revolver_spin.ogg', 100, 1)
playsound(src, 'sound/weapons/revolver_spin.ogg', 100, 1)
loaded = shuffle(loaded)
if(rand(1,max_shells) > loaded.len)
chamber_offset = rand(0,max_shells - loaded.len)
@@ -242,7 +242,7 @@ obj/item/weapon/gun/projectile/revolver/detective45/verb/rename_gun()
chamber_offset = 0
visible_message("<span class='warning'>\The [usr] spins the cylinder of \the [src]!</span>", \
"<span class='notice'>You hear something metallic spin and click.</span>")
playsound(src.loc, 'sound/weapons/revolver_spin.ogg', 100, 1)
playsound(src, 'sound/weapons/revolver_spin.ogg', 100, 1)
if(!flipped_firing)
loaded = shuffle(loaded)
if(rand(1,max_shells) > loaded.len)

View File

@@ -29,7 +29,7 @@
recentpump = world.time
/obj/item/weapon/gun/projectile/shotgun/pump/proc/pump(mob/M as mob)
playsound(M, action_sound, 60, 1)
playsound(src, action_sound, 60, 1)
if(chambered)//We have a shell in the chamber
chambered.loc = get_turf(src)//Eject casing

View File

@@ -30,7 +30,7 @@
icon_state = "heavysniper"
/obj/item/weapon/gun/projectile/heavysniper/attack_self(mob/user as mob)
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
bolt_open = !bolt_open
if(bolt_open)
if(chambered)

View File

@@ -792,4 +792,4 @@
var/volume = CLAMP(vol_by_damage() + 20, 0, 100)
if(silenced)
volume = 5
playsound(get_turf(A), hitsound_wall, volume, 1, -1)
playsound(A, hitsound_wall, volume, 1, -1)

View File

@@ -195,7 +195,7 @@
/obj/item/projectile/energy/plasmastun/proc/bang(var/mob/living/carbon/M)
to_chat(M, "<span class='danger'>You hear a loud roar.</span>")
playsound(M.loc, 'sound/effects/bang.ogg', 50, 1)
playsound(src, 'sound/effects/bang.ogg', 50, 1)
var/ear_safety = 0
ear_safety = M.get_ear_protection()
if(ear_safety == 1)

View File

@@ -82,7 +82,7 @@
if(!(H.species.flags & NO_SLIP) && prob(50))
var/armor_check = H.run_armor_check(def_zone, "melee")
H.apply_effect(3, WEAKEN, armor_check)
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(armor_check < 60)
visible_message("<span class='danger'>\The [src] has pushed [H]!</span>")
else
@@ -91,19 +91,19 @@
else
if(H.break_all_grabs(firer))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
for(var/obj/item/I in holding)
if(I)
H.drop_from_inventory(I)
visible_message("<span class='danger'>\The [src] has disarmed [H]!</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
/obj/item/projectile/energy/hook/proc/perform_intent_unique(atom/target)
playsound(src.loc, impact_sound, 40, 1)
playsound(src, impact_sound, 40, 1)
var/success = FALSE
if(istype(target,/turf))
if(launcher_intent)
@@ -148,7 +148,7 @@
var/message = pick(help_messages)
if(message == "slaps")
spawn(1)
playsound(loc, 'sound/effects/snap.ogg', 50, 1)
playsound(src, 'sound/effects/snap.ogg', 50, 1)
visible_message("<span class='notice'>\The [src] [message] [target].</span>")
done_mob_unique = TRUE
success = TRUE

View File

@@ -144,7 +144,7 @@
/obj/item/projectile/bullet/magnetic/fuelrod/supermatter/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null) //You cannot touch the supermatter without disentigrating. Assumedly, this is true for condensed rods of it flying at relativistic speeds.
if(istype(target,/turf/simulated/wall) || istype(target,/mob/living))
target.visible_message("<span class='danger'>The [src] burns a perfect hole through \the [target] with a blinding flash!</span>")
playsound(target.loc, 'sound/effects/teleport.ogg', 40, 0)
playsound(target, 'sound/effects/teleport.ogg', 40, 0)
return ..(target, blocked, def_zone)
/obj/item/projectile/bullet/magnetic/fuelrod/supermatter/check_penetrate()

View File

@@ -116,7 +116,7 @@
if(A)
A.ex_act(2)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))\

View File

@@ -175,7 +175,7 @@ obj/aiming_overlay/proc/update_aiming_deferred()
aiming_with = thing
aiming_at = target
if(istype(aiming_with, /obj/item/weapon/gun))
playsound(get_turf(owner), 'sound/weapons/TargetOn.ogg', 50,1)
playsound(owner, 'sound/weapons/TargetOn.ogg', 50,1)
forceMove(get_turf(target))
START_PROCESSING(SSobj, src)
@@ -215,7 +215,7 @@ obj/aiming_overlay/proc/update_aiming_deferred()
if(!aiming_with || !aiming_at)
return
if(istype(aiming_with, /obj/item/weapon/gun))
playsound(get_turf(owner), 'sound/weapons/TargetOff.ogg', 50,1)
playsound(owner, 'sound/weapons/TargetOff.ogg', 50,1)
if(!no_message)
owner.visible_message("<span class='notice'>\The [owner] lowers \the [aiming_with].</span>")