From a5b3e3d567599b2dc9767db341ad8058996e4d3e Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Sun, 27 Apr 2014 15:06:42 +0100 Subject: [PATCH] turfs: fix some playsound ERRORs on areas Turf (de)construction playsound()s were using src.loc, instead of src Signed-off-by: Mloc-Argent Conflicts: code/game/turfs/simulated.dm code/game/turfs/simulated/floor.dm --- code/game/turfs/simulated.dm | 21 +++++++++++---------- code/game/turfs/simulated/floor.dm | 19 +++++++++---------- code/game/turfs/simulated/floor_types.dm | 2 +- code/game/turfs/space/space.dm | 4 ++-- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index ad8a9eae640..76b7263913a 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -101,9 +101,9 @@ M.stop_pulling() step(M, M.dir) M << "\blue You slipped on the wet floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Stun(8) - M.Weaken(5) + playsound(src, 'sound/misc/slip.ogg', 50, 1, -3) + M.Stun(5) + M.Weaken(3) else M.inertia_dir = 0 return @@ -112,9 +112,9 @@ M.stop_pulling() step(M, M.dir) M << "\blue You slipped on the wet floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) - M.Stun(8) - M.Weaken(5) + playsound(src, 'sound/misc/slip.ogg', 50, 1, -3) + M.Stun(5) + M.Weaken(3) else M.inertia_dir = 0 return @@ -129,7 +129,7 @@ spawn(4) step(M, M.dir) M.take_organ_damage(2) // Was 5 -- TLE M << "\blue You slipped on the floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) + playsound(src, 'sound/misc/slip.ogg', 50, 1, -3) M.Weaken(10) if(3) // Ice @@ -138,7 +138,7 @@ M.stop_pulling() step(M, M.dir) M << "\blue You slipped on the icy floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) + playsound(src, 'sound/misc/slip.ogg', 50, 1, -3) M.Stun(4) M.Weaken(5) else @@ -149,7 +149,7 @@ M.stop_pulling() step(M, M.dir) M << "\blue You slipped on the icy floor!" - playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3) + playsound(src, 'sound/misc/slip.ogg', 50, 1, -3) M.Stun(4) M.Weaken(5) else @@ -209,4 +209,5 @@ this.blood_DNA["UNKNOWN BLOOD"] = "X*" else if( istype(M, /mob/living/silicon/robot )) - new /obj/effect/decal/cleanable/oil(src) \ No newline at end of file + new /obj/effect/decal/cleanable/oil(src) + diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index e37f354daaa..9e23dfb597f 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -466,17 +466,16 @@ turf/simulated/floor/proc/update_icon() return - if(istype(C, /obj/item/weapon/screwdriver)) - if(is_wood_floor()) - if(broken || burnt) - return - else - if(is_wood_floor()) - user << "\red You unscrew the planks." - new floor_tile.type(src) - make_plating() - playsound(src, 'sound/items/Screwdriver.ogg', 80, 1) + if(istype(C, /obj/item/weapon/screwdriver) && is_wood_floor()) + if(broken || burnt) + return + else + if(is_wood_floor()) + user << "\red You unscrew the planks." + new floor_tile.type(src) + make_plating() + playsound(src, 'sound/items/Screwdriver.ogg', 80, 1) if(is_catwalk()) if(broken) return ReplaceWithLattice() diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index 5c8b5d8cc5d..ceb4c3bf93f 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -58,7 +58,7 @@ return if(istype(C, /obj/item/weapon/wrench)) user << "\blue Removing rods..." - playsound(src.loc, 'sound/items/Ratchet.ogg', 80, 1) + playsound(src, 'sound/items/Ratchet.ogg', 80, 1) if(do_after(user, 30)) new /obj/item/stack/rods(src, 2) ChangeTurf(/turf/simulated/floor) diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index dea6d8e7e10..7f87eddc8e2 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -50,7 +50,7 @@ return user << "\blue Constructing support lattice ..." - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) + playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) ReplaceWithLattice() R.use(1) return @@ -60,7 +60,7 @@ if(L) var/obj/item/stack/tile/plasteel/S = C del(L) - playsound(src.loc, 'sound/weapons/Genhit.ogg', 50, 1) + playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) S.build(src) S.use(1) return