diff --git a/code/ATMOSPHERICS/components/unary/vent_pump.dm b/code/ATMOSPHERICS/components/unary/vent_pump.dm
index f5f3c6554f..3edaaf900f 100644
--- a/code/ATMOSPHERICS/components/unary/vent_pump.dm
+++ b/code/ATMOSPHERICS/components/unary/vent_pump.dm
@@ -380,7 +380,7 @@
to_chat(user, "Now welding the vent.")
if(do_after(user, 20 * WT.toolspeed))
if(!src || !WT.isOn()) return
- playsound(src.loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
if(!welded)
user.visible_message("\The [user] welds the vent shut.", "You weld the vent shut.", "You hear welding.")
welded = 1
diff --git a/code/ATMOSPHERICS/pipes/simple.dm b/code/ATMOSPHERICS/pipes/simple.dm
index 215f3498b7..e0f6f7d951 100644
--- a/code/ATMOSPHERICS/pipes/simple.dm
+++ b/code/ATMOSPHERICS/pipes/simple.dm
@@ -78,7 +78,7 @@
/obj/machinery/atmospherics/pipe/simple/proc/burst()
src.visible_message("\The [src] bursts!");
- playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
+ playsound(src, 'sound/effects/bang.ogg', 25, 1)
var/datum/effect/effect/system/smoke_spread/smoke = new
smoke.set_up(1,0, src.loc, 0)
smoke.start()
diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm
index 59837bbe5f..4d92a42c35 100644
--- a/code/ZAS/Airflow.dm
+++ b/code/ZAS/Airflow.dm
@@ -97,7 +97,7 @@ atom/movable/proc/airflow_hit(atom/A)
mob/airflow_hit(atom/A)
for(var/mob/M in hearers(src))
M.show_message("\The [src] slams into \a [A]!",1,"You hear a loud slam!",2)
- playsound(src.loc, "smash.ogg", 25, 1, -1)
+ playsound(src, "smash.ogg", 25, 1, -1)
var/weak_amt = istype(A,/obj/item) ? A:w_class : rand(1,5) //Heheheh
Weaken(weak_amt)
. = ..()
@@ -105,7 +105,7 @@ mob/airflow_hit(atom/A)
obj/airflow_hit(atom/A)
for(var/mob/M in hearers(src))
M.show_message("\The [src] slams into \a [A]!",1,"You hear a loud slam!",2)
- playsound(src.loc, "smash.ogg", 25, 1, -1)
+ playsound(src, "smash.ogg", 25, 1, -1)
. = ..()
obj/item/airflow_hit(atom/A)
@@ -115,7 +115,7 @@ obj/item/airflow_hit(atom/A)
mob/living/carbon/human/airflow_hit(atom/A)
// for(var/mob/M in hearers(src))
// M.show_message("[src] slams into [A]!",1,"You hear a loud slam!",2)
- playsound(src.loc, "punch", 25, 1, -1)
+ playsound(src, "punch", 25, 1, -1)
if (prob(33))
loc:add_blood(src)
bloody_body(src)
diff --git a/code/__defines/flags.dm b/code/__defines/flags.dm
index e59dac70c5..2ff8f44dba 100644
--- a/code/__defines/flags.dm
+++ b/code/__defines/flags.dm
@@ -29,8 +29,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define OPENCONTAINER (1<<4) // Is an open container for chemistry purposes.
#define PHORONGUARD (1<<5) // Does not get contaminated by phoron.
#define NOREACT (1<<6) // Reagents don't react inside this container.
-#define PROXMOVE (1<<7)// Does this object require proximity checking in Enter()?
-#define OVERLAY_QUEUED (1<<8)// Atom queued to SSoverlay for COMPILE_OVERLAYS
+#define OVERLAY_QUEUED (1<<7)// Atom queued to SSoverlay for COMPILE_OVERLAYS
//Flags for items (equipment) - Used in /obj/item/var/item_flags
#define THICKMATERIAL (1<<0) // Prevents syringes, parapens and hyposprays if equipped to slot_suit or slot_head.
diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm
index 438483b07b..16fdec7bd0 100644
--- a/code/_helpers/game.dm
+++ b/code/_helpers/game.dm
@@ -231,35 +231,43 @@
. = list()
// Returns a list of mobs who can hear any of the radios given in @radios
var/list/speaker_coverage = list()
- for(var/obj/item/device/radio/R in radios)
- if(R)
- //Cyborg checks. Receiving message uses a bit of cyborg's charge.
- var/obj/item/device/radio/borg/BR = R
- if(istype(BR) && BR.myborg)
- var/mob/living/silicon/robot/borg = BR.myborg
- var/datum/robot_component/CO = borg.get_component("radio")
- if(!CO)
- continue //No radio component (Shouldn't happen)
- if(!borg.is_component_functioning("radio") || !borg.cell_use_power(CO.active_usage))
- continue //No power.
-
- var/turf/speaker = get_turf(R)
- if(speaker)
- for(var/turf/T in hear(R.canhear_range,speaker))
- speaker_coverage[T] = R
+ for(var/r in radios)
+ var/obj/item/device/radio/R = r // You better fucking be a radio.
+ var/turf/speaker = get_turf(R)
+ if(speaker)
+ for(var/turf/T in hear(R.canhear_range,speaker))
+ speaker_coverage[T] = R
// Try to find all the players who can hear the message
for(var/i = 1; i <= player_list.len; i++)
var/mob/M = player_list[i]
- if(M)
- var/turf/ear = get_turf(M)
- if(ear)
- // Ghostship is magic: Ghosts can hear radio chatter from anywhere
- if(speaker_coverage[ear] || (istype(M, /mob/observer/dead) && M.is_preference_enabled(/datum/client_preference/ghost_radio)))
- . |= M // Since we're already looping through mobs, why bother using |= ? This only slows things down.
+ if(M.can_hear_radio(speaker_coverage))
+ . += M
return .
+/mob/proc/can_hear_radio(var/list/hearturfs)
+ return FALSE
+
+/mob/living/can_hear_radio(var/list/hearturfs)
+ return get_turf(src) in hearturfs
+
+/mob/living/silicon/robot/can_hear_radio(var/list/hearturfs)
+ var/turf/T = get_turf(src)
+ var/obj/item/device/radio/borg/R = hearturfs[T] // this should be an assoc list of turf-to-radio
+
+ // We heard it on our own radio? We use power for that.
+ if(istype(R) && R.myborg == src)
+ var/datum/robot_component/CO = get_component("radio")
+ if(!CO || !is_component_functioning("radio") || !cell_use_power(CO.active_usage))
+ return FALSE // Sorry, couldn't hear
+
+ return R // radio, true, false, what's the difference
+
+/mob/observer/dead/can_hear_radio(var/list/hearturfs)
+ return is_preference_enabled(/datum/client_preference/ghost_radio)
+
+
//Uses dview to quickly return mobs and objects in view,
// then adds additional mobs or objects if they are in range 'smartly',
// based on their presence in lists of players or registered objects
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 64ab38420d..5b7a043569 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -292,7 +292,7 @@
var/obj/item/projectile/beam/LE = new (T)
LE.icon = 'icons/effects/genetics.dmi'
LE.icon_state = "eyelasers"
- playsound(usr.loc, 'sound/weapons/taser2.ogg', 75, 1)
+ playsound(src, 'sound/weapons/taser2.ogg', 75, 1)
LE.firer = src
LE.preparePixelProjectile(A, src, params)
LE.fire()
diff --git a/code/_onclick/hud/skybox.dm b/code/_onclick/hud/skybox.dm
index 492a11e588..8c1e3c10b5 100644
--- a/code/_onclick/hud/skybox.dm
+++ b/code/_onclick/hud/skybox.dm
@@ -50,11 +50,9 @@
if(. && client)
client.update_skybox(old_z != get_z(src))
-/mob/forceMove()
- var/old_z = get_z(src)
+/mob/Moved()
. = ..()
- if(. && client)
- client.update_skybox(old_z != get_z(src))
+ client?.update_skybox()
/mob/set_viewsize()
. = ..()
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index decc371475..54fc3239ac 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -97,7 +97,7 @@ avoid code duplication. This includes items that may sometimes act as a standard
/obj/item/proc/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone, var/attack_modifier)
user.break_cloak()
if(hitsound)
- playsound(loc, hitsound, 50, 1, -1)
+ playsound(src, hitsound, 50, 1, -1)
var/power = force
for(var/datum/modifier/M in user.modifiers)
diff --git a/code/controllers/subsystems/open_space.dm b/code/controllers/subsystems/open_space.dm
index dfc1319009..4e96dbfda4 100644
--- a/code/controllers/subsystems/open_space.dm
+++ b/code/controllers/subsystems/open_space.dm
@@ -79,22 +79,6 @@ SUBSYSTEM_DEF(open_space)
/datum/controller/subsystem/open_space/stat_entry(msg_prefix)
return ..("T [turfs_to_process.len]")
-/turf/Entered(atom/movable/AM)
- . = ..()
- if(GLOB.open_space_initialised && !AM.invisibility && isobj(AM))
- var/turf/T = GetAbove(src)
- if(isopenspace(T))
- // log_debug("[T] ([T.x],[T.y],[T.z]) queued for update for [src].Entered([AM])")
- SSopen_space.add_turf(T, 1)
-
-/turf/Exited(atom/movable/AM)
- . = ..()
- if(GLOB.open_space_initialised && !AM.invisibility && isobj(AM))
- var/turf/T = GetAbove(src)
- if(isopenspace(T))
- // log_debug("[T] ([T.x],[T.y],[T.z]) queued for update for [src].Exited([AM])")
- SSopen_space.add_turf(T, 1)
-
/obj/update_icon()
. = ..()
if(GLOB.open_space_initialised && !invisibility && isturf(loc))
diff --git a/code/datums/observation/turf_enterexit.dm b/code/datums/observation/turf_enterexit.dm
new file mode 100644
index 0000000000..30cec0c39d
--- /dev/null
+++ b/code/datums/observation/turf_enterexit.dm
@@ -0,0 +1,33 @@
+// Observer Pattern Implementation: Turf Entered/Exited
+// Registration type: /turf
+//
+// Raised when: A /turf has a new item in contents, or an item has left it's contents
+//
+// Arguments that the called proc should expect:
+// /turf: The turf that was entered/exited
+// /atom/movable/moving_instance: The instance that entered/exited
+// /atom/old_loc / /atom/new_loc: The previous/new loc of the mover
+
+
+GLOBAL_DATUM_INIT(turf_entered_event, /decl/observ/turf_entered, new)
+GLOBAL_DATUM_INIT(turf_exited_event, /decl/observ/turf_exited, new)
+
+/decl/observ/turf_entered
+ name = "Turf Entered"
+ expected_type = /turf
+
+/decl/observ/turf_exited
+ name = "Turf Exited"
+ expected_type = /turf
+
+/********************
+* Movement Handling *
+********************/
+
+/turf/Entered(var/atom/movable/am, var/atom/old_loc)
+ . = ..()
+ GLOB.turf_entered_event.raise_event(src, am, old_loc)
+
+/turf/Exited(var/atom/movable/am, var/atom/new_loc)
+ . = ..()
+ GLOB.turf_exited_event.raise_event(src, am, new_loc)
\ No newline at end of file
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 7308083ae6..de7800acfb 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -29,7 +29,6 @@
density = 0
unacidable = 1//Just to be sure.
var/def_zone
- flags = PROXMOVE
pass_flags = PASSTABLE
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index 963530d671..b7d2c3f323 100644
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -25,6 +25,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
requires_power = 1
always_unpowered = 1
dynamic_lighting = 0
+ has_gravity = 0
power_light = 0
power_equip = 0
power_environ = 0
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index c93b6d78dc..ad349fe29e 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -336,7 +336,7 @@ var/list/mob/living/forced_ambiance_list = new
H.AdjustStunned(3)
H.AdjustWeakened(3)
to_chat(mob, "The sudden appearance of gravity makes you fall to the floor!")
- playsound(get_turf(src), "bodyfall", 50, 1)
+ playsound(mob, "bodyfall", 50, 1)
/area/proc/prison_break(break_lights = TRUE, open_doors = TRUE, open_blast_doors = TRUE)
var/obj/machinery/power/apc/theAPC = get_apc()
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 0bc5c14cf8..671bdf0b10 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -118,15 +118,33 @@
/atom/proc/CheckExit()
return 1
-// If you want to use this, the atom must have the PROXMOVE flag, and the moving
-// atom must also have the PROXMOVE flag currently to help with lag. ~ ComicIronic
-/atom/proc/HasProximity(atom/movable/AM as mob|obj)
+// Used to be for the PROXMOVE flag, but that was terrible, so instead it's just here as a stub for
+// all the atoms that still have the proc, but get events other ways.
+/atom/proc/HasProximity(turf/T, atom/movable/AM, old_loc)
return
+//Register listeners on turfs in a certain range
+/atom/proc/sense_proximity(var/range = 1, var/callback)
+ ASSERT(callback)
+ ASSERT(isturf(loc))
+ var/list/turfs = trange(range, src)
+ for(var/t in turfs)
+ var/turf/T = t
+ GLOB.turf_entered_event.register(T, src, callback)
+
+//Unregister from prox listening in a certain range. You should do this BEFORE you move, but if you
+// really can't, then you can set the center where you moved from.
+/atom/proc/unsense_proximity(var/range = 1, var/callback, var/center)
+ ASSERT(isturf(center) || isturf(loc))
+ var/list/turfs = trange(range, center ? center : src)
+ for(var/t in turfs)
+ var/turf/T = t
+ GLOB.turf_entered_event.unregister(T, src, callback)
+
+
/atom/proc/emp_act(var/severity)
return
-
/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
P.on_hit(src, 0, def_zone)
. = 0
diff --git a/code/game/gamemodes/changeling/powers/armblade.dm b/code/game/gamemodes/changeling/powers/armblade.dm
index 664e6191ae..4a84fde371 100644
--- a/code/game/gamemodes/changeling/powers/armblade.dm
+++ b/code/game/gamemodes/changeling/powers/armblade.dm
@@ -113,11 +113,11 @@
/obj/item/weapon/melee/changeling/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(default_parry_check(user, attacker, damage_source) && prob(defend_chance))
user.visible_message("\The [user] parries [attack_text] with \the [src]!")
- playsound(user.loc, 'sound/weapons/slash.ogg', 50, 1)
+ playsound(src, 'sound/weapons/slash.ogg', 50, 1)
return 1
if(unique_parry_check(user, attacker, damage_source) && prob(projectile_parry_chance))
user.visible_message("\The [user] deflects [attack_text] with \the [src]!")
- playsound(user.loc, 'sound/weapons/slash.ogg', 50, 1)
+ playsound(src, 'sound/weapons/slash.ogg', 50, 1)
return 1
return 0
diff --git a/code/game/gamemodes/cult/construct_spells.dm b/code/game/gamemodes/cult/construct_spells.dm
index 64c97a30f4..954361fb9f 100644
--- a/code/game/gamemodes/cult/construct_spells.dm
+++ b/code/game/gamemodes/cult/construct_spells.dm
@@ -537,7 +537,7 @@ proc/findNullRod(var/atom/target)
new_projectile.fire()
log_and_message_admins("has casted [src] at \the [hit_atom].")
if(fire_sound)
- playsound(get_turf(src), fire_sound, 75, 1)
+ playsound(src, fire_sound, 75, 1)
return 1
return 0
diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm
index 8560582ee8..827e9730da 100644
--- a/code/game/gamemodes/cult/cult_items.dm
+++ b/code/game/gamemodes/cult/cult_items.dm
@@ -35,7 +35,7 @@
throw_at(get_edge_target_turf(src, pick(alldirs)), rand(1,3), throw_speed)
var/spooky = pick('sound/hallucinations/growl1.ogg', 'sound/hallucinations/growl2.ogg', 'sound/hallucinations/growl3.ogg', 'sound/hallucinations/wail.ogg')
- playsound(loc, spooky, 50, 1)
+ playsound(src, spooky, 50, 1)
return 1
diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm
index b9d434902e..bbf4bfb343 100644
--- a/code/game/gamemodes/cult/cult_structures.dm
+++ b/code/game/gamemodes/cult/cult_structures.dm
@@ -57,7 +57,7 @@
if(prob(1+ damage * 5))
visible_message("[shatter_message]")
STOP_PROCESSING(SSobj, src)
- playsound(get_turf(src),shatter_sound, 75, 1)
+ playsound(src,shatter_sound, 75, 1)
isbroken = 1
density = 0
icon_state = "[initial(icon_state)]-broken"
@@ -73,21 +73,21 @@
)
STOP_PROCESSING(SSobj, src)
user.do_attack_animation(src)
- playsound(get_turf(src),shatter_sound, 75, 1)
+ playsound(src,shatter_sound, 75, 1)
isbroken = 1
density = 0
icon_state = "[initial(icon_state)]-broken"
set_light(0)
else
to_chat(user, "You hit \the [src]!")
- playsound(get_turf(src),impact_sound, 75, 1)
+ playsound(src,impact_sound, 75, 1)
else
if(prob(damage * 2))
to_chat(user, "You pulverize what was left of \the [src]!")
qdel(src)
else
to_chat(user, "You hit \the [src]!")
- playsound(get_turf(src),impact_sound, 75, 1)
+ playsound(src,impact_sound, 75, 1)
/obj/structure/cult/pylon/proc/repair(mob/user as mob)
if(isbroken)
diff --git a/code/game/gamemodes/events/dust.dm b/code/game/gamemodes/events/dust.dm
index 400ae1058d..526164cd58 100644
--- a/code/game/gamemodes/events/dust.dm
+++ b/code/game/gamemodes/events/dust.dm
@@ -95,7 +95,7 @@ The "dust" will damage the hull of the station causin minor hull breaches.
if(!M.stat && !istype(M, /mob/living/silicon/ai))
shake_camera(M, 3, 1)
if (A)
- playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, 1)
+ playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)
if(ismob(A))
A.ex_act(strength)//This should work for now I guess
diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm
index 66e329ac1a..c34f370a33 100644
--- a/code/game/gamemodes/events/holidays/Christmas.dm
+++ b/code/game/gamemodes/events/holidays/Christmas.dm
@@ -40,7 +40,7 @@
"What do you get from eating tree decorations?\n\nTinsilitis!",
"What do snowmen wear on their heads?\n\nIce caps!",
"Why is Christmas just like life on ss13?\n\nYou do all the work and the fat guy gets all the credit.",
- "Why doesn’t Santa have any children?\n\nBecause he only comes down the chimney.")
+ "Why doesn't Santa have any children?\n\nBecause he only comes down the chimney.")
new /obj/item/clothing/head/festive(target.loc)
user.update_icons()
cracked = 1
@@ -49,7 +49,7 @@
other_half.cracked = 1
other_half.icon_state = "cracker2"
target.put_in_active_hand(other_half)
- playsound(user, 'sound/effects/snap.ogg', 50, 1)
+ playsound(src, 'sound/effects/snap.ogg', 50, 1)
return 1
return ..()
diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm
index 5447431279..62406c3877 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -211,7 +211,7 @@
/obj/item/weapon/pinpointer/nukeop/proc/workdisk()
if(bomb_set) //If the bomb is set, lead to the shuttle
mode = 1 //Ensures worklocation() continues to work
- playsound(loc, 'sound/machines/twobeep.ogg', 50, 1) //Plays a beep
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 1) //Plays a beep
visible_message("Shuttle Locator active.") //Lets the mob holding it know that the mode has changed
return //Get outta here
@@ -236,7 +236,7 @@
/obj/item/weapon/pinpointer/nukeop/proc/worklocation()
if(!bomb_set)
mode = 0
- playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
visible_message("Authentication Disk Locator active.")
return
diff --git a/code/game/gamemodes/technomancer/devices/shield_armor.dm b/code/game/gamemodes/technomancer/devices/shield_armor.dm
index c8e8130adc..7618708aad 100644
--- a/code/game/gamemodes/technomancer/devices/shield_armor.dm
+++ b/code/game/gamemodes/technomancer/devices/shield_armor.dm
@@ -70,7 +70,7 @@
to_chat(user, "Your shield has absorbed most of \the [damage_source].")
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
return 0 // This shield does not block all damage, so returning 0 is needed to tell the game to apply the new damage.
/obj/item/clothing/suit/armor/shield/attack_self(mob/user)
diff --git a/code/game/gamemodes/technomancer/devices/tesla_armor.dm b/code/game/gamemodes/technomancer/devices/tesla_armor.dm
index 86d6f82b08..124e1ed1f3 100644
--- a/code/game/gamemodes/technomancer/devices/tesla_armor.dm
+++ b/code/game/gamemodes/technomancer/devices/tesla_armor.dm
@@ -81,4 +81,4 @@
lightning.old_style_target(target)
lightning.fire()
visible_message("\The [src] strikes \the [target] with lightning!")
- playsound(get_turf(src), 'sound/weapons/gauss_shoot.ogg', 75, 1)
\ No newline at end of file
+ playsound(src, 'sound/weapons/gauss_shoot.ogg', 75, 1)
\ No newline at end of file
diff --git a/code/game/gamemodes/technomancer/spells/audible_deception.dm b/code/game/gamemodes/technomancer/spells/audible_deception.dm
index c8a66fac3c..1914b72f14 100644
--- a/code/game/gamemodes/technomancer/spells/audible_deception.dm
+++ b/code/game/gamemodes/technomancer/spells/audible_deception.dm
@@ -75,7 +75,7 @@
/obj/item/weapon/spell/audible_deception/on_ranged_cast(atom/hit_atom, mob/living/user)
var/turf/T = get_turf(hit_atom)
if(selected_sound && pay_energy(200))
- playsound(T, selected_sound, 80, 1, -1)
+ playsound(src, selected_sound, 80, 1, -1)
adjust_instability(1)
// Air Horn time.
if(selected_sound == 'sound/items/AirHorn.ogg' && pay_energy(3800))
diff --git a/code/game/gamemodes/technomancer/spells/instability_tap.dm b/code/game/gamemodes/technomancer/spells/instability_tap.dm
index 13a2b5e318..ad2c72518b 100644
--- a/code/game/gamemodes/technomancer/spells/instability_tap.dm
+++ b/code/game/gamemodes/technomancer/spells/instability_tap.dm
@@ -26,5 +26,5 @@
else
core.give_energy(amount)
adjust_instability(50)
- playsound(get_turf(src), 'sound/effects/supermatter.ogg', 75, 1)
+ playsound(src, 'sound/effects/supermatter.ogg', 75, 1)
qdel(src)
\ No newline at end of file
diff --git a/code/game/gamemodes/technomancer/spells/oxygenate.dm b/code/game/gamemodes/technomancer/spells/oxygenate.dm
index 61c6367260..b36f17c726 100644
--- a/code/game/gamemodes/technomancer/spells/oxygenate.dm
+++ b/code/game/gamemodes/technomancer/spells/oxygenate.dm
@@ -29,5 +29,5 @@
if(pay_energy(1500))
T.assume_gas("oxygen", 200)
T.assume_gas("nitrogen", 800)
- playsound(src.loc, 'sound/effects/spray.ogg', 50, 1, -3)
+ playsound(src, 'sound/effects/spray.ogg', 50, 1, -3)
adjust_instability(10)
\ No newline at end of file
diff --git a/code/game/gamemodes/technomancer/spells/projectile/projectile.dm b/code/game/gamemodes/technomancer/spells/projectile/projectile.dm
index a52bb2e584..62ae49b0f0 100644
--- a/code/game/gamemodes/technomancer/spells/projectile/projectile.dm
+++ b/code/game/gamemodes/technomancer/spells/projectile/projectile.dm
@@ -16,7 +16,7 @@
new_projectile.fire()
log_and_message_admins("has casted [src] at \the [hit_atom].")
if(fire_sound)
- playsound(get_turf(src), fire_sound, 75, 1)
+ playsound(src, fire_sound, 75, 1)
adjust_instability(instability_per_shot)
return 1
return 0
diff --git a/code/game/gamemodes/technomancer/spells/reflect.dm b/code/game/gamemodes/technomancer/spells/reflect.dm
index 47ed0663f2..756e9e27fc 100644
--- a/code/game/gamemodes/technomancer/spells/reflect.dm
+++ b/code/game/gamemodes/technomancer/spells/reflect.dm
@@ -60,7 +60,7 @@
P.damage = P.damage * 1.5
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
// now send a log so that admins don't think they're shooting themselves on purpose.
log_and_message_admins("[user] reflected [attacker]'s attack back at them.")
@@ -80,7 +80,7 @@
on the same side, and hits you!")
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
log_and_message_admins("[user] reflected [attacker]'s attack back at them.")
diff --git a/code/game/gamemodes/technomancer/spells/shield.dm b/code/game/gamemodes/technomancer/spells/shield.dm
index 6bcbda5ec4..b11d5590b0 100644
--- a/code/game/gamemodes/technomancer/spells/shield.dm
+++ b/code/game/gamemodes/technomancer/spells/shield.dm
@@ -55,7 +55,7 @@
if(check_shield_arc(user, bad_arc, damage_source, attacker))
user.visible_message("\The [user]'s [src] blocks [attack_text]!")
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
adjust_instability(2)
return 1
return 0
diff --git a/code/game/machinery/CableLayer.dm b/code/game/machinery/CableLayer.dm
index d954a80b29..8edc131ac8 100644
--- a/code/game/machinery/CableLayer.dm
+++ b/code/game/machinery/CableLayer.dm
@@ -41,7 +41,7 @@
m = min(m, cable.amount)
m = min(m, 30)
if(m)
- playsound(src.loc, O.usesound, 50, 1)
+ playsound(src, O.usesound, 50, 1)
use_cable(m)
var/obj/item/stack/cable_coil/CC = new (get_turf(src))
CC.amount = m
diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm
index 3d76b02e0f..b45d00c3f7 100644
--- a/code/game/machinery/air_alarm.dm
+++ b/code/game/machinery/air_alarm.dm
@@ -116,7 +116,7 @@
/obj/machinery/alarm/proc/first_run()
alarm_area = get_area(src)
- area_uid = "\ref[alarm_area]"
+ area_uid = "\ref[alarm_area]"
if(name == "alarm")
name = "[alarm_area.name] Air Alarm"
@@ -188,7 +188,7 @@
regulating_temperature = 1
audible_message("\The [src] clicks as it starts [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
"You hear a click and a faint electronic hum.")
- playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
else
//check for when we should stop adjusting temperature
if(get_danger_level(target_temperature, TLV["temperature"]) || abs(environment.temperature - target_temperature) <= 0.5)
@@ -196,7 +196,7 @@
regulating_temperature = 0
audible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\
"You hear a click as a faint electronic humming stops.")
- playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
if(regulating_temperature)
if(target_temperature > T0C + MAX_TEMPERATURE)
diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm
index 3833c72ee4..3a012a1ccd 100644
--- a/code/game/machinery/atmoalter/canister.dm
+++ b/code/game/machinery/atmoalter/canister.dm
@@ -171,7 +171,7 @@ update_flag
location.assume_air(air_contents)
src.destroyed = 1
- playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
+ playsound(src, 'sound/effects/spray.ogg', 10, 1, -3)
src.density = 0
update_icon()
diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm
index 3b6df894b5..879551493d 100644
--- a/code/game/machinery/atmoalter/scrubber.dm
+++ b/code/game/machinery/atmoalter/scrubber.dm
@@ -213,7 +213,7 @@
return
anchored = !anchored
- playsound(src.loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
return
diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm
index 0865a3ec55..d8bd9ba1d1 100644
--- a/code/game/machinery/biogenerator.dm
+++ b/code/game/machinery/biogenerator.dm
@@ -163,11 +163,11 @@
processing = 1
update_icon()
updateUsrDialog()
- playsound(src.loc, 'sound/machines/blender.ogg', 40, 1)
+ playsound(src, 'sound/machines/blender.ogg', 40, 1)
use_power(S * 30)
sleep((S + 15) / eat_eff)
processing = 0
- playsound(src.loc, 'sound/machines/biogenerator_end.ogg', 40, 1)
+ playsound(src, 'sound/machines/biogenerator_end.ogg', 40, 1)
update_icon()
else
menustat = "void"
diff --git a/code/game/machinery/bioprinter.dm b/code/game/machinery/bioprinter.dm
index 853029b217..034a7fe243 100644
--- a/code/game/machinery/bioprinter.dm
+++ b/code/game/machinery/bioprinter.dm
@@ -283,7 +283,7 @@
/obj/machinery/organ_printer/flesh/print_organ(var/choice)
var/obj/item/organ/O = ..()
- playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
+ playsound(src, 'sound/machines/ding.ogg', 50, 1)
visible_message("\The [src] dings, then spits out \a [O].")
return O
@@ -348,7 +348,7 @@
var/obj/item/organ/O = ..()
O.robotize()
O.status |= ORGAN_CUT_AWAY // robotize() resets status to 0
- playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
+ playsound(src, 'sound/machines/ding.ogg', 50, 1)
audible_message("\The [src] dings, then spits out \a [O].")
return O
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 27e7b5a7bd..5357711d9e 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -81,6 +81,8 @@
..()
/obj/machinery/camera/Destroy()
+ if(isMotion())
+ unsense_proximity(callback = .HasProximity)
deactivate(null, 0) //kick anyone viewing out
if(assembly)
qdel(assembly)
@@ -150,7 +152,7 @@
user.do_attack_animation(src)
user.setClickCooldown(user.get_attack_speed())
visible_message("\The [user] slashes at [src]!")
- playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
+ playsound(src, 'sound/weapons/slash.ogg', 100, 1)
add_hiddenprint(user)
destroy()
@@ -161,7 +163,7 @@
S.do_attack_animation(src)
S.setClickCooldown(user.get_attack_speed())
visible_message("\The [user] [pick(S.attacktext)] \the [src]!")
- playsound(src.loc, S.attack_sound, 100, 1)
+ playsound(src, S.attack_sound, 100, 1)
add_hiddenprint(user)
destroy()
..()
@@ -175,7 +177,7 @@
panel_open = !panel_open
user.visible_message("[user] screws the camera's panel [panel_open ? "open" : "closed"]!",
"You screw the camera's panel [panel_open ? "open" : "closed"].")
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
else if((W.is_wirecutter() || istype(W, /obj/item/device/multitool)) && panel_open)
interact(user)
@@ -250,7 +252,7 @@
if (istype(W, /obj/item)) //is it even possible to get into attackby() with non-items?
var/obj/item/I = W
if (I.hitsound)
- playsound(loc, I.hitsound, 50, 1, -1)
+ playsound(src, I.hitsound, 50, 1, -1)
take_damage(W.force)
else
@@ -270,7 +272,7 @@
visible_message(" [user] has deactivated [src]!")
else
visible_message(" [src] clicks and shuts down. ")
- playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
+ playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
icon_state = "[initial(icon_state)]1"
add_hiddenprint(user)
else
@@ -278,7 +280,7 @@
visible_message(" [user] has reactivated [src]!")
else
visible_message(" [src] clicks and reactivates itself. ")
- playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
+ playsound(src, 'sound/items/Wirecutter.ogg', 100, 1)
icon_state = initial(icon_state)
add_hiddenprint(user)
@@ -300,7 +302,7 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, loc)
spark_system.start()
- playsound(loc, "sparks", 50, 1)
+ playsound(src, "sparks", 50, 1)
/obj/machinery/camera/proc/set_status(var/newstatus)
if (status != newstatus)
@@ -396,7 +398,7 @@
// Do after stuff here
to_chat(user, "You start to weld [src]..")
- playsound(src.loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
WT.eyecheck(user)
busy = 1
if(do_after(user, 100 * WT.toolspeed))
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index 31877f868e..69fb773c6d 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -78,7 +78,7 @@
if(3)
// State 3
if(W.is_screwdriver())
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: "+using_map.station_short+",Security,Secret ", "Set Network", camera_network ? camera_network : NETWORK_DEFAULT))
if(!input)
@@ -118,7 +118,7 @@
else if(W.is_wirecutter())
new/obj/item/stack/cable_coil(get_turf(src), 2)
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
to_chat(user, "You cut the wires from the circuits.")
state = 2
return
@@ -161,7 +161,7 @@
return 0
to_chat(user, "You start to weld the [src]..")
- playsound(src.loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
WT.eyecheck(user)
busy = 1
if(do_after(user, 20 * WT.toolspeed))
diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm
index eac1f89386..ad183a7be8 100644
--- a/code/game/machinery/camera/motion.dm
+++ b/code/game/machinery/camera/motion.dm
@@ -3,15 +3,13 @@
var/detectTime = 0
var/area/ai_monitored/area_motion = null
var/alarm_delay = 100 // Don't forget, there's another 10 seconds in queueAlarm()
- flags = PROXMOVE
/obj/machinery/camera/internal_process()
// motion camera event loop
if (stat & (EMPED|NOPOWER))
return
if(!isMotion())
- . = PROCESS_KILL
- return
+ return PROCESS_KILL
if (detectTime > 0)
var/elapsed = world.time - detectTime
if (elapsed > alarm_delay)
@@ -56,7 +54,7 @@
detectTime = -1
return 1
-/obj/machinery/camera/HasProximity(atom/movable/AM as mob|obj)
+/obj/machinery/camera/HasProximity(turf/T, atom/movable/AM, old_loc)
// Motion cameras outside of an "ai monitored" area will use this to detect stuff.
if (!area_motion)
if(isliving(AM))
diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm
index 15b5f7abca..f625fb9546 100644
--- a/code/game/machinery/camera/presets.dm
+++ b/code/game/machinery/camera/presets.dm
@@ -212,9 +212,12 @@ var/global/list/engineering_networks = list(
update_coverage()
/obj/machinery/camera/proc/upgradeMotion()
+ if(!isturf(loc))
+ return //nooooo
assembly.upgrades.Add(new /obj/item/device/assembly/prox_sensor(assembly))
setPowerUsage()
START_MACHINE_PROCESSING(src)
+ sense_proximity(callback = .HasProximity)
update_coverage()
/obj/machinery/camera/proc/setPowerUsage()
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 0e184bfc90..019ed86bea 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -201,7 +201,7 @@
return
else if((occupant.health >= heal_level || occupant.health == occupant.getMaxHealth()) && (!eject_wait))
- playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
+ playsound(src, 'sound/machines/ding.ogg', 50, 1)
audible_message("\The [src] signals that the cloning process is complete.")
connected_message("Cloning Process Complete.")
locked = 0
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index 8a88948ee0..397366c6c2 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -15,7 +15,7 @@
switch(state)
if(0)
if(P.is_wrench())
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
to_chat(user, "You wrench the frame into place.")
anchored = 1
@@ -25,7 +25,7 @@
if(!WT.isOn())
to_chat(user, "The welder must be on for this task.")
return
- playsound(loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed))
if(!src || !WT.remove_fuel(0, user)) return
to_chat(user, "You deconstruct the frame.")
@@ -33,25 +33,25 @@
qdel(src)
if(1)
if(P.is_wrench())
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
to_chat(user, "You unfasten the frame.")
anchored = 0
state = 0
if(istype(P, /obj/item/weapon/circuitboard/aicore) && !circuit)
- playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You place the circuit board inside the frame.")
icon_state = "1"
circuit = P
user.drop_item()
P.loc = src
if(P.is_screwdriver() && circuit)
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You screw the circuit board into place.")
state = 2
icon_state = "2"
if(P.is_crowbar() && circuit)
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You remove the circuit board.")
state = 1
icon_state = "0"
@@ -59,7 +59,7 @@
circuit = null
if(2)
if(P.is_screwdriver() && circuit)
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You unfasten the circuit board.")
state = 1
icon_state = "1"
@@ -69,7 +69,7 @@
to_chat(user, "You need five coils of wire to add them to the frame.")
return
to_chat(user, "You start to add cables to the frame.")
- playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if (do_after(user, 20) && state == 2)
if (C.use(5))
state = 3
@@ -81,7 +81,7 @@
if (brain)
to_chat(user, "Get that brain out of there first")
else
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You remove the cables.")
state = 2
icon_state = "2"
@@ -94,7 +94,7 @@
to_chat(user, "You need two sheets of glass to put in the glass panel.")
return
to_chat(user, "You start to put in the glass panel.")
- playsound(loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if (do_after(user, 20) && state == 3)
if(RG.use(2))
to_chat(user, "You put in the glass panel.")
@@ -146,7 +146,7 @@
icon_state = "3b"
if(P.is_crowbar() && brain)
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You remove the brain.")
brain.loc = loc
brain = null
@@ -154,7 +154,7 @@
if(4)
if(P.is_crowbar())
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You remove the glass panel.")
state = 3
if (brain)
@@ -165,7 +165,7 @@
return
if(P.is_screwdriver())
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You connect the monitor.")
if(!brain)
var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes"
diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm
index 960ce3dc35..054c9c2cc3 100644
--- a/code/game/machinery/computer/buildandrepair.dm
+++ b/code/game/machinery/computer/buildandrepair.dm
@@ -14,7 +14,7 @@
switch(state)
if(0)
if(P.is_wrench())
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
to_chat(user, "You wrench the frame into place.")
src.anchored = 1
@@ -24,7 +24,7 @@
if(!WT.remove_fuel(0, user))
to_chat(user, "The welding tool must be on to complete this task.")
return
- playsound(src.loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
if(do_after(user, 20 * WT.toolspeed))
if(!src || !WT.isOn()) return
to_chat(user, "You deconstruct the frame.")
@@ -32,7 +32,7 @@
qdel(src)
if(1)
if(P.is_wrench())
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
to_chat(user, "You unfasten the frame.")
src.anchored = 0
@@ -40,7 +40,7 @@
if(istype(P, /obj/item/weapon/circuitboard) && !circuit)
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "computer")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You place the circuit board inside the frame.")
src.icon_state = "1"
src.circuit = P
@@ -49,12 +49,12 @@
else
to_chat(user, "This frame does not accept circuit boards of this type!")
if(P.is_screwdriver() && circuit)
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You screw the circuit board into place.")
src.state = 2
src.icon_state = "2"
if(P.is_crowbar()) && circuit)
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You remove the circuit board.")
src.state = 1
src.icon_state = "0"
@@ -62,7 +62,7 @@
src.circuit = null
if(2)
if(P.is_screwdriver() && circuit)
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You unfasten the circuit board.")
src.state = 1
src.icon_state = "1"
@@ -72,7 +72,7 @@
to_chat(user, "You need five coils of wire to add them to the frame.")
return
to_chat(user, "You start to add cables to the frame.")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && state == 2)
if (C.use(5))
to_chat(user, "You add cables to the frame.")
@@ -80,7 +80,7 @@
icon_state = "3"
if(3)
if(P.is_wirecutter())
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You remove the cables.")
src.state = 2
src.icon_state = "2"
@@ -92,7 +92,7 @@
if (G.get_amount() < 2)
to_chat(user, "You need two sheets of glass to put in the glass panel.")
return
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You start to put in the glass panel.")
if(do_after(user, 20) && state == 3)
if (G.use(2))
@@ -101,13 +101,13 @@
src.icon_state = "4"
if(4)
if(P.is_crowbar())
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You remove the glass panel.")
src.state = 3
src.icon_state = "3"
new /obj/item/stack/material/glass( src.loc, 2 )
if(P.is_screwdriver())
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You connect the monitor.")
var/B = new src.circuit.build_path ( src.loc )
src.circuit.construct(B)
diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm
index 441970a8cb..dbd5ba8383 100644
--- a/code/game/machinery/computer/pod.dm
+++ b/code/game/machinery/computer/pod.dm
@@ -51,7 +51,7 @@
/*
/obj/machinery/computer/pod/attackby(I as obj, user as mob)
if(I.is_screwdriver())
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
if(do_after(user, 20))
if(stat & BROKEN)
to_chat(user, "The broken glass falls out.")
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index aa9c230e22..3717da58c5 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -33,7 +33,7 @@
if (C.get_amount() < 5)
to_chat(user, "You need five lengths of cable to add them to the frame.")
return
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You start to add cables to the frame.")
if(do_after(user, 20) && state == 1)
if(C.use(5))
@@ -50,7 +50,7 @@
if(istype(P, /obj/item/weapon/circuitboard))
var/obj/item/weapon/circuitboard/B = P
if(B.board_type == "machine")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You add the circuit board to the frame.")
circuit = P
user.drop_item()
@@ -72,7 +72,7 @@
to_chat(user, "This frame does not accept circuit boards of this type!")
else
if(P.is_wirecutter())
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You remove the cables.")
state = 1
icon_state = "box_0"
@@ -103,7 +103,7 @@
component_check = 0
break
if(component_check)
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
var/obj/machinery/new_machine = new src.circuit.build_path(src.loc, src.dir)
if(new_machine.component_parts)
@@ -131,7 +131,7 @@
if(istype(P, /obj/item))
for(var/I in req_components)
if(istype(P, text2path(I)) && (req_components[I] > 0))
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(P.is_cable_coil))
var/obj/item/stack/cable_coil/CP = P
if(CP.get_amount() > 1)
diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm
index 42725bbe28..05eb9c322c 100644
--- a/code/game/machinery/deployable.dm
+++ b/code/game/machinery/deployable.dm
@@ -57,7 +57,7 @@ Barricades
if("brute")
health -= W.force * 0.75
if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD)))
- playsound(loc, 'sound/effects/woodcutting.ogg', 100, 1)
+ playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
else
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
CheckHealth()
@@ -76,9 +76,9 @@ Barricades
/obj/structure/barricade/attack_generic(var/mob/user, var/damage, var/attack_verb)
visible_message("[user] [attack_verb] the [src]!")
if(material == get_material_by_name("resin"))
- playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
else if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD)))
- playsound(loc, 'sound/effects/woodcutting.ogg', 100, 1)
+ playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
else
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
user.do_attack_animation(src)
diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm
index e4a81d675c..b8f7acd5bf 100644
--- a/code/game/machinery/door_control.dm
+++ b/code/game/machinery/door_control.dm
@@ -31,7 +31,7 @@
if(req_access.len || req_one_access.len)
req_access = list()
req_one_access = list()
- playsound(src.loc, "sparks", 100, 1)
+ playsound(src, "sparks", 100, 1)
return 1
/obj/machinery/button/remote/attack_hand(mob/user as mob)
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index cd01d861c9..f5c42b8bb6 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -73,7 +73,7 @@
if(do_after(user,5 SECONDS,src))
visible_message("\The [user] forces \the [src] open, sparks flying from its electronics!")
src.do_animate("spark")
- playsound(src.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
+ playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1)
src.locked = 0
src.welded = 0
update_icon()
@@ -82,7 +82,7 @@
else if(src.density)
visible_message("\The [user] begins forcing \the [src] open!")
if(do_after(user, 5 SECONDS,src))
- playsound(src.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
+ playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1)
visible_message("\The [user] forces \the [src] open!")
open(1)
else
@@ -900,7 +900,7 @@ About the new airlock wires panel:
src.welded = 1
else
src.welded = null
- playsound(src.loc, C.usesound, 75, 1)
+ playsound(src, C.usesound, 75, 1)
src.update_icon()
return
else
@@ -1020,9 +1020,9 @@ About the new airlock wires panel:
//if the door is unpowered then it doesn't make sense to hear the woosh of a pneumatic actuator
if(arePowerSystemsOn())
- playsound(src.loc, open_sound_powered, 50, 1)
+ playsound(src, open_sound_powered, 50, 1)
else
- playsound(src.loc, open_sound_unpowered, 75, 1)
+ playsound(src, open_sound_unpowered, 75, 1)
if(src.closeOther != null && istype(src.closeOther, /obj/machinery/door/airlock/) && !src.closeOther.density)
src.closeOther.close()
@@ -1104,7 +1104,7 @@ About the new airlock wires panel:
for(var/atom/movable/AM in turf)
if(AM.blocks_airlock())
if(!has_beeped)
- playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
+ playsound(src, 'sound/machines/buzz-two.ogg', 50, 0)
has_beeped = 1
close_door_at = world.time + 6
return
@@ -1117,9 +1117,9 @@ About the new airlock wires panel:
use_power(360) //360 W seems much more appropriate for an actuator moving an industrial door capable of crushing people
has_beeped = 0
if(arePowerSystemsOn())
- playsound(src.loc, close_sound_powered, 50, 1)
+ playsound(src, close_sound_powered, 50, 1)
else
- playsound(src.loc, open_sound_unpowered, 75, 1)
+ playsound(src, open_sound_unpowered, 75, 1)
for(var/turf/turf in locs)
var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
if(killthis)
diff --git a/code/game/machinery/doors/blast_door.dm b/code/game/machinery/doors/blast_door.dm
index 5ff587a7d9..136b793f10 100644
--- a/code/game/machinery/doors/blast_door.dm
+++ b/code/game/machinery/doors/blast_door.dm
@@ -100,7 +100,7 @@
// Description: Opens or closes the door, depending on current state. No checks are done inside this proc.
/obj/machinery/door/blast/proc/force_toggle(var/forced = 0, mob/user as mob)
if (forced)
- playsound(src.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
+ playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1)
if(src.density)
src.force_open()
@@ -150,7 +150,7 @@
user.visible_message("\The [user] hits \the [src] with \the [W] with no visible effect.")
else
user.visible_message("\The [user] forcefully strikes \the [src] with \the [W]!")
- playsound(src.loc, hitsound, 100, 1)
+ playsound(src, hitsound, 100, 1)
take_damage(W.force*0.35) //it's a blast door, it should take a while. -Luke
return
@@ -180,7 +180,7 @@
user.visible_message("\The [user] hits \the [src] with \the [W] with no visible effect.")
else
user.visible_message("\The [user] forcefully strikes \the [src] with \the [W]!")
- playsound(src.loc, hitsound, 100, 1)
+ playsound(src, hitsound, 100, 1)
take_damage(W.force*0.15) //If the item isn't a weapon, let's make this take longer than usual to break it down.
return
@@ -194,13 +194,13 @@
if(src.density)
visible_message("\The [user] begins forcing \the [src] open!")
if(do_after(user, 15 SECONDS,src))
- playsound(src.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
+ playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1)
visible_message("\The [user] forces \the [src] open!")
force_open(1)
else
visible_message("\The [user] begins forcing \the [src] closed!")
if(do_after(user, 5 SECONDS,src))
- playsound(src.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
+ playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1)
visible_message("\The [user] forces \the [src] closed!")
force_close(1)
else
diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm
index 57d7a4eebf..8b8fa2da51 100644
--- a/code/game/machinery/doors/door.dm
+++ b/code/game/machinery/doors/door.dm
@@ -194,7 +194,7 @@
tforce = 15 * (speed/5)
else
tforce = AM:throwforce * (speed/5)
- playsound(src.loc, hitsound, 100, 1)
+ playsound(src, hitsound, 100, 1)
take_damage(tforce)
return
@@ -280,7 +280,7 @@
user.visible_message("\The [user] hits \the [src] with \the [W] with no visible effect.")
else
user.visible_message("\The [user] forcefully strikes \the [src] with \the [W]!")
- playsound(src.loc, hitsound, 100, 1)
+ playsound(src, hitsound, 100, 1)
take_damage(W.force)
return
@@ -405,7 +405,7 @@
if("deny")
if(density && !(stat & (NOPOWER|BROKEN)))
flick("door_deny", src)
- playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
+ playsound(src, 'sound/machines/buzz-two.ogg', 50, 0)
return
diff --git a/code/game/machinery/doors/firedoor.dm b/code/game/machinery/doors/firedoor.dm
index e4c83ef1bf..52ea077669 100644
--- a/code/game/machinery/doors/firedoor.dm
+++ b/code/game/machinery/doors/firedoor.dm
@@ -200,14 +200,14 @@
if(src.blocked)
visible_message("\The [user] begins digging into \the [src] internals!")
if(do_after(user,5 SECONDS,src))
- playsound(src.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
+ playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1)
src.blocked = 0
update_icon()
open(1)
else if(src.density)
visible_message("\The [user] begins forcing \the [src] open!")
if(do_after(user, 2 SECONDS,src))
- playsound(src.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
+ playsound(src, 'sound/machines/airlock_creaking.ogg', 100, 1)
visible_message("\The [user] forces \the [src] open!")
open(1)
else
diff --git a/code/game/machinery/doors/firedoor_assembly.dm b/code/game/machinery/doors/firedoor_assembly.dm
index 4eeec7c5ff..aa857d5065 100644
--- a/code/game/machinery/doors/firedoor_assembly.dm
+++ b/code/game/machinery/doors/firedoor_assembly.dm
@@ -32,7 +32,7 @@ obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob)
to_chat(user, "You wire \the [src].")
else if(C.is_wirecutter() && wired )
- playsound(src.loc, C.usesound, 100, 1)
+ playsound(src, C.usesound, 100, 1)
user.visible_message("[user] cuts the wires from \the [src].", "You start to cut the wires from \the [src].")
if(do_after(user, 40))
@@ -43,7 +43,7 @@ obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob)
else if(istype(C, /obj/item/weapon/circuitboard/airalarm) && wired)
if(anchored)
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("[user] has inserted a circuit into \the [src]!",
"You have inserted the circuit into \the [src]!")
if(glass)
@@ -56,7 +56,7 @@ obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob)
to_chat(user, "You must secure \the [src] first!")
else if(C.is_wrench())
anchored = !anchored
- playsound(src.loc, C.usesound, 50, 1)
+ playsound(src, C.usesound, 50, 1)
user.visible_message("[user] has [anchored ? "" : "un" ]secured \the [src]!",
"You have [anchored ? "" : "un" ]secured \the [src]!")
update_icon()
@@ -86,7 +86,7 @@ obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob)
else if(istype(C, /obj/item/stack/material) && C.get_material_name() == "rglass" && !glass)
var/obj/item/stack/S = C
if (S.get_amount() >= 1)
- playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
+ playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to \the [src].",
"You start to install [S.name] into \the [src].")
if(do_after(user, 40, src) && !glass && S.use(1))
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index f7b8a1222d..98fb1c75d8 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -115,7 +115,7 @@
if (!operating) //in case of emag
operating = 1
flick(text("[src.base_state]opening"), src)
- playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1)
+ playsound(src, 'sound/machines/windowdoor.ogg', 100, 1)
sleep(10)
explosion_resistance = 0
@@ -132,7 +132,7 @@
return FALSE
operating = TRUE
flick(text("[]closing", src.base_state), src)
- playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1)
+ playsound(src, 'sound/machines/windowdoor.ogg', 100, 1)
density = TRUE
update_icon()
@@ -158,7 +158,7 @@
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.can_shred(H))
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
visible_message("[user] smashes against the [src.name].", 1)
user.do_attack_animation(src)
user.setClickCooldown(user.get_attack_speed())
@@ -212,8 +212,8 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
- playsound(src.loc, "sparks", 50, 1)
- playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, "sparks", 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
visible_message("The glass door was sliced open by [user]!")
return 1
@@ -259,7 +259,7 @@
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card))
user.setClickCooldown(user.get_attack_speed(I))
var/aforce = I.force
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
visible_message("[src] was hit by [I].")
if(I.damtype == BRUTE || I.damtype == BURN)
take_damage(aforce)
diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm
index a9b4a0705e..fa95fed959 100644
--- a/code/game/machinery/fire_alarm.dm
+++ b/code/game/machinery/fire_alarm.dm
@@ -208,7 +208,7 @@ FIRE ALARM
for(var/obj/machinery/firealarm/FA in area)
fire_alarm.triggerAlarm(loc, FA, duration, hidden = alarms_hidden)
update_icon()
- playsound(src.loc, 'sound/machines/airalarm.ogg', 25, 0, 4)
+ playsound(src, 'sound/machines/airalarm.ogg', 25, 0, 4)
return
/obj/machinery/firealarm/proc/set_security_level(var/newlevel)
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index 572977ceb4..ad82ffd656 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -13,7 +13,6 @@
anchored = 1
use_power = USE_POWER_IDLE
idle_power_usage = 2
- flags = PROXMOVE
/obj/machinery/flasher/portable //Portable version of the flasher. Only flashes when anchored
name = "portable flasher"
@@ -57,7 +56,7 @@
if((disable) || (last_flash && world.time < last_flash + 150))
return
- playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
+ playsound(src, 'sound/weapons/flash.ogg', 100, 1)
flick("[base_state]_flash", src)
last_flash = world.time
use_power(1500)
@@ -92,13 +91,13 @@
flash()
..(severity)
-/obj/machinery/flasher/portable/HasProximity(atom/movable/AM as mob|obj)
- if((disable) || (last_flash && world.time < last_flash + 150))
+/obj/machinery/flasher/portable/HasProximity(turf/T, atom/movable/AM, oldloc)
+ if(disable || !anchored || (last_flash && world.time < last_flash + 150))
return
- if(istype(AM, /mob/living/carbon))
+ if(iscarbon(AM))
var/mob/living/carbon/M = AM
- if((M.m_intent != "walk") && (anchored))
+ if(M.m_intent != "walk")
flash()
/obj/machinery/flasher/portable/attackby(obj/item/weapon/W as obj, mob/user as mob)
@@ -108,11 +107,13 @@
if(!anchored)
user.show_message(text("[src] can now be moved."))
- overlays.Cut()
-
+ cut_overlays()
+ unsense_proximity(callback = .HasProximity)
+
else if(anchored)
user.show_message(text("[src] is now secured."))
- overlays += "[base_state]-s"
+ add_overlay("[base_state]-s")
+ sense_proximity(callback = .HasProximity)
/obj/machinery/button/flasher
name = "flasher button"
diff --git a/code/game/machinery/floor_light.dm b/code/game/machinery/floor_light.dm
index de51359855..09296ac302 100644
--- a/code/game/machinery/floor_light.dm
+++ b/code/game/machinery/floor_light.dm
@@ -31,7 +31,7 @@ var/list/floor_light_cache = list()
if(!WT.remove_fuel(0, user))
to_chat(user, "\The [src] must be on to complete this task.")
return
- playsound(src.loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
if(!do_after(user, 20 * WT.toolspeed))
return
if(!src || !WT.isOn())
@@ -53,7 +53,7 @@ var/list/floor_light_cache = list()
stat |= BROKEN
else
visible_message("\The [user] attacks \the [src]!")
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
if(isnull(damaged)) damaged = 0
update_brightness()
return
diff --git a/code/game/machinery/frame.dm b/code/game/machinery/frame.dm
index 789773e8c3..209a06edab 100644
--- a/code/game/machinery/frame.dm
+++ b/code/game/machinery/frame.dm
@@ -274,7 +274,7 @@
if(P.is_wrench())
if(state == FRAME_PLACED && !anchored)
to_chat(user, "You start to wrench the frame into place.")
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
anchored = TRUE
if(!need_circuit && circuit)
@@ -295,7 +295,7 @@
if(state == FRAME_PLACED)
var/obj/item/weapon/weldingtool/WT = P
if(WT.remove_fuel(0, user))
- playsound(src.loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
if(do_after(user, 20 * P.toolspeed))
if(src && WT.isOn())
to_chat(user, "You deconstruct the frame.")
@@ -311,7 +311,7 @@
var/obj/item/weapon/circuitboard/B = P
var/datum/frame/frame_types/board_type = B.board_type
if(board_type.name == frame_type.name)
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You place the circuit board inside the frame.")
circuit = P
user.drop_item()
@@ -464,7 +464,7 @@
to_chat(user, "You need five coils of wire to add them to the frame.")
return
to_chat(user, "You start to add cables to the frame.")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && state == FRAME_FASTENED)
if(C.use(5))
to_chat(user, "You add cables to the frame.")
@@ -475,7 +475,7 @@
if(frame_type.frame_class == FRAME_CLASS_MACHINE)
for(var/I in req_components)
if(istype(P, I) && (req_components[I] > 0))
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(istype(P, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CP = P
if(CP.get_amount() > 1)
@@ -524,7 +524,7 @@
if(G.get_amount() < 2)
to_chat(user, "You need two sheets of glass to put in the glass panel.")
return
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You start to put in the glass panel.")
if(do_after(user, 20) && state == FRAME_WIRED)
if(G.use(2))
@@ -536,7 +536,7 @@
if(G.get_amount() < 2)
to_chat(user, "You need two sheets of glass to put in the glass panel.")
return
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You start to put in the glass panel.")
if(do_after(user, 20) && state == FRAME_WIRED)
if(G.use(2))
@@ -548,7 +548,7 @@
if(frame_type.frame_class == FRAME_CLASS_MACHINE)
for(var/I in req_components)
if(istype(P, I) && (req_components[I] > 0))
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(istype(P, /obj/item/stack))
var/obj/item/stack/ST = P
if(ST.get_amount() > 1)
diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm
index 344a800acf..b2bacc13d9 100644
--- a/code/game/machinery/jukebox.dm
+++ b/code/game/machinery/jukebox.dm
@@ -142,7 +142,7 @@ datum/track/New(var/title_name, var/audio)
StopPlaying()
else if(href_list["play"])
if(emagged)
- playsound(src.loc, 'sound/items/AirHorn.ogg', 100, 1)
+ playsound(src, 'sound/items/AirHorn.ogg', 100, 1)
for(var/mob/living/carbon/M in ohearers(6, src))
if(M.get_ear_protection() >= 2)
continue
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index c964416c03..4c05222f49 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -306,7 +306,7 @@ Class Procs:
text = "\The [src] pings."
state(text, "blue")
- playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
+ playsound(src, 'sound/machines/ping.ogg', 50, 0)
/obj/machinery/proc/shock(mob/user, prb)
if(inoperable())
@@ -371,7 +371,7 @@ Class Procs:
return FALSE
if(panel_open)
return FALSE // Close panel first!
- playsound(loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
var/actual_time = W.toolspeed * time
if(actual_time != 0)
user.visible_message( \
@@ -432,12 +432,12 @@ Class Procs:
if(!panel_open)
return 0
user.visible_message("[user] has cut the wires inside \the [src]!", "You have cut the wires inside \the [src].")
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
new/obj/item/stack/cable_coil(get_turf(src), 5)
. = dismantle()
/obj/machinery/proc/dismantle()
- playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
+ playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
//TFF 3/6/19 - port Cit RP fix of infinite frames. If it doesn't have a circuit board, don't create a frame. Return a smack instead. BONK!
if(!circuit)
return 0
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 5383eb67fd..ff16c8d044 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -904,7 +904,7 @@ obj/item/weapon/newspaper/Topic(href, href_list)
if(curr_page == 0) //We're at the start, get to the middle
screen = 1
curr_page++
- playsound(loc, "pageturn", 50, 1)
+ playsound(src, "pageturn", 50, 1)
else if(href_list["prev_page"])
if(curr_page == 0)
@@ -916,7 +916,7 @@ obj/item/weapon/newspaper/Topic(href, href_list)
if(curr_page == pages+1) //we're at the end, let's go back to the middle.
screen = 1
curr_page--
- playsound(src.loc, "pageturn", 50, 1)
+ playsound(src, "pageturn", 50, 1)
if(istype(src.loc, /mob))
attack_self(src.loc)
@@ -974,9 +974,9 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
spawn(300)
alert = 0
update_icon()
- playsound(src.loc, 'sound/machines/twobeep.ogg', 75, 1)
+ playsound(src, 'sound/machines/twobeep.ogg', 75, 1)
else
for(var/mob/O in hearers(world.view-1, T))
O.show_message("[name] beeps, \"Attention! Wanted issue distributed!\"",2)
- playsound(src.loc, 'sound/machines/warning-buzzer.ogg', 75, 1)
+ playsound(src, 'sound/machines/warning-buzzer.ogg', 75, 1)
return
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index b67f3738bd..436f738efc 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -549,12 +549,12 @@
if(do_after(user, 50 * I.toolspeed))
//This code handles moving the turret around. After all, it's a portable turret!
if(!anchored)
- playsound(loc, I.usesound, 100, 1)
+ playsound(src, I.usesound, 100, 1)
anchored = TRUE
update_icon()
to_chat(user, "You secure the exterior bolts on the turret.")
else if(anchored)
- playsound(loc, I.usesound, 100, 1)
+ playsound(src, I.usesound, 100, 1)
anchored = FALSE
to_chat(user, "You unsecure the exterior bolts on the turret.")
update_icon()
@@ -890,10 +890,10 @@
var/obj/item/projectile/A
if(emagged || lethal)
A = new lethal_projectile(loc)
- playsound(loc, lethal_shot_sound, 75, 1)
+ playsound(src, lethal_shot_sound, 75, 1)
else
A = new projectile(loc)
- playsound(loc, shot_sound, 75, 1)
+ playsound(src, shot_sound, 75, 1)
// Lethal/emagged turrets use twice the power due to higher energy beams
// Emagged turrets again use twice as much power due to higher firing rates
@@ -966,14 +966,14 @@
switch(build_step)
if(0) //first step
if(I.is_wrench() && !anchored)
- playsound(loc, I.usesound, 100, 1)
+ playsound(src, I.usesound, 100, 1)
to_chat(user, "You secure the external bolts.")
anchored = TRUE
build_step = 1
return
else if(I.is_crowbar() && !anchored)
- playsound(loc, I.usesound, 75, 1)
+ playsound(src, I.usesound, 75, 1)
to_chat(user, "You dismantle the turret construction.")
new /obj/item/stack/material/steel(loc, 5)
qdel(src)
@@ -991,7 +991,7 @@
return
else if(I.is_wrench())
- playsound(loc, I.usesound, 75, 1)
+ playsound(src, I.usesound, 75, 1)
to_chat(user, "You unfasten the external bolts.")
anchored = FALSE
build_step = 0
@@ -999,7 +999,7 @@
if(2)
if(I.is_wrench())
- playsound(loc, I.usesound, 100, 1)
+ playsound(src, I.usesound, 100, 1)
to_chat(user, "You bolt the metal armor into place.")
build_step = 3
return
@@ -1012,7 +1012,7 @@
to_chat(user, "You need more fuel to complete this task.")
return
- playsound(loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
if(do_after(user, 20 * I.toolspeed))
if(!src || !WT.remove_fuel(5, user)) return
build_step = 1
@@ -1039,7 +1039,7 @@
return
else if(I.is_wrench())
- playsound(loc, I.usesound, 100, 1)
+ playsound(src, I.usesound, 100, 1)
to_chat(user, "You remove the turret's metal armor bolts.")
build_step = 2
return
@@ -1058,7 +1058,7 @@
if(5)
if(I.is_screwdriver())
- playsound(loc, I.usesound, 100, 1)
+ playsound(src, I.usesound, 100, 1)
build_step = 6
to_chat(user, "You close the internal access hatch.")
return
@@ -1076,7 +1076,7 @@
return
else if(I.is_screwdriver())
- playsound(loc, I.usesound, 100, 1)
+ playsound(src, I.usesound, 100, 1)
build_step = 5
to_chat(user, "You open the internal access hatch.")
return
@@ -1088,7 +1088,7 @@
if(WT.get_fuel() < 5)
to_chat(user, "You need more fuel to complete this task.")
- playsound(loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
if(do_after(user, 30 * WT.toolspeed))
if(!src || !WT.remove_fuel(5, user))
return
@@ -1106,7 +1106,7 @@
qdel(src) // qdel
else if(I.is_crowbar())
- playsound(loc, I.usesound, 75, 1)
+ playsound(src, I.usesound, 75, 1)
to_chat(user, "You pry off the turret's exterior armor.")
new /obj/item/stack/material/steel(loc, 2)
build_step = 6
diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm
index 9a50c34aad..ab78094832 100644
--- a/code/game/machinery/recharger.dm
+++ b/code/game/machinery/recharger.dm
@@ -84,7 +84,7 @@
return
anchored = !anchored
to_chat(user, "You [anchored ? "attached" : "detached"] [src].")
- playsound(loc, G.usesound, 75, 1)
+ playsound(src, G.usesound, 75, 1)
else if(default_deconstruction_screwdriver(user, G))
return
else if(default_deconstruction_crowbar(user, G))
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index 8c2b1729cb..664d1c686f 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -206,7 +206,7 @@
protected = 1
if(!protected)
- playsound(src.loc, "sparks", 75, 1, -1)
+ playsound(src, "sparks", 75, 1, -1)
to_chat(user, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.")
return*/
else //welp, the guy is protected, we can continue
@@ -232,7 +232,7 @@
protected = 1
if(!protected)
- playsound(src.loc, "sparks", 75, 1, -1)
+ playsound(src, "sparks", 75, 1, -1)
to_chat(user, "You try to touch the controls but you get zapped. There must be a short circuit somewhere.")
return*/
else
diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm
index f04cf7076a..8cd1d8811e 100644
--- a/code/game/machinery/telecomms/logbrowser.dm
+++ b/code/game/machinery/telecomms/logbrowser.dm
@@ -192,7 +192,7 @@
/obj/machinery/computer/telecomms/server/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
to_chat(user, "You you disable the security protocols")
src.updateUsrDialog()
diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm
index 819108b2ce..51a6ebf991 100644
--- a/code/game/machinery/telecomms/telemonitor.dm
+++ b/code/game/machinery/telecomms/telemonitor.dm
@@ -127,7 +127,7 @@
/obj/machinery/computer/telecomms/monitor/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
to_chat(user, "You you disable the security protocols")
src.updateUsrDialog()
diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm
index 686a764ada..51c09d95e3 100644
--- a/code/game/machinery/telecomms/traffic_control.dm
+++ b/code/game/machinery/telecomms/traffic_control.dm
@@ -210,7 +210,7 @@
/obj/machinery/computer/telecomms/traffic/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
to_chat(user, "You you disable the security protocols")
src.updateUsrDialog()
diff --git a/code/game/machinery/transformer.dm b/code/game/machinery/transformer.dm
index c9c8ba20ae..621feae713 100644
--- a/code/game/machinery/transformer.dm
+++ b/code/game/machinery/transformer.dm
@@ -28,14 +28,14 @@
if(stat & (BROKEN|NOPOWER))
return
if(!transform_dead && H.stat == DEAD)
- playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
+ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
return
- playsound(src.loc, 'sound/items/Welder.ogg', 50, 1)
+ playsound(src, 'sound/items/Welder.ogg', 50, 1)
use_power(5000) // Use a lot of power.
var/mob/living/silicon/robot = H.Robotize()
robot.SetLockDown()
spawn(50) // So he can't jump out the gate right away.
- playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
+ playsound(src, 'sound/machines/ping.ogg', 50, 0)
if(robot)
robot.SetLockDown(0)
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 364c30ad73..868313258b 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -253,7 +253,7 @@
*/
/obj/machinery/vending/proc/pay_with_ewallet(var/obj/item/weapon/spacecash/ewallet/wallet)
visible_message("\The [usr] swipes \the [wallet] through \the [src].")
- playsound(src.loc, 'sound/machines/id_swipe.ogg', 50, 1)
+ playsound(src, 'sound/machines/id_swipe.ogg', 50, 1)
if(currently_vending.price > wallet.worth)
status_message = "Insufficient funds on chargecard."
status_error = 1
@@ -274,7 +274,7 @@
visible_message("\The [usr] swipes \the [I] through \the [src].")
else
visible_message("\The [usr] swipes \the [ID_container] through \the [src].")
- playsound(src.loc, 'sound/machines/id_swipe.ogg', 50, 1)
+ playsound(src, 'sound/machines/id_swipe.ogg', 50, 1)
var/datum/money_account/customer_account = get_account(I.associated_account_number)
if(!customer_account)
status_message = "Error: Unable to access account. Please contact technical support if problem persists."
@@ -430,7 +430,7 @@
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
to_chat(usr, "Access denied.") //Unless emagged of course
flick("[icon_state]-deny",src)
- playsound(src.loc, 'sound/machines/deniedbeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/deniedbeep.ogg', 50, 0)
return
var/key = text2num(href_list["vend"])
@@ -467,7 +467,7 @@
if((!allowed(usr)) && !emagged && scan_id) //For SECURE VENDING MACHINES YEAH
to_chat(usr, "Access denied.") //Unless emagged of course
flick("[icon_state]-deny",src)
- playsound(src.loc, 'sound/machines/deniedbeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/deniedbeep.ogg', 50, 0)
return
vend_ready = 0 //One thing at a time!!
status_message = "Vending..."
@@ -506,7 +506,7 @@
sleep(3)
if(R.get_product(get_turf(src)))
visible_message("\The [src] clunks as it vends an additional item.")
- playsound(src.loc, "sound/[vending_sound]", 100, 1, 1)
+ playsound(src, "sound/[vending_sound]", 100, 1, 1)
status_message = ""
status_error = 0
@@ -778,10 +778,10 @@
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
product_ads = "The healthiest!;Award-winning chocolate bars!;Mmm! So good!;Oh my god it's so juicy!;Have a snack.;Snacks are good for you!;Have some more Getmore!;Best quality snacks straight from mars.;We love chocolate!;Try our new jerky!"
icon_state = "snack"
- products = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 6,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 6,/obj/item/weapon/reagent_containers/food/snacks/chips =6,
- /obj/item/weapon/reagent_containers/food/snacks/sosjerky = 6,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 6,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 6,
- /obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6, /obj/item/weapon/reagent_containers/food/snacks/tastybread = 6, /obj/item/weapon/reagent_containers/food/snacks/skrellsnacks = 3)
- contraband = list(/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6,/obj/item/weapon/reagent_containers/food/snacks/unajerky = 6,)
+ products = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 12,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 12,/obj/item/weapon/reagent_containers/food/snacks/chips =12,
+ /obj/item/weapon/reagent_containers/food/snacks/sosjerky = 12,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 12,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 12,
+ /obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 12, /obj/item/weapon/reagent_containers/food/snacks/tastybread = 12, /obj/item/weapon/reagent_containers/food/snacks/skrellsnacks = 6)
+ contraband = list(/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6,/obj/item/weapon/reagent_containers/food/snacks/unajerky = 12,)
prices = list(/obj/item/weapon/reagent_containers/food/snacks/candy = 1,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 5,/obj/item/weapon/reagent_containers/food/snacks/chips = 1,
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 2,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 1,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 1,
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 1, /obj/item/weapon/reagent_containers/food/snacks/tastybread = 2, /obj/item/weapon/reagent_containers/food/snacks/skrellsnacks = 4)
@@ -810,11 +810,11 @@
name = "SweatMAX"
desc = "Fueled by your inner inadequacy!"
icon_state = "fitness"
- products = list(/obj/item/weapon/reagent_containers/food/drinks/smallmilk = 8,
- /obj/item/weapon/reagent_containers/food/drinks/smallchocmilk = 8,
+ products = list(/obj/item/weapon/reagent_containers/food/drinks/smallmilk = 16,
+ /obj/item/weapon/reagent_containers/food/drinks/smallchocmilk = 16,
/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask/proteinshake = 8,
/obj/item/weapon/reagent_containers/food/drinks/glass2/fitnessflask = 8,
- /obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar = 8,
+ /obj/item/weapon/reagent_containers/food/snacks/candy/proteinbar = 16,
/obj/item/weapon/reagent_containers/food/snacks/liquidfood = 8,
/obj/item/weapon/reagent_containers/pill/diet = 8,
/obj/item/weapon/reagent_containers/hypospray/autoinjector/biginjector/glucose = 5,
@@ -851,13 +851,13 @@
product_ads = "Probably not bad for you!;Don't believe the scientists!;It's good for you!;Don't quit, buy more!;Smoke!;Nicotine heaven.;Best cigarettes since 2150.;Award-winning cigs.;Feeling temperamental? Try a Temperamento!;Carcinoma Angels - go fuck yerself!;Don't be so hard on yourself, kid. Smoke a Lucky Star!"
vend_delay = 34
icon_state = "cigs"
- products = list(/obj/item/weapon/storage/fancy/cigarettes = 5,
- /obj/item/weapon/storage/fancy/cigarettes/dromedaryco = 5,
- /obj/item/weapon/storage/fancy/cigarettes/killthroat = 5,
- /obj/item/weapon/storage/fancy/cigarettes/luckystars = 5,
- /obj/item/weapon/storage/fancy/cigarettes/jerichos = 5,
- /obj/item/weapon/storage/fancy/cigarettes/menthols = 5,
- /obj/item/weapon/storage/rollingpapers = 5,
+ products = list(/obj/item/weapon/storage/fancy/cigarettes = 10,
+ /obj/item/weapon/storage/fancy/cigarettes/dromedaryco = 10,
+ /obj/item/weapon/storage/fancy/cigarettes/killthroat = 10,
+ /obj/item/weapon/storage/fancy/cigarettes/luckystars = 10,
+ /obj/item/weapon/storage/fancy/cigarettes/jerichos = 10,
+ /obj/item/weapon/storage/fancy/cigarettes/menthols = 10,
+ /obj/item/weapon/storage/rollingpapers = 10,
/obj/item/weapon/storage/box/matches = 10,
/obj/item/weapon/flame/lighter/random = 4,
/obj/item/clothing/mask/smokable/ecig/util = 2,
diff --git a/code/game/mecha/combat/fighter.dm b/code/game/mecha/combat/fighter.dm
index 171c96395e..c87af14617 100644
--- a/code/game/mecha/combat/fighter.dm
+++ b/code/game/mecha/combat/fighter.dm
@@ -164,7 +164,7 @@
else if(moved && gravity && !ground_capable)
occupant_message("Collision alert! Vehicle not rated for use in gravity!")
take_damage(NOGRAV_FIGHTER_DAMAGE, "brute")
- playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
+ playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
/obj/mecha/combat/fighter/handle_equipment_movement()
. = ..()
diff --git a/code/game/mecha/combat/gorilla.dm b/code/game/mecha/combat/gorilla.dm
index e413fc892a..2f75de4a15 100644
--- a/code/game/mecha/combat/gorilla.dm
+++ b/code/game/mecha/combat/gorilla.dm
@@ -179,7 +179,7 @@
src.occupant_message("Zoom mode [zoom?"en":"dis"]abled.")
if(zoom)
src.occupant.set_viewsize(12)
- playsound(src.occupant, 'sound/mecha/imag_enh.ogg',50)
+ playsound(src, 'sound/mecha/imag_enh.ogg',50)
else
src.occupant.set_viewsize() // Reset to default
return
diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm
index 30ea5ea738..87a107f2c0 100644
--- a/code/game/mecha/equipment/mecha_equipment.dm
+++ b/code/game/mecha/equipment/mecha_equipment.dm
@@ -28,7 +28,7 @@
sleep(equip_cooldown)
set_ready_state(1)
if(ready_sound) //Kind of like the kinetic accelerator.
- playsound(loc, ready_sound, 50, 1, -1)
+ playsound(src, ready_sound, 50, 1, -1)
if(target && chassis)
return 1
return 0
diff --git a/code/game/mecha/equipment/tools/clamp.dm b/code/game/mecha/equipment/tools/clamp.dm
index a587d89568..6091764c2b 100644
--- a/code/game/mecha/equipment/tools/clamp.dm
+++ b/code/game/mecha/equipment/tools/clamp.dm
@@ -33,7 +33,7 @@
if(FD.blocked)
FD.visible_message("\The [chassis] begins prying on \the [FD]!")
if(do_after(chassis.occupant,10 SECONDS,FD))
- playsound(FD.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
+ playsound(FD, 'sound/machines/airlock_creaking.ogg', 100, 1)
FD.blocked = 0
FD.update_icon()
FD.open(1)
@@ -41,7 +41,7 @@
else if(FD.density)
FD.visible_message("\The [chassis] begins forcing \the [FD] open!")
if(do_after(chassis.occupant, 5 SECONDS,FD))
- playsound(FD.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
+ playsound(FD, 'sound/machines/airlock_creaking.ogg', 100, 1)
FD.visible_message("\The [chassis] forces \the [FD] open!")
FD.open(1)
else
@@ -57,7 +57,7 @@
if(do_after(chassis.occupant, 15 SECONDS,AD) && chassis.Adjacent(AD))
AD.welded = FALSE
AD.update_icon()
- playsound(AD.loc, 'sound/machines/airlock_creaking.ogg', 100, 1)
+ playsound(AD, 'sound/machines/airlock_creaking.ogg', 100, 1)
AD.visible_message("\The [chassis] tears \the [AD] open!")
if(!AD.welded)
if(density)
@@ -100,15 +100,15 @@
M.adjustOxyLoss(round(dam_force/2))
M.updatehealth()
occupant_message("You squeeze [target] with [src.name]. Something cracks.")
- playsound(src.loc, "fracture", 5, 1, -2) //CRACK
+ playsound(src, "fracture", 5, 1, -2) //CRACK
chassis.visible_message("[chassis] squeezes [target].")
else if(chassis.occupant.a_intent == I_DISARM && enable_special)
- playsound(src.loc, 'sound/mecha/hydraulic.ogg', 10, 1, -2)
+ playsound(src, 'sound/mecha/hydraulic.ogg', 10, 1, -2)
M.take_overall_damage(dam_force/2)
M.adjustOxyLoss(round(dam_force/3))
M.updatehealth()
occupant_message("You slam [target] with [src.name]. Something cracks.")
- playsound(src.loc, "fracture", 3, 1, -2) //CRACK 2
+ playsound(src, "fracture", 3, 1, -2) //CRACK 2
chassis.visible_message("[chassis] slams [target].")
M.throw_at(get_step(M,get_dir(src, M)), 14, 1.5, chassis)
else
diff --git a/code/game/mecha/equipment/tools/cloak.dm b/code/game/mecha/equipment/tools/cloak.dm
index 6f6ddd1c8f..e78a4f7395 100644
--- a/code/game/mecha/equipment/tools/cloak.dm
+++ b/code/game/mecha/equipment/tools/cloak.dm
@@ -46,7 +46,7 @@
log_message("Activated.")
cloak_iterator.start()
set_ready_state(0)
- playsound(get_turf(src), 'sound/effects/EMPulse.ogg', 100, 1)
+ playsound(src, 'sound/effects/EMPulse.ogg', 100, 1)
/obj/item/mecha_parts/mecha_equipment/cloak/proc/stop_cloak()
if(chassis)
@@ -54,7 +54,7 @@
log_message("Deactivated.")
cloak_iterator.stop()
set_ready_state(1)
- playsound(get_turf(src), 'sound/effects/EMPulse.ogg', 100, 1)
+ playsound(src, 'sound/effects/EMPulse.ogg', 100, 1)
// These things are so silly
/datum/global_iterator/mecha_cloak/process(var/obj/item/mecha_parts/mecha_equipment/cloak/cloak)
diff --git a/code/game/mecha/equipment/tools/extinguisher.dm b/code/game/mecha/equipment/tools/extinguisher.dm
index d383573017..5bb6cd147c 100644
--- a/code/game/mecha/equipment/tools/extinguisher.dm
+++ b/code/game/mecha/equipment/tools/extinguisher.dm
@@ -25,14 +25,14 @@
var/obj/o = target
var/amount = o.reagents.trans_to_obj(src, 200)
occupant_message("[amount] units transferred into internal tank.")
- playsound(chassis, 'sound/effects/refill.ogg', 50, 1, -6)
+ playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
return
if (src.reagents.total_volume < 1)
occupant_message("\The [src] is empty.")
return
- playsound(chassis, 'sound/effects/extinguish.ogg', 75, 1, -3)
+ playsound(src, 'sound/effects/extinguish.ogg', 75, 1, -3)
var/direction = get_dir(chassis,target)
diff --git a/code/game/mecha/equipment/tools/syringe_gun.dm b/code/game/mecha/equipment/tools/syringe_gun.dm
index 36763c7f12..95c87b6253 100644
--- a/code/game/mecha/equipment/tools/syringe_gun.dm
+++ b/code/game/mecha/equipment/tools/syringe_gun.dm
@@ -67,7 +67,7 @@
syringes -= S
S.icon = 'icons/obj/chemical.dmi'
S.icon_state = "syringeproj"
- playsound(chassis, 'sound/items/syringeproj.ogg', 50, 1)
+ playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
log_message("Launched [S] from [src], targeting [target].")
spawn(-1)
src = null //if src is deleted, still process the syringe
diff --git a/code/game/mecha/equipment/weapons/honk.dm b/code/game/mecha/equipment/weapons/honk.dm
index 921111a6cd..427d53295c 100644
--- a/code/game/mecha/equipment/weapons/honk.dm
+++ b/code/game/mecha/equipment/weapons/honk.dm
@@ -16,7 +16,7 @@
if(!equip_ready)
return 0
- playsound(chassis, 'sound/effects/bang.ogg', 30, 1, 30)
+ playsound(src, 'sound/effects/bang.ogg', 30, 1, 30)
chassis.occupant_message("You emit a high-pitched noise from the mech.")
for(var/mob/living/carbon/M in ohearers(6, chassis))
if(istype(M, /mob/living/carbon/human))
diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm
index 5d01416785..355ce629ac 100644
--- a/code/game/mecha/equipment/weapons/weapons.dm
+++ b/code/game/mecha/equipment/weapons/weapons.dm
@@ -36,7 +36,7 @@
aimloc = locate(targloc.x+GaussRandRound(deviation,1),targloc.y+GaussRandRound(deviation,1),targloc.z)
if(!aimloc || aimloc == curloc || (locs && aimloc in locs))
break
- playsound(chassis, fire_sound, fire_volume, 1)
+ playsound(src, fire_sound, fire_volume, 1)
projectiles--
var/turf/projectile_turf
if(chassis.locs && chassis.locs.len) // Multi tile.
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index eee4088376..b27a5188c3 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -669,12 +669,12 @@
if(!prob(src.deflect_chance))
src.take_damage(15)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
- playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/slash.ogg', 50, 1, -1)
to_chat(user, "You slash at the armored suit!")
visible_message("\The [user] slashes at [src.name]'s armor!")
else
src.log_append_to_last("Armor saved.")
- playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/slash.ogg', 50, 1, -1)
to_chat(user, "Your claws had no effect!")
src.occupant_message("\The [user]'s claws are stopped by the armor.")
visible_message("\The [user] rebounds off [src.name]'s armor!")
@@ -803,14 +803,14 @@
if(!prob(src.deflect_chance))
src.take_damage(6)
src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
- playsound(src.loc, 'sound/effects/blobattack.ogg', 50, 1, -1)
+ playsound(src, 'sound/effects/blobattack.ogg', 50, 1, -1)
to_chat(user, "You smash at the armored suit!")
for (var/mob/V in viewers(src))
if(V.client && !(V.blinded))
V.show_message("\The [user] smashes against [src.name]'s armor!", 1)
else
src.log_append_to_last("Armor saved.")
- playsound(src.loc, 'sound/effects/blobattack.ogg', 50, 1, -1)
+ playsound(src, 'sound/effects/blobattack.ogg', 50, 1, -1)
to_chat(user, "Your attack had no effect!")
src.occupant_message("\The [user]'s attack is stopped by the armor.")
for (var/mob/V in viewers(src))
@@ -2003,7 +2003,7 @@
user.attack_log += text("\[[time_stamp()]\] attacked [src.name]")
else
src.log_append_to_last("Armor saved.")
- playsound(src.loc, 'sound/weapons/slash.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/slash.ogg', 50, 1, -1)
src.occupant_message("\The [user]'s attack is stopped by the armor.")
visible_message("\The [user] rebounds off [src.name]'s armor!")
user.attack_log += text("\[[time_stamp()]\] attacked [src.name]")
diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm
index be698d3f9b..4312de96ed 100644
--- a/code/game/objects/buckling.dm
+++ b/code/game/objects/buckling.dm
@@ -120,7 +120,7 @@
// step_towards(M, src)
. = buckle_mob(M, forced)
- playsound(src.loc, 'sound/effects/seatbelt.ogg', 50, 1)
+ playsound(src, 'sound/effects/seatbelt.ogg', 50, 1)
if(.)
if(!silent)
if(M == user)
@@ -136,7 +136,7 @@
/atom/movable/proc/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
var/mob/living/M = unbuckle_mob(buckled_mob)
- playsound(src.loc, 'sound/effects/seatbelt.ogg', 50, 1)
+ playsound(src, 'sound/effects/seatbelt.ogg', 50, 1)
if(M)
if(M != user)
M.visible_message(\
diff --git a/code/game/objects/effects/alien/aliens.dm b/code/game/objects/effects/alien/aliens.dm
index 1d0c855f71..836e277872 100644
--- a/code/game/objects/effects/alien/aliens.dm
+++ b/code/game/objects/effects/alien/aliens.dm
@@ -66,7 +66,7 @@
/obj/effect/alien/resin/attack_generic(var/mob/user, var/damage, var/attack_verb)
visible_message("[user] [attack_verb] the [src]!")
- playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
user.do_attack_animation(src)
health -= damage
healthcheck()
@@ -100,7 +100,7 @@
tforce = 10
else
tforce = AM:throwforce
- playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
health = max(0, health - tforce)
healthcheck()
..()
@@ -137,7 +137,7 @@
user.setClickCooldown(user.get_attack_speed(W))
var/aforce = W.force
health = max(0, health - aforce)
- playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
healthcheck()
..()
return
@@ -330,7 +330,7 @@
if(WT.remove_fuel(0, user))
damage = 15
- playsound(loc, 'sound/items/Welder.ogg', 100, 1)
+ playsound(src, 'sound/items/Welder.ogg', 100, 1)
health -= damage
healthcheck()
@@ -443,7 +443,6 @@
var/health = 100
var/status = BURST //can be GROWING, GROWN or BURST; all mutually exclusive
- flags = PROXMOVE
/obj/effect/alien/egg/New()
/*
@@ -534,7 +533,7 @@
if(WT.remove_fuel(0, user))
damage = 15
- playsound(src.loc, 'sound/items/Welder.ogg', 100, 1)
+ playsound(src, 'sound/items/Welder.ogg', 100, 1)
src.health -= damage
src.healthcheck()
@@ -547,16 +546,4 @@
/obj/effect/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
if(exposed_temperature > 500 + T0C)
health -= 5
- healthcheck()
-/*
-/obj/effect/alien/egg/HasProximity(atom/movable/AM as mob|obj)
- if(status == GROWN)
- if(!CanHug(AM))
- return
-
- var/mob/living/carbon/C = AM
- if(C.stat == CONSCIOUS && C.status_flags & XENO_HOST)
- return
-
- Burst(0)
-*/
\ No newline at end of file
+ healthcheck()
\ No newline at end of file
diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm
index 6ac967fc00..f533a2da60 100644
--- a/code/game/objects/effects/decals/contraband.dm
+++ b/code/game/objects/effects/decals/contraband.dm
@@ -146,7 +146,7 @@
/obj/structure/sign/poster/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wirecutter())
- playsound(src.loc, W.usesound, 100, 1)
+ playsound(src, W.usesound, 100, 1)
if(ruined)
to_chat(user, "You remove the remnants of the poster.")
qdel(src)
@@ -166,7 +166,7 @@
return
visible_message("[user] rips [src] in a single, decisive motion!" )
- playsound(src.loc, 'sound/items/poster_ripped.ogg', 100, 1)
+ playsound(src, 'sound/items/poster_ripped.ogg', 100, 1)
ruined = 1
icon_state = "poster_ripped"
name = "ripped poster"
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index b872f9b3d3..15931b5868 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -98,7 +98,7 @@ steam.start() -- spawns the effect
/obj/effect/effect/sparks/New()
..()
- playsound(src.loc, "sparks", 100, 1)
+ playsound(src, "sparks", 100, 1)
var/turf/T = src.loc
if (istype(T, /turf))
T.hotspot_expose(1000,100)
diff --git a/code/game/objects/effects/mines.dm b/code/game/objects/effects/mines.dm
index f2a15be551..1497e4e7a0 100644
--- a/code/game/objects/effects/mines.dm
+++ b/code/game/objects/effects/mines.dm
@@ -61,7 +61,7 @@
panel_open = !panel_open
user.visible_message("[user] very carefully screws the mine's panel [panel_open ? "open" : "closed"].",
"You very carefully screw the mine's panel [panel_open ? "open" : "closed"].")
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
else if((W.is_wirecutter() || istype(W, /obj/item/device/multitool)) && panel_open)
interact(user)
@@ -224,7 +224,7 @@
msg_admin_attack("[key_name_admin(user)] primed \a [src]")
user.visible_message("[user] starts priming \the [src.name].", "You start priming \the [src.name]. Hold still!")
if(do_after(user, 10 SECONDS))
- playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
+ playsound(src, 'sound/weapons/armbomb.ogg', 75, 1, -3)
prime(user)
else
visible_message("[user] triggers \the [src.name]!", "You accidentally trigger \the [src.name]!")
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 1566fd411d..dc3a151686 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -508,7 +508,7 @@ var/list/global/slot_flags_enumeration = list(
var/hit_zone = get_zone_with_miss_chance(U.zone_sel.selecting, M, U.get_accuracy_penalty(U))
if(!hit_zone)
U.do_attack_animation(M)
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
//visible_message("[U] attempts to stab [M] in the eyes, but misses!")
for(var/mob/V in viewers(M))
V.show_message("[U] attempts to stab [M] in the eyes, but misses!")
@@ -643,11 +643,6 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
//Looking through a scope or binoculars should /not/ improve your periphereal vision. Still, increase viewsize a tiny bit so that sniping isn't as restricted to NSEW
/obj/item/var/ignore_visor_zoom_restriction = FALSE
-/obj/item/on_loc_moved(var/oldloc)
- . = ..()
- if(zoom)
- zoom() // aka unzoom
-
/obj/item/proc/zoom(var/tileoffset = 14,var/viewsize = 9) //tileoffset is client view offset in the direction the user is facing. viewsize is how far out this thing zooms. 7 is normal view
var/devicename
@@ -677,6 +672,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
H.toggle_zoom_hud() // If the user has already limited their HUD this avoids them having a HUD when they zoom in
H.set_viewsize(viewsize)
zoom = 1
+ GLOB.moved_event.register(H, src, .proc/zoom)
var/tilesize = 32
var/viewoffset = tilesize * tileoffset
@@ -705,6 +701,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
if(!H.hud_used.hud_shown)
H.toggle_zoom_hud()
zoom = 0
+ GLOB.moved_event.unregister(H, src, .proc/zoom)
H.client.pixel_x = 0
H.client.pixel_y = 0
diff --git a/code/game/objects/items/bells.dm b/code/game/objects/items/bells.dm
index af9d7ce0f8..c05c7d2686 100644
--- a/code/game/objects/items/bells.dm
+++ b/code/game/objects/items/bells.dm
@@ -19,7 +19,7 @@
/obj/item/weapon/deskbell/attack(mob/target as mob, mob/living/user as mob)
if(!broken)
- playsound(user.loc, 'sound/effects/deskbell.ogg', 50, 1)
+ playsound(src, 'sound/effects/deskbell.ogg', 50, 1)
..()
/obj/item/weapon/deskbell/attack_hand(mob/user)
@@ -61,12 +61,12 @@
/obj/item/weapon/deskbell/proc/ring(mob/user)
if(user.a_intent == "harm")
- playsound(user.loc, 'sound/effects/deskbell_rude.ogg', 50, 1)
+ playsound(src, 'sound/effects/deskbell_rude.ogg', 50, 1)
to_chat(user,"You hammer [src] rudely!")
if (prob(2))
break_bell(user)
else
- playsound(user.loc, 'sound/effects/deskbell.ogg', 50, 1)
+ playsound(src, 'sound/effects/deskbell.ogg', 50, 1)
to_chat(user,"You gracefully ring [src].")
/obj/item/weapon/deskbell/proc/check_ability(mob/user)
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index 8f89c2c074..cf32e30c90 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -330,7 +330,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/ai/attack_self(mob/user as mob)
if ((honkamt > 0) && (prob(60)))//For clown virus.
honkamt--
- playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
+ playsound(src, 'sound/items/bikehorn.ogg', 30, 1)
return
@@ -774,7 +774,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
scanmode = 4
if("Honk")
if ( !(last_honk && world.time < last_honk + 20) )
- playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
+ playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
last_honk = world.time
if("Gas Scan")
if(scanmode == 5)
@@ -983,7 +983,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if ((honkamt > 0) && (prob(60)))//For clown virus.
honkamt--
- playsound(loc, 'sound/items/bikehorn.ogg', 30, 1)
+ playsound(src, 'sound/items/bikehorn.ogg', 30, 1)
return 1 // return 1 tells it to refresh the UI in NanoUI
@@ -1020,14 +1020,14 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/datum/effect/effect/system/smoke_spread/chem/S = new /datum/effect/effect/system/smoke_spread/chem
S.attach(P.loc)
S.set_up(P, 10, 0, P.loc)
- playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
+ playsound(P, 'sound/effects/smoke.ogg', 50, 1, -3)
S.start()
message += "Large clouds of smoke billow forth from your [P]!"
if(i>=40 && i<=45) //Bad smoke
var/datum/effect/effect/system/smoke_spread/bad/B = new /datum/effect/effect/system/smoke_spread/bad
B.attach(P.loc)
B.set_up(P, 10, 0, P.loc)
- playsound(P.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
+ playsound(P, 'sound/effects/smoke.ogg', 50, 1, -3)
B.start()
message += "Large clouds of noxious smoke billow forth from your [P]!"
if(i>=65 && i<=75) //Weaken
@@ -1064,7 +1064,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/mob/M = loc
M.put_in_hands(id)
to_chat(usr, "You remove the ID from the [name].")
- playsound(loc, 'sound/machines/id_swipe.ogg', 100, 1)
+ playsound(src, 'sound/machines/id_swipe.ogg', 100, 1)
else
id.loc = get_turf(src)
id = null
@@ -1133,7 +1133,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
conversations.Add("\ref[P]")
if(!P.conversations.Find("\ref[src]"))
P.conversations.Add("\ref[src]")
-
+ to_chat(U, "[bicon(src)] Sent message to [P.owner] ([P.ownjob]), \"[t]\"")
if (prob(15)) //Give the AI a chance of intercepting the message
var/who = src.owner
@@ -1151,7 +1151,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
/obj/item/device/pda/proc/new_info(var/beep_silent, var/message_tone, var/reception_message)
if (!beep_silent)
- playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(2, loc))
O.show_message(text("[bicon(src)] *[message_tone]*"))
//Search for holder of the PDA.
@@ -1280,7 +1280,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if (cartridge.radio)
cartridge.radio.hostpda = null
to_chat(usr, "You remove \the [cartridge] from the [name].")
- playsound(loc, 'sound/machines/id_swipe.ogg', 100, 1)
+ playsound(src, 'sound/machines/id_swipe.ogg', 100, 1)
cartridge = null
/obj/item/device/pda/proc/id_check(mob/user as mob, choice as num)//To check for IDs; 1 for in-pda use, 2 for out of pda use.
diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm
index 627145a38f..d6f42bee8f 100644
--- a/code/game/objects/items/devices/chameleonproj.dm
+++ b/code/game/objects/items/devices/chameleonproj.dm
@@ -31,7 +31,7 @@
if(!proximity) return
if(!active_dummy)
if(istype(target,/obj/item) && !istype(target, /obj/item/weapon/disk/nuclear))
- playsound(get_turf(src), 'sound/weapons/flash.ogg', 100, 1, -6)
+ playsound(src, 'sound/weapons/flash.ogg', 100, 1, -6)
to_chat(user, "Scanned [target].")
saved_item = target.type
saved_icon = target.icon
@@ -42,7 +42,7 @@
if(!can_use || !saved_item) return
if(active_dummy)
eject_all()
- playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
+ playsound(src, 'sound/effects/pop.ogg', 100, 1, -6)
qdel(active_dummy)
active_dummy = null
to_chat(usr, "You deactivate the [src].")
@@ -51,7 +51,7 @@
flick("emppulse",T)
spawn(8) qdel(T)
else
- playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
+ playsound(src, 'sound/effects/pop.ogg', 100, 1, -6)
var/obj/O = new saved_item(src)
if(!O) return
var/obj/effect/dummy/chameleon/C = new /obj/effect/dummy/chameleon(usr.loc)
diff --git a/code/game/objects/items/devices/communicator/messaging.dm b/code/game/objects/items/devices/communicator/messaging.dm
index c6191ab21e..2b4e0bcdd4 100644
--- a/code/game/objects/items/devices/communicator/messaging.dm
+++ b/code/game/objects/items/devices/communicator/messaging.dm
@@ -76,7 +76,7 @@
return
if(ringer)
- playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(2, loc))
O.show_message(text("[bicon(src)] *beep*"))
diff --git a/code/game/objects/items/devices/communicator/phone.dm b/code/game/objects/items/devices/communicator/phone.dm
index 492cd84179..3f13df8825 100644
--- a/code/game/objects/items/devices/communicator/phone.dm
+++ b/code/game/objects/items/devices/communicator/phone.dm
@@ -161,7 +161,7 @@
voice_requests |= candidate
if(ringer)
- playsound(loc, 'sound/machines/twobeep.ogg', 50, 1)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(2, loc))
O.show_message(text("[bicon(src)] *beep*"))
diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm
index dbb1410ef9..8a4f466d9e 100644
--- a/code/game/objects/items/devices/defib.dm
+++ b/code/game/objects/items/devices/defib.dm
@@ -391,12 +391,12 @@
if(!do_after(user, 30, H))
return
user.visible_message("\The [user] places [src] on [H]'s chest.", "You place [src] on [H]'s chest.")
- playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
+ playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
var/error = can_defib(H)
if(error)
make_announcement(error, "warning")
- playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
+ playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
return
if(check_blood_level(H))
@@ -409,18 +409,18 @@
//deduct charge here, in case the base unit was EMPed or something during the delay time
if(!checked_use(chargecost))
make_announcement("buzzes, \"Insufficient charge.\"", "warning")
- playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
+ playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
return
H.visible_message("\The [H]'s body convulses a bit.")
- playsound(get_turf(src), "bodyfall", 50, 1)
- playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 50, 1, -1)
+ playsound(src, "bodyfall", 50, 1)
+ playsound(src, 'sound/machines/defib_zap.ogg', 50, 1, -1)
set_cooldown(cooldowntime)
error = can_revive(H)
if(error)
make_announcement(error, "warning")
- playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
+ playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
return
H.apply_damage(burn_damage_amt, BURN, BP_TORSO)
@@ -434,7 +434,7 @@
H.adjustToxLoss(-H.getToxLoss())
make_announcement("pings, \"Resuscitation successful.\"", "notice")
- playsound(get_turf(src), 'sound/machines/defib_success.ogg', 50, 0)
+ playsound(src, 'sound/machines/defib_success.ogg', 50, 0)
make_alive(H)
@@ -455,7 +455,7 @@
to_chat(user, "You can't do that while the safety is enabled.")
return
- playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
+ playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
audible_message("\The [src] lets out a steadily rising hum...")
if(!do_after(user, chargetime, H))
@@ -464,12 +464,12 @@
//deduct charge here, in case the base unit was EMPed or something during the delay time
if(!checked_use(chargecost))
make_announcement("buzzes, \"Insufficient charge.\"", "warning")
- playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0)
+ playsound(src, 'sound/machines/defib_failed.ogg', 50, 0)
return
user.visible_message("\The [user] shocks [H] with \the [src]!", "You shock [H] with \the [src]!")
- playsound(get_turf(src), 'sound/machines/defib_zap.ogg', 100, 1, -1)
- playsound(loc, 'sound/weapons/Egloves.ogg', 100, 1, -1)
+ playsound(src, 'sound/machines/defib_zap.ogg', 100, 1, -1)
+ playsound(src, 'sound/weapons/Egloves.ogg', 100, 1, -1)
set_cooldown(cooldowntime)
H.stun_effect_act(2, 120, target_zone)
@@ -543,10 +543,10 @@
safety = new_safety
if(safety)
make_announcement("beeps, \"Safety protocols enabled!\"", "notice")
- playsound(get_turf(src), 'sound/machines/defib_safetyon.ogg', 50, 0)
+ playsound(src, 'sound/machines/defib_safetyon.ogg', 50, 0)
else
make_announcement("beeps, \"Safety protocols disabled!\"", "warning")
- playsound(get_turf(src), 'sound/machines/defib_safetyoff.ogg', 50, 0)
+ playsound(src, 'sound/machines/defib_safetyoff.ogg', 50, 0)
update_icon()
..()
diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm
index 6c512650b6..91915c8c07 100644
--- a/code/game/objects/items/devices/flash.dm
+++ b/code/game/objects/items/devices/flash.dm
@@ -48,7 +48,7 @@
user.visible_message("\The [user] successfully repairs \the [src]!")
broken = FALSE
update_icon()
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
else
user.visible_message("\The [user] fails to repair \the [src].")
repairing = FALSE
@@ -138,7 +138,7 @@
if(user)
update_icon()
to_chat(user, "click")
- playsound(src.loc, 'sound/weapons/empty.ogg', 80, 1)
+ playsound(src, 'sound/weapons/empty.ogg', 80, 1)
return FALSE
else if(battery && battery.checked_use(charge_cost + (round(charge_cost / 4) * max(0, times_used - max_flashes)))) // Using over your maximum flashes starts taking more charge per added flash.
times_used++
@@ -164,7 +164,7 @@
if(!check_capacitor(user))
return
- playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
+ playsound(src, 'sound/weapons/flash.ogg', 100, 1)
var/flashfail = 0
if(iscarbon(M))
@@ -245,7 +245,7 @@
if(!check_capacitor(user))
return
- playsound(src.loc, 'sound/weapons/flash.ogg', 100, 1)
+ playsound(src, 'sound/weapons/flash.ogg', 100, 1)
flick("flash2", src)
if(user && isrobot(user))
spawn(0)
diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm
index 0b6d25f0c9..a48a3da024 100644
--- a/code/game/objects/items/devices/hacktool.dm
+++ b/code/game/objects/items/devices/hacktool.dm
@@ -26,7 +26,7 @@
/obj/item/device/multitool/hacktool/attackby(var/obj/item/W, var/mob/user)
if(W.is_screwdriver())
in_hack_mode = !in_hack_mode
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
else
..()
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index 3ce7a0b236..6ae95bcf8a 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -96,7 +96,7 @@
new_bulbs += AddShards(1)
qdel(L)
if(new_bulbs != 0)
- playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
+ playsound(src, 'sound/machines/ding.ogg', 50, 1)
to_chat(user, "You insert \the [L.name] into \the [src.name]. You have [uses] light\s remaining.")
return
@@ -148,7 +148,7 @@
/obj/item/device/lightreplacer/proc/Use(var/mob/user)
- playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
add_uses(-1)
return 1
@@ -182,7 +182,7 @@
var/new_bulbs = AddShards(1)
if(new_bulbs != 0)
to_chat(U, "\The [src] has fabricated a new bulb from the broken bulbs it has stored. It now has [uses] uses.")
- playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
+ playsound(src, 'sound/machines/ding.ogg', 50, 1)
target.status = LIGHT_EMPTY
target.update()
@@ -211,7 +211,7 @@
/obj/item/device/lightreplacer/emag_act(var/remaining_charges, var/mob/user)
emagged = !emagged
- playsound(src.loc, "sparks", 100, 1)
+ playsound(src, "sparks", 100, 1)
update_icon()
return 1
diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm
index 7e7bbdb629..5516ccb099 100644
--- a/code/game/objects/items/devices/megaphone.dm
+++ b/code/game/objects/items/devices/megaphone.dm
@@ -134,7 +134,7 @@
user.audible_message("[user.GetVoice()][user.GetAltName()] broadcasts, \"[pick(insultmsg)]\"")
if(broadcast_size >= 11)
var/turf/T = get_turf(user)
- playsound(T, 'sound/items/AirHorn.ogg', 100, 1)
+ playsound(src, 'sound/items/AirHorn.ogg', 100, 1)
for(var/mob/living/carbon/M in oviewers(4, T))
if(M.get_ear_protection() >= 2)
continue
diff --git a/code/game/objects/items/devices/modkit.dm b/code/game/objects/items/devices/modkit.dm
index 6847bb6fb0..820229fd83 100644
--- a/code/game/objects/items/devices/modkit.dm
+++ b/code/game/objects/items/devices/modkit.dm
@@ -47,7 +47,7 @@
to_chat(user, "[O] must be safely placed on the ground for modification.")
return
- playsound(src.loc, O.usesound, 100, 1)
+ playsound(src, O.usesound, 100, 1)
user.visible_message("\The [user] opens \the [src] and modifies \the [O].","You open \the [src] and modify \the [O].")
diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm
index 7a9b07b999..3ddc35a209 100644
--- a/code/game/objects/items/devices/traitordevices.dm
+++ b/code/game/objects/items/devices/traitordevices.dm
@@ -50,7 +50,7 @@ effective or pretty fucking useless.
add_attack_logs(user,affected,"Used a [name]")
- playsound(src.loc, 'sound/misc/interference.ogg', 50, 1)
+ playsound(src, 'sound/misc/interference.ogg', 50, 1)
to_chat(user, "You trigger [src].")
times_used += 1
if(times_used >= max_uses)
diff --git a/code/game/objects/items/devices/transfer_valve.dm b/code/game/objects/items/devices/transfer_valve.dm
index 4169dfc947..406919f96a 100644
--- a/code/game/objects/items/devices/transfer_valve.dm
+++ b/code/game/objects/items/devices/transfer_valve.dm
@@ -9,7 +9,6 @@
var/mob/attacher = null
var/valve_open = 0
var/toggle = 1
- flags = PROXMOVE
/obj/item/device/transfer_valve/attackby(obj/item/item, mob/user)
var/turf/location = get_turf(src) // For admin logs
@@ -57,11 +56,15 @@
return
-/obj/item/device/transfer_valve/HasProximity(atom/movable/AM as mob|obj)
- if(!attached_device) return
- attached_device.HasProximity(AM)
- return
+/obj/item/device/transfer_valve/HasProximity(turf/T, atom/movable/AM, old_loc)
+ attached_device?.HasProximity(T, AM, old_loc)
+/obj/item/device/transfer_valve/Moved(old_loc, direction, forced)
+ . = ..()
+ if(isturf(old_loc))
+ unsense_proximity(callback = .HasProximity, center = old_loc)
+ if(isturf(loc))
+ sense_proximity(callback = .HasProximity)
/obj/item/device/transfer_valve/attack_self(mob/user as mob)
ui_interact(user)
diff --git a/code/game/objects/items/devices/whistle.dm b/code/game/objects/items/devices/whistle.dm
index c26d3f80aa..cf8cebeec1 100644
--- a/code/game/objects/items/devices/whistle.dm
+++ b/code/game/objects/items/devices/whistle.dm
@@ -32,11 +32,11 @@
return
if(isnull(insults))
- playsound(get_turf(src), 'sound/voice/halt.ogg', 100, 1, vary = 0)
+ playsound(src, 'sound/voice/halt.ogg', 100, 1, vary = 0)
user.audible_message("[user]'s [name] rasps, \"[use_message]\"", "\The [user] holds up \the [name].")
else
if(insults > 0)
- playsound(get_turf(src), 'sound/voice/binsult.ogg', 100, 1, vary = 0)
+ playsound(src, 'sound/voice/binsult.ogg', 100, 1, vary = 0)
// Yes, it used to show the transcription of the sound clip. That was a) inaccurate b) immature as shit.
user.audible_message("[user]'s [name] gurgles something indecipherable and deeply offensive.", "\The [user] holds up \the [name].")
insults--
diff --git a/code/game/objects/items/paintkit.dm b/code/game/objects/items/paintkit.dm
index f3bd0c1d3a..223c9a2018 100644
--- a/code/game/objects/items/paintkit.dm
+++ b/code/game/objects/items/paintkit.dm
@@ -16,7 +16,7 @@
/obj/item/device/kit/proc/use(var/amt, var/mob/user)
uses -= amt
- playsound(get_turf(user), 'sound/items/Screwdriver.ogg', 50, 1)
+ playsound(src, 'sound/items/Screwdriver.ogg', 50, 1)
if(uses<1)
user.drop_item()
qdel(src)
diff --git a/code/game/objects/items/stacks/marker_beacons.dm b/code/game/objects/items/stacks/marker_beacons.dm
index 88eb8e6271..5c7ed3aa04 100644
--- a/code/game/objects/items/stacks/marker_beacons.dm
+++ b/code/game/objects/items/stacks/marker_beacons.dm
@@ -58,7 +58,7 @@ var/list/marker_beacon_colors = list(
return
if(use(1))
to_chat(user, "You activate and anchor [amount ? "a":"the"] [singular_name] in place.")
- playsound(user, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
var/obj/structure/marker_beacon/M = new(user.loc, picked_color)
transfer_fingerprints_to(M)
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 7e89f96807..eb432d63c1 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -181,7 +181,7 @@
bullets--
D.icon_state = "foamdart"
D.name = "foam dart"
- playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
+ playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
for(var/i=0, i<6, i++)
if (D)
@@ -229,7 +229,7 @@
O.show_message(text("\The [] casually lines up a shot with []'s head and pulls the trigger!", user, M), 1, "You hear the sound of foam against skull", 2)
O.show_message(text("\The [] was hit in the head by the foam dart!", M), 1)
- playsound(user.loc, 'sound/items/syringeproj.ogg', 50, 1)
+ playsound(src, 'sound/items/syringeproj.ogg', 50, 1)
new /obj/item/toy/ammo/crossbow(M.loc)
src.bullets--
else if (M.lying && src.bullets == 0)
@@ -278,12 +278,12 @@
src.active = !( src.active )
if (src.active)
to_chat(user, "You extend the plastic blade with a quick flick of your wrist.")
- playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
+ playsound(src, 'sound/weapons/saberon.ogg', 50, 1)
src.item_state = "[icon_state]_blade"
src.w_class = ITEMSIZE_LARGE
else
to_chat(user, "You push the plastic blade back down into the handle.")
- playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
+ playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
src.item_state = "[icon_state]"
src.w_class = ITEMSIZE_SMALL
update_icon()
@@ -397,7 +397,7 @@
/obj/item/toy/bosunwhistle/attack_self(mob/user as mob)
if(cooldown < world.time - 35)
to_chat(user, "You blow on [src], creating an ear-splitting noise!")
- playsound(user, 'sound/misc/boatswain.ogg', 20, 1)
+ playsound(src, 'sound/misc/boatswain.ogg', 20, 1)
cooldown = world.time
/*
@@ -413,14 +413,14 @@
/obj/item/toy/prize/attack_self(mob/user as mob)
if(cooldown < world.time - 8)
to_chat(user, "You play with [src].")
- playsound(user, 'sound/mecha/mechstep.ogg', 20, 1)
+ playsound(src, 'sound/mecha/mechstep.ogg', 20, 1)
cooldown = world.time
/obj/item/toy/prize/attack_hand(mob/user as mob)
if(loc == user)
if(cooldown < world.time - 8)
to_chat(user, "You play with [src].")
- playsound(user, 'sound/mecha/mechturn.ogg', 20, 1)
+ playsound(src, 'sound/mecha/mechturn.ogg', 20, 1)
cooldown = world.time
return
..()
@@ -499,7 +499,7 @@
if(cooldown < world.time)
cooldown = (world.time + 30) //3 second cooldown
user.visible_message("The [src] says \"[toysay]\".")
- playsound(user, 'sound/machines/click.ogg', 20, 1)
+ playsound(src, 'sound/machines/click.ogg', 20, 1)
/obj/item/toy/figure/cmo
name = "Chief Medical Officer action figure"
@@ -753,12 +753,12 @@
// Attack mob
/obj/item/toy/plushie/carp/attack(mob/M as mob, mob/user as mob)
- playsound(loc, bitesound, 20, 1) // Play bite sound in local area
+ playsound(src, bitesound, 20, 1) // Play bite sound in local area
return ..()
// Attack self
/obj/item/toy/plushie/carp/attack_self(mob/user as mob)
- playsound(src.loc, bitesound, 20, 1)
+ playsound(src, bitesound, 20, 1)
return ..()
@@ -1371,7 +1371,7 @@
if(!cooldown) //for the sanity of everyone
var/message = generate_ion_law()
to_chat(user, "You press the button on [src].")
- playsound(user, 'sound/machines/click.ogg', 20, 1)
+ playsound(src, 'sound/machines/click.ogg', 20, 1)
visible_message("[message]")
cooldown = 1
spawn(30) cooldown = 0
@@ -1390,7 +1390,7 @@
if(!cooldown) //for the sanity of everyone
var/message = pick("You won't get away this time, Griffin!", "Stop right there, criminal!", "Hoot! Hoot!", "I am the night!")
to_chat(user, "You pull the string on the [src].")
- //playsound(user, 'sound/misc/hoot.ogg', 25, 1)
+ //playsound(src, 'sound/misc/hoot.ogg', 25, 1)
visible_message("[message]")
cooldown = 1
spawn(30) cooldown = 0
@@ -1409,7 +1409,7 @@
if(!cooldown) //for the sanity of everyone
var/message = pick("You can't stop me, Owl!", "My plan is flawless! The vault is mine!", "Caaaawwww!", "You will never catch me!")
to_chat(user, "You pull the string on the [src].")
- //playsound(user, 'sound/misc/caw.ogg', 25, 1)
+ //playsound(src, 'sound/misc/caw.ogg', 25, 1)
visible_message("[message]")
cooldown = 1
spawn(30) cooldown = 0
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index bafe4878f9..2dbd4aa082 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -57,7 +57,7 @@
stored_matter += cartridge.remaining
user.drop_from_inventory(W)
qdel(W)
- playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
to_chat(user, span("notice", "The RCD now holds [stored_matter]/[max_stored_matter] matter-units."))
return TRUE
return ..()
@@ -70,7 +70,7 @@
mode_index++
to_chat(user, span("notice", "Changed mode to '[modes[mode_index]]'."))
- playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
+ playsound(src, 'sound/effects/pop.ogg', 50, 0)
if(prob(20))
src.spark_system.start()
@@ -106,7 +106,7 @@
to_chat(user, span("warning", "\The [src] lacks the required material to start."))
return FALSE
- playsound(get_turf(src), 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
var/true_delay = rcd_results[RCD_VALUE_DELAY] * toolspeed
@@ -126,7 +126,7 @@
return FALSE
if(A.rcd_act(user, src, rcd_results[RCD_VALUE_MODE]))
consume_resources(rcd_results[RCD_VALUE_COST])
- playsound(get_turf(A), 'sound/items/deconstruct.ogg', 50, 1)
+ playsound(A, 'sound/items/deconstruct.ogg', 50, 1)
return TRUE
// If they moved, kill the beam immediately.
diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm
index 724e85e1f6..3059e5af7f 100644
--- a/code/game/objects/items/weapons/RSF.dm
+++ b/code/game/objects/items/weapons/RSF.dm
@@ -48,7 +48,7 @@ RSF
qdel(W)
stored_matter += 10
- playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
+ playsound(src, 'sound/machines/click.ogg', 10, 1)
to_chat(user,"The RSF now holds [stored_matter]/30 fabrication-units.")
return
@@ -64,7 +64,7 @@ RSF
glasstype = /obj/item/weapon/reagent_containers/food/drinks/metaglass
/obj/item/weapon/rsf/attack_self(mob/user as mob)
- playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
+ playsound(src, 'sound/effects/pop.ogg', 50, 0)
if (mode == 1)
mode = 2
to_chat(user,"Changed dispensing mode to 'Container'.")
@@ -101,7 +101,7 @@ RSF
if(!istype(A, /obj/structure/table) && !istype(A, /turf/simulated/floor))
return
- playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
+ playsound(src, 'sound/machines/click.ogg', 10, 1)
var/used_energy = 0
var/obj/product
diff --git a/code/game/objects/items/weapons/canes.dm b/code/game/objects/items/weapons/canes.dm
index f7688fb2d1..5b7f346684 100644
--- a/code/game/objects/items/weapons/canes.dm
+++ b/code/game/objects/items/weapons/canes.dm
@@ -33,7 +33,7 @@
if(concealed_blade)
user.visible_message("[user] has unsheathed \a [concealed_blade] from [T.his] [src]!", "You unsheathe \the [concealed_blade] from \the [src].")
// Calling drop/put in hands to properly call item drop/pickup procs
- playsound(user.loc, 'sound/weapons/holster/sheathout.ogg', 50, 1)
+ playsound(src, 'sound/weapons/holster/sheathout.ogg', 50, 1)
user.drop_from_inventory(src)
user.put_in_hands(concealed_blade)
user.put_in_hands(src)
@@ -47,7 +47,7 @@
if(!src.concealed_blade && istype(W))
var/datum/gender/T = gender_datums[user.get_visible_gender()]
user.visible_message("[user] has sheathed \a [W] into [T.his] [src]!", "You sheathe \the [W] into \the [src].")
- playsound(user.loc, 'sound/weapons/holster/sheathin.ogg', 50, 1)
+ playsound(src, 'sound/weapons/holster/sheathin.ogg', 50, 1)
user.drop_from_inventory(W)
W.loc = src
src.concealed_blade = W
@@ -119,6 +119,6 @@
H.update_inv_l_hand()
H.update_inv_r_hand()
- playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
+ playsound(src, 'sound/weapons/empty.ogg', 50, 1)
add_fingerprint(user)
return TRUE
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index b6952198bd..46f9a34f4d 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -193,7 +193,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/clothing/mask/smokable/proc/die(var/nomessage = 0)
var/turf/T = get_turf(src)
set_light(0)
- playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
+ playsound(src, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
STOP_PROCESSING(SSobj, src)
if (type_butt)
var/obj/item/butt = new type_butt(T)
@@ -215,7 +215,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
var/mob/living/M = loc
if (!nomessage)
to_chat(M, "Your [name] goes out, and you empty the ash.")
- playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
+ playsound(src, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
lit = 0
icon_state = initial(icon_state)
item_state = initial(item_state)
@@ -333,7 +333,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(lit == 1)
if(user.a_intent == I_HURT)
user.visible_message("[user] drops and treads on the lit [src], putting it out instantly.")
- playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
+ playsound(src, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
die(1)
else
user.visible_message("[user] puts out \the [src].")
@@ -427,7 +427,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(lit == 1)
if(user.a_intent == I_HURT)
user.visible_message("[user] empties the lit [src] on the floor!.")
- playsound(src.loc, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
+ playsound(src, 'sound/items/cigs_lighters/cig_snuff.ogg', 50, 1)
die(1)
else
user.visible_message("[user] puts out \the [src].")
@@ -552,7 +552,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
lit = 1
icon_state = "[base_state]on"
item_state = "[base_state]on"
- playsound(src.loc, activation_sound, 75, 1)
+ playsound(src, activation_sound, 75, 1)
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.")
else
@@ -572,7 +572,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
lit = 0
icon_state = "[base_state]"
item_state = "[base_state]"
- playsound(src.loc, deactivation_sound, 75, 1)
+ playsound(src, deactivation_sound, 75, 1)
if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.")
else
diff --git a/code/game/objects/items/weapons/clown_items.dm b/code/game/objects/items/weapons/clown_items.dm
index 1f53e64e77..73604b49f9 100644
--- a/code/game/objects/items/weapons/clown_items.dm
+++ b/code/game/objects/items/weapons/clown_items.dm
@@ -71,7 +71,7 @@
/obj/item/weapon/bikehorn/attack_self(mob/user as mob)
if (spam_flag == 0)
spam_flag = 1
- playsound(src.loc, 'sound/items/bikehorn.ogg', 50, 1)
+ playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
src.add_fingerprint(user)
spawn(20)
spam_flag = 0
diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm
index 5e7b54c9eb..e9951c83d4 100644
--- a/code/game/objects/items/weapons/extinguisher.dm
+++ b/code/game/objects/items/weapons/extinguisher.dm
@@ -75,7 +75,7 @@
var/obj/o = target
var/amount = o.reagents.trans_to_obj(src, 50)
to_chat(user, "You fill [src] with [amount] units of the contents of [target].")
- playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
+ playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
return
if (!safety)
@@ -88,7 +88,7 @@
src.last_use = world.time
- playsound(src.loc, 'sound/effects/extinguish.ogg', 75, 1, -3)
+ playsound(src, 'sound/effects/extinguish.ogg', 75, 1, -3)
var/direction = get_dir(src,target)
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index 94ca8b7cd2..88d9b0ff5d 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -27,7 +27,7 @@
/obj/item/weapon/gift/attack_self(mob/user as mob)
user.drop_item()
- playsound(src.loc, 'sound/items/package_unwrap.ogg', 50,1)
+ playsound(src, 'sound/items/package_unwrap.ogg', 50,1)
if(src.gift)
user.put_in_active_hand(gift)
src.gift.add_fingerprint(user)
diff --git a/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm b/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm
index 6646e698f9..fe4d80418d 100644
--- a/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/anti_photon_grenade.dm
@@ -7,7 +7,7 @@
origin_tech = list(TECH_BLUESPACE = 4, TECH_MATERIAL = 4)
/obj/item/weapon/grenade/anti_photon/detonate()
- playsound(src.loc, 'sound/effects/phasein.ogg', 50, 1, 5)
+ playsound(src, 'sound/effects/phasein.ogg', 50, 1, 5)
set_light(10, -10, "#FFFFFF")
var/extra_delay = rand(0,90)
@@ -18,5 +18,5 @@
set_light(10, 10, "#[num2hex(rand(64,255))][num2hex(rand(64,255))][num2hex(rand(64,255))]")
spawn(210)
..()
- playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 5)
+ playsound(src, 'sound/effects/bang.ogg', 50, 1, 5)
qdel(src)
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index 157c64f09f..cb3184a7f6 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -63,7 +63,7 @@
return
path = 1
to_chat(user, "You add [W] to the metal casing.")
- playsound(src.loc, 'sound/items/Screwdriver2.ogg', 25, -3)
+ playsound(src, 'sound/items/Screwdriver2.ogg', 25, -3)
user.remove_from_mob(det)
det.loc = src
detonator = det
@@ -96,7 +96,7 @@
return
else
to_chat(user, "You unlock the assembly.")
- playsound(src.loc, W.usesound, 50, -3)
+ playsound(src, W.usesound, 50, -3)
name = "unsecured grenade with [beakers.len] containers[detonator?" and detonator":""]"
icon_state = initial(icon_state) + (detonator?"_ass":"")
stage = 1
@@ -154,7 +154,7 @@
active = 0
if(!has_reagents)
icon_state = initial(icon_state) +"_locked"
- playsound(src.loc, 'sound/items/Screwdriver2.ogg', 50, 1)
+ playsound(src, 'sound/items/Screwdriver2.ogg', 50, 1)
spawn(0) //Otherwise det_time is erroneously set to 0 after this
if(istimer(detonator.a_left)) //Make sure description reflects that the timer has been reset
var/obj/item/device/assembly/timer/T = detonator.a_left
@@ -164,7 +164,7 @@
det_time = 10*T.time
return
- playsound(src.loc, 'sound/effects/bamf.ogg', 50, 1)
+ playsound(src, 'sound/effects/bamf.ogg', 50, 1)
for(var/obj/item/weapon/reagent_containers/glass/G in beakers)
G.reagents.trans_to_obj(src, G.reagents.total_volume)
diff --git a/code/game/objects/items/weapons/grenades/concussion.dm b/code/game/objects/items/weapons/grenades/concussion.dm
index 073b5ed9d1..fb821ab6f8 100644
--- a/code/game/objects/items/weapons/grenades/concussion.dm
+++ b/code/game/objects/items/weapons/grenades/concussion.dm
@@ -19,7 +19,7 @@
if(is_below_sound_pressure(T))
visible_message("Whump.")
return
- playsound(src.loc, 'sound/effects/bang.ogg', 75, 1, -3)
+ playsound(src, 'sound/effects/bang.ogg', 75, 1, -3)
if(istype(T))
for(var/mob/living/L in orange(T, radius))
if(ishuman(L))
diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm
index 087265ca5b..e2d095e0e1 100644
--- a/code/game/objects/items/weapons/grenades/flashbang.dm
+++ b/code/game/objects/items/weapons/grenades/flashbang.dm
@@ -29,7 +29,7 @@
/obj/item/weapon/grenade/flashbang/proc/bang(var/turf/T , var/mob/living/carbon/M) // Added a new proc called 'bang' that takes a location and a person to be banged.
to_chat(M, "BANG") // Called during the loop that bangs people in lockers/containers and when banging
- playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 30) // people in normal view. Could theroetically be called during other explosions.
+ playsound(src, 'sound/effects/bang.ogg', 50, 1, 30) // people in normal view. Could theroetically be called during other explosions.
// -- Polymorph
//Checking for protections
@@ -119,11 +119,11 @@
for(var/do_spawn = numspawned, do_spawn > 0, do_spawn--)
new /obj/item/weapon/grenade/flashbang/cluster(src.loc)//Launches flashbangs
- playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
+ playsound(src, 'sound/weapons/armbomb.ogg', 75, 1, -3)
for(var/do_again = again, do_again > 0, do_again--)
new /obj/item/weapon/grenade/flashbang/clusterbang/segment(src.loc)//Creates a 'segment' that launches a few more flashbangs
- playsound(src.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
+ playsound(src, 'sound/weapons/armbomb.ogg', 75, 1, -3)
qdel(src)
return
diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm
index fdab7aaf39..7ac049a774 100644
--- a/code/game/objects/items/weapons/grenades/grenade.dm
+++ b/code/game/objects/items/weapons/grenades/grenade.dm
@@ -33,7 +33,7 @@
to_chat(user, "You prime the [name]! [det_time/10] seconds!")
active = 1
icon_state = initial(icon_state) + "_active"
- playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
+ playsound(src, 'sound/weapons/armbomb.ogg', 75, 1, -3)
spawn(det_time)
detonate()
return
@@ -75,7 +75,7 @@
icon_state = initial(icon_state) + "_active"
active = 1
- playsound(loc, arm_sound, 75, 1, -3)
+ playsound(src, arm_sound, 75, 1, -3)
spawn(det_time)
detonate()
@@ -83,7 +83,7 @@
/obj/item/weapon/grenade/proc/detonate()
-// playsound(loc, 'sound/items/Welder2.ogg', 25, 1)
+// playsound(src, 'sound/items/Welder2.ogg', 25, 1)
var/turf/T = get_turf(src)
if(T)
T.hotspot_expose(700,125)
diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm
index 28540b981f..75c0e6a299 100644
--- a/code/game/objects/items/weapons/grenades/smokebomb.dm
+++ b/code/game/objects/items/weapons/grenades/smokebomb.dm
@@ -21,7 +21,7 @@
return ..()
/obj/item/weapon/grenade/smokebomb/detonate()
- playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
+ playsound(src, 'sound/effects/smoke.ogg', 50, 1, -3)
src.smoke.set_up(10, 0, usr.loc)
spawn(0)
for(var/i = 1 to smoke_strength)
diff --git a/code/game/objects/items/weapons/grenades/spawnergrenade.dm b/code/game/objects/items/weapons/grenades/spawnergrenade.dm
index 5cab658098..5f1bd4503b 100644
--- a/code/game/objects/items/weapons/grenades/spawnergrenade.dm
+++ b/code/game/objects/items/weapons/grenades/spawnergrenade.dm
@@ -15,7 +15,7 @@
if(spawner_type && deliveryamt)
// Make a quick flash
var/turf/T = get_turf(src)
- playsound(T, 'sound/effects/phasein.ogg', 100, 1)
+ playsound(src, 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/human/M in viewers(T, null))
if(M:eyecheck() <= 0)
M.flash_eyes()
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 753f72a809..68f7f1fc34 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -60,7 +60,7 @@
return 0
/obj/item/weapon/handcuffs/proc/place_handcuffs(var/mob/living/carbon/target, var/mob/user)
- playsound(src.loc, cuff_sound, 30, 1, -2)
+ playsound(src, cuff_sound, 30, 1, -2)
var/mob/living/carbon/human/H = target
if(!istype(H))
@@ -244,7 +244,7 @@ var/last_chew = 0
to_chat(user, "You need to have a firm grip on [C] before you can put \the [src] on!")
/obj/item/weapon/handcuffs/legcuffs/proc/place_legcuffs(var/mob/living/carbon/target, var/mob/user)
- playsound(src.loc, cuff_sound, 30, 1, -2)
+ playsound(src, cuff_sound, 30, 1, -2)
var/mob/living/carbon/human/H = target
if(!istype(H))
@@ -315,7 +315,7 @@ var/last_chew = 0
qdel(src)
/obj/item/weapon/handcuffs/legcuffs/bola/place_legcuffs(var/mob/living/carbon/target, var/mob/user)
- playsound(src.loc, cuff_sound, 30, 1, -2)
+ playsound(src, cuff_sound, 30, 1, -2)
var/mob/living/carbon/human/H = target
if(!istype(H))
diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm
index 34f44ffc8d..81d5bb8f04 100644
--- a/code/game/objects/items/weapons/implants/implant.dm
+++ b/code/game/objects/items/weapons/implants/implant.dm
@@ -252,7 +252,7 @@ Implant Specifics:
"}
if (elevel == "Localized Limb")
if(part) //For some reason, small_boom() didn't work. So have this bit of working copypaste.
imp_in.visible_message("Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!")
- playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
+ playsound(src, 'sound/items/countdown.ogg', 75, 1, -3)
sleep(25)
if (istype(part,/obj/item/organ/external/chest) || \
istype(part,/obj/item/organ/external/groin) || \
@@ -325,7 +325,7 @@ Implant Specifics:
"}
/obj/item/weapon/implant/explosive/proc/small_boom()
if (ishuman(imp_in) && part)
imp_in.visible_message("Something beeps inside [imp_in][part ? "'s [part.name]" : ""]!")
- playsound(loc, 'sound/items/countdown.ogg', 75, 1, -3)
+ playsound(src, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
if (ishuman(imp_in) && part)
//No tearing off these parts since it's pretty much killing
diff --git a/code/game/objects/items/weapons/material/chainsaw.dm b/code/game/objects/items/weapons/material/chainsaw.dm
index fe99fad674..8ba5f20695 100644
--- a/code/game/objects/items/weapons/material/chainsaw.dm
+++ b/code/game/objects/items/weapons/material/chainsaw.dm
@@ -53,7 +53,7 @@ obj/item/weapon/chainsaw/proc/turnOff(mob/user as mob)
if(!on) return
to_chat(user, "You switch the gas nozzle on the chainsaw, turning it off.")
attack_verb = list("bluntly hit", "beat", "knocked")
- playsound(user, 'sound/weapons/chainsaw_turnoff.ogg',40,1)
+ playsound(src, 'sound/weapons/chainsaw_turnoff.ogg',40,1)
force = inactive_force
edge = 0
sharp = 0
@@ -93,7 +93,7 @@ obj/item/weapon/chainsaw/afterattack(atom/A as mob|obj|turf|area, mob/user as mo
to_chat(user, "You begin filling the tank on the chainsaw.")
if(do_after(usr, 15))
A.reagents.trans_to_obj(src, max_fuel)
- playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
+ playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
to_chat(user, "Chainsaw succesfully refueled.")
else
to_chat(user, "Don't move while you're refilling the chainsaw.")
diff --git a/code/game/objects/items/weapons/material/kitchen.dm b/code/game/objects/items/weapons/material/kitchen.dm
index b2369f995d..4464084f85 100644
--- a/code/game/objects/items/weapons/material/kitchen.dm
+++ b/code/game/objects/items/weapons/material/kitchen.dm
@@ -46,7 +46,7 @@
if(!(M.can_force_feed(user, loaded) && do_mob(user, M, 5 SECONDS)))
return
M.visible_message("\The [user] feeds some [loaded] to \the [M] with \the [src].")
- playsound(M.loc,'sound/items/eatfood.ogg', rand(10,40), 1)
+ playsound(src,'sound/items/eatfood.ogg', rand(10,40), 1)
overlays.Cut()
return
else
diff --git a/code/game/objects/items/weapons/material/knives.dm b/code/game/objects/items/weapons/material/knives.dm
index 099edd65c4..c06e80becf 100644
--- a/code/game/objects/items/weapons/material/knives.dm
+++ b/code/game/objects/items/weapons/material/knives.dm
@@ -46,7 +46,7 @@
active = !active
if(active)
to_chat(user, "You flip out \the [src].")
- playsound(user, 'sound/weapons/flipblade.ogg', 15, 1)
+ playsound(src, 'sound/weapons/flipblade.ogg', 15, 1)
else
to_chat(user, "\The [src] can now be concealed.")
update_force()
diff --git a/code/game/objects/items/weapons/material/material_armor.dm b/code/game/objects/items/weapons/material/material_armor.dm
index d981cafc07..91aca12dc1 100644
--- a/code/game/objects/items/weapons/material/material_armor.dm
+++ b/code/game/objects/items/weapons/material/material_armor.dm
@@ -125,7 +125,7 @@ Protectiveness | Armor %
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
- playsound(user.loc, 'sound/effects/teleport.ogg', 50, 1)
+ playsound(src, 'sound/effects/teleport.ogg', 50, 1)
user.loc = picked
return PROJECTILE_FORCE_MISS
diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm
index e2394537f3..19eaf7f776 100644
--- a/code/game/objects/items/weapons/material/shards.dm
+++ b/code/game/objects/items/weapons/material/shards.dm
@@ -102,7 +102,7 @@
if(will_break && src.loc == user) // If it's not in our hand anymore
user.visible_message("[user] hit \the [target] with \the [src], shattering it!", "You shatter \the [src] in your hand!")
- playsound(user, pick('sound/effects/Glassbr1.ogg', 'sound/effects/Glassbr2.ogg', 'sound/effects/Glassbr3.ogg'), 30, 1)
+ playsound(src, pick('sound/effects/Glassbr1.ogg', 'sound/effects/Glassbr2.ogg', 'sound/effects/Glassbr3.ogg'), 30, 1)
qdel(src)
return
@@ -116,7 +116,7 @@
if(M.buckled) //wheelchairs, office chairs, rollerbeds
return
- playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
+ playsound(src, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
var/mob/living/carbon/human/H = M
diff --git a/code/game/objects/items/weapons/material/swords.dm b/code/game/objects/items/weapons/material/swords.dm
index 3affd40887..ba0fe4ddfe 100644
--- a/code/game/objects/items/weapons/material/swords.dm
+++ b/code/game/objects/items/weapons/material/swords.dm
@@ -14,7 +14,7 @@
/obj/item/weapon/material/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(unique_parry_check(user, attacker, damage_source) && prob(50))
user.visible_message("\The [user] parries [attack_text] with \the [src]!")
- playsound(user.loc, 'sound/weapons/punchmiss.ogg', 50, 1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
return 1
return 0
diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm
index 244b2c6001..e2d5e94118 100644
--- a/code/game/objects/items/weapons/material/twohanded.dm
+++ b/code/game/objects/items/weapons/material/twohanded.dm
@@ -61,7 +61,7 @@
/obj/item/weapon/material/twohanded/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(wielded && default_parry_check(user, attacker, damage_source) && prob(15))
user.visible_message("\The [user] parries [attack_text] with \the [src]!")
- playsound(user.loc, 'sound/weapons/punchmiss.ogg', 50, 1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
return 1
return 0
diff --git a/code/game/objects/items/weapons/material/twohanded.dm.orig b/code/game/objects/items/weapons/material/twohanded.dm.orig
index 01f4ee7e55..47d4f230c6 100644
--- a/code/game/objects/items/weapons/material/twohanded.dm.orig
+++ b/code/game/objects/items/weapons/material/twohanded.dm.orig
@@ -159,18 +159,8 @@
if(istype(A,/obj/structure/window))
var/obj/structure/window/W = A
W.shatter()
-<<<<<<< HEAD:code/game/objects/items/weapons/material/twohanded.dm
/*
-=======
- else if(istype(A,/obj/structure/grille))
- qdel(A)
- else if(istype(A,/obj/effect/plant))
- var/obj/effect/plant/P = A
- P.die_off()
-
- qdel(A)
->>>>>>> 284d1cc1f5c67503fe0da89ce01985d73bb02038:code/game/objects/items/weapons/twohanded.dm
/*
* Double-Bladed Energy Swords - Cheridan
*/
diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm
index 21d4d53a5c..7153ebfa60 100644
--- a/code/game/objects/items/weapons/melee/energy.dm
+++ b/code/game/objects/items/weapons/melee/energy.dm
@@ -57,14 +57,14 @@
sharp = 1
edge = 1
w_class = active_w_class
- playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
+ playsound(src, 'sound/weapons/saberon.ogg', 50, 1)
update_icon()
set_light(lrange, lpower, lcolor)
/obj/item/weapon/melee/energy/proc/deactivate(mob/living/user)
if(!active)
return
- playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
+ playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
item_state = "[icon_state]"
active = 0
embed_chance = initial(embed_chance)
@@ -310,7 +310,7 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
return 1
if(active && unique_parry_check(user, attacker, damage_source) && prob(projectile_parry_chance))
user.visible_message("\The [user] deflects [attack_text] with \the [src]!")
@@ -318,7 +318,7 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
return 1
return 0
@@ -370,7 +370,7 @@
// EMP stuff.
var/obj/O = AM
O.emp_act(3) // A weaker severity is used because this has infinite uses.
- playsound(get_turf(O), 'sound/effects/EMPulse.ogg', 100, 1)
+ playsound(O, 'sound/effects/EMPulse.ogg', 100, 1)
user.setClickCooldown(user.get_attack_speed(src)) // A lot of objects don't set click delay.
return ..()
@@ -379,9 +379,9 @@
if(target.isSynthetic() && active)
// Do some extra damage. Not a whole lot more since emp_act() is pretty nasty on FBPs already.
target.emp_act(3) // A weaker severity is used because this has infinite uses.
- playsound(get_turf(target), 'sound/effects/EMPulse.ogg', 100, 1)
+ playsound(target, 'sound/effects/EMPulse.ogg', 100, 1)
target.adjustFireLoss(force * 3) // 15 Burn, for 20 total.
- playsound(get_turf(target), 'sound/weapons/blade1.ogg', 100, 1)
+ playsound(target, 'sound/weapons/blade1.ogg', 100, 1)
// Make lesser robots really mad at us.
if(target.mob_class & MOB_CLASS_SYNTHETIC)
@@ -481,7 +481,7 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
return 1
if(unique_parry_check(user, attacker, damage_source) && prob(projectile_parry_chance))
user.visible_message("\The [user] deflects [attack_text] with \the [src]!")
@@ -489,7 +489,7 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
return 1
return 0
@@ -547,6 +547,6 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
return 1
return 0
diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm
index 7d390d613f..4185cf92c2 100644
--- a/code/game/objects/items/weapons/melee/misc.dm
+++ b/code/game/objects/items/weapons/melee/misc.dm
@@ -69,7 +69,7 @@
/obj/item/weapon/melee/cursedblade/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
if(default_parry_check(user, attacker, damage_source) && prob(50))
user.visible_message("\The [user] parries [attack_text] with \the [src]!")
- playsound(user.loc, 'sound/weapons/punchmiss.ogg', 50, 1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
return 1
return 0
diff --git a/code/game/objects/items/weapons/paiwire.dm b/code/game/objects/items/weapons/paiwire.dm
index 638d8f51cb..b654c24e67 100644
--- a/code/game/objects/items/weapons/paiwire.dm
+++ b/code/game/objects/items/weapons/paiwire.dm
@@ -1,7 +1,7 @@
/obj/item/weapon/pai_cable/proc/plugin(obj/machinery/M as obj, mob/user as mob)
if(istype(M, /obj/machinery/door) || istype(M, /obj/machinery/camera))
user.visible_message("[user] inserts [src] into a data port on [M].", "You insert [src] into a data port on [M].", "You hear the satisfying click of a wire jack fastening into place.")
- playsound(user, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
user.drop_item()
src.loc = M
src.machine = M
diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm
index 4d78a09bc5..e4a518e8db 100644
--- a/code/game/objects/items/weapons/shields.dm
+++ b/code/game/objects/items/weapons/shields.dm
@@ -94,7 +94,7 @@
return 0
//Otherwise, if we're here, we're gonna stop the attack entirely.
user.visible_message("\The [user] blocks [attack_text] with \the [src]!")
- playsound(user.loc, 'sound/weapons/Genhit.ogg', 50, 1)
+ playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
return 1
return 0
@@ -102,7 +102,7 @@
if(istype(W, /obj/item/weapon/melee/baton))
if(cooldown < world.time - 25)
user.visible_message("[user] bashes [src] with [W]!")
- playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
+ playsound(src, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()
@@ -144,7 +144,7 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
/obj/item/weapon/shield/energy/get_block_chance(mob/user, var/damage, atom/damage_source = null, mob/attacker = null)
if(istype(damage_source, /obj/item/projectile))
@@ -163,7 +163,7 @@
update_icon()
w_class = ITEMSIZE_LARGE
slot_flags = null
- playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
+ playsound(src, 'sound/weapons/saberon.ogg', 50, 1)
to_chat(user, "\The [src] is now active.")
else
@@ -171,7 +171,7 @@
update_icon()
w_class = ITEMSIZE_TINY
slot_flags = SLOT_EARS
- playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
+ playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
to_chat(user, "\The [src] can now be concealed.")
if(istype(user,/mob/living/carbon/human))
@@ -240,7 +240,7 @@
/obj/item/weapon/shield/riot/tele/attack_self(mob/living/user)
active = !active
icon_state = "teleriot[active]"
- playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
+ playsound(src, 'sound/weapons/empty.ogg', 50, 1)
if(active)
force = 8
diff --git a/code/game/objects/items/weapons/storage/backpack.dm b/code/game/objects/items/weapons/storage/backpack.dm
index 88f6caeb74..2cdc341523 100644
--- a/code/game/objects/items/weapons/storage/backpack.dm
+++ b/code/game/objects/items/weapons/storage/backpack.dm
@@ -21,13 +21,13 @@
/obj/item/weapon/storage/backpack/equipped(var/mob/user, var/slot)
if (slot == slot_back && src.use_sound)
- playsound(src.loc, src.use_sound, 50, 1, -5)
+ playsound(src, src.use_sound, 50, 1, -5)
..(user, slot)
/*
/obj/item/weapon/storage/backpack/dropped(mob/user as mob)
if (loc == user && src.use_sound)
- playsound(src.loc, src.use_sound, 50, 1, -5)
+ playsound(src, src.use_sound, 50, 1, -5)
..(user)
*/
diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm
index 0d97b4f878..75cbc2297e 100644
--- a/code/game/objects/items/weapons/storage/bible.dm
+++ b/code/game/objects/items/weapons/storage/bible.dm
@@ -35,5 +35,5 @@
/obj/item/weapon/storage/bible/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (src.use_sound)
- playsound(src.loc, src.use_sound, 50, 1, -5)
+ playsound(src, src.use_sound, 50, 1, -5)
..()
diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm
index a1cad988d7..1655cb28a6 100644
--- a/code/game/objects/items/weapons/storage/boxes.dm
+++ b/code/game/objects/items/weapons/storage/boxes.dm
@@ -52,7 +52,7 @@
return
// Now make the cardboard
to_chat(user, "You fold [src] flat.")
- playsound(src.loc, 'sound/items/storage/boxfold.ogg', 30, 1)
+ playsound(src, 'sound/items/storage/boxfold.ogg', 30, 1)
new foldable(get_turf(src))
qdel(src)
diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm
index 2fa8e54e87..b10caa3610 100644
--- a/code/game/objects/items/weapons/storage/lockbox.dm
+++ b/code/game/objects/items/weapons/storage/lockbox.dm
@@ -40,8 +40,8 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
- playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
- playsound(src.loc, "sparks", 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, "sparks", 50, 1)
if(!locked)
..()
else
diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm
index c8bc129e3d..034e37ff8e 100644
--- a/code/game/objects/items/weapons/storage/secure.dm
+++ b/code/game/objects/items/weapons/storage/secure.dm
@@ -39,8 +39,8 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
- playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
- playsound(src.loc, "sparks", 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, "sparks", 50, 1)
return
if (W.is_screwdriver())
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index 5fc789549a..bfcbd695e5 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -142,7 +142,7 @@
/obj/item/weapon/storage/proc/open(mob/user as mob)
if (use_sound)
- playsound(src.loc, src.use_sound, 50, 0, -5)
+ playsound(src, src.use_sound, 50, 0, -5)
orient2hud(user)
if (user.s_active)
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index 183366a4c7..87ce75a233 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -148,7 +148,7 @@
if(bcell && bcell.charge > hitcost)
status = !status
to_chat(user, "[src] is now [status ? "on" : "off"].")
- playsound(loc, "sparks", 75, 1, -1)
+ playsound(src, "sparks", 75, 1, -1)
update_icon()
else
status = 0
@@ -193,7 +193,7 @@
target.visible_message("[target] has been prodded in the [affecting.name] with [src] by [user]!")
else
target.visible_message("[target] has been prodded with [src] by [user]!")
- playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/Egloves.ogg', 50, 1, -1)
//stun effects
if(status)
diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm
index 204ebb6f89..a4a7992872 100644
--- a/code/game/objects/items/weapons/swords_axes_etc.dm
+++ b/code/game/objects/items/weapons/swords_axes_etc.dm
@@ -77,7 +77,7 @@
H.update_inv_l_hand()
H.update_inv_r_hand()
- playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
+ playsound(src, 'sound/weapons/empty.ogg', 50, 1)
add_fingerprint(user)
if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any
@@ -104,7 +104,7 @@
user.take_organ_damage(2*force)
return
if(..())
- //playsound(src.loc, "swing_hit", 50, 1, -1)
+ //playsound(src, "swing_hit", 50, 1, -1)
return
else
return ..()
diff --git a/code/game/objects/items/weapons/syndie.dm b/code/game/objects/items/weapons/syndie.dm
index c4e273deea..b97f5303df 100644
--- a/code/game/objects/items/weapons/syndie.dm
+++ b/code/game/objects/items/weapons/syndie.dm
@@ -48,7 +48,7 @@
/obj/item/weapon/syndie/c4explosive/proc/detonate()
icon_state = "c-4[size]_1"
- playsound(loc, 'sound/weapons/armbomb.ogg', 75, 1)
+ playsound(src, 'sound/weapons/armbomb.ogg', 75, 1)
for(var/mob/O in hearers(src, null))
O.show_message("[bicon(src)] The [src.name] beeps! ")
sleep(50)
diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm
index c78ffc7d55..32f6f99b27 100644
--- a/code/game/objects/items/weapons/tanks/jetpack.dm
+++ b/code/game/objects/items/weapons/tanks/jetpack.dm
@@ -31,7 +31,7 @@
. = ..()
if(air_contents.total_moles < 5)
. += "The meter on \the [src] indicates you are almost out of gas!"
- playsound(user, 'sound/effects/alert.ogg', 50, 1)
+ playsound(src, 'sound/effects/alert.ogg', 50, 1)
/obj/item/weapon/tank/jetpack/verb/toggle_rockets()
set name = "Toggle Jetpack Stabilization"
diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm
index 9ecfaf16ce..9957e09f55 100644
--- a/code/game/objects/items/weapons/tanks/tanks.dm
+++ b/code/game/objects/items/weapons/tanks/tanks.dm
@@ -471,7 +471,7 @@ var/list/global/tank_gauge_cache = list()
if(!T)
return
T.assume_air(air_contents)
- playsound(get_turf(src), 'sound/weapons/Gunshot_shotgun.ogg', 20, 1)
+ playsound(src, 'sound/weapons/Gunshot_shotgun.ogg', 20, 1)
visible_message("[bicon(src)] \The [src] flies apart!", "You hear a bang!")
T.hotspot_expose(air_contents.temperature, 70, 1)
@@ -518,7 +518,7 @@ var/list/global/tank_gauge_cache = list()
T.assume_air(leaked_gas)
if(!leaking)
visible_message("[bicon(src)] \The [src] relief valve flips open with a hiss!", "You hear hissing.")
- playsound(src.loc, 'sound/effects/spray.ogg', 10, 1, -3)
+ playsound(src, 'sound/effects/spray.ogg', 10, 1, -3)
leaking = 1
#ifdef FIREDBG
log_debug("[x],[y] tank is leaking: [pressure] kPa, integrity [integrity]")
@@ -678,6 +678,11 @@ var/list/global/tank_gauge_cache = list()
tank.update_icon()
tank.overlays -= "bomb_assembly"
-/obj/item/device/tankassemblyproxy/HasProximity(atom/movable/AM as mob|obj)
- if(src.assembly)
- src.assembly.HasProximity(AM)
+/obj/item/device/tankassemblyproxy/HasProximity(turf/T, atom/movable/AM, old_loc)
+ assembly?.HasProximity(T, AM, old_loc)
+
+/obj/item/device/tankassemblyproxy/Moved(old_loc, direction, forced)
+ if(isturf(old_loc))
+ unsense_proximity(callback = .HasProximity, center = old_loc)
+ if(isturf(loc))
+ sense_proximity(callback = .HasProximity)
diff --git a/code/game/objects/items/weapons/tools/crowbar.dm b/code/game/objects/items/weapons/tools/crowbar.dm
index 56afaf8219..a139efe9f6 100644
--- a/code/game/objects/items/weapons/tools/crowbar.dm
+++ b/code/game/objects/items/weapons/tools/crowbar.dm
@@ -102,7 +102,7 @@
return ..()
/obj/item/weapon/tool/crowbar/power/attack_self(mob/user)
- playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
+ playsound(src, 'sound/items/change_jaws.ogg', 50, 1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
diff --git a/code/game/objects/items/weapons/tools/screwdriver.dm b/code/game/objects/items/weapons/tools/screwdriver.dm
index c87cb50166..aea17ebf2b 100644
--- a/code/game/objects/items/weapons/tools/screwdriver.dm
+++ b/code/game/objects/items/weapons/tools/screwdriver.dm
@@ -146,7 +146,7 @@
return ..()
/obj/item/weapon/tool/screwdriver/power/attack_self(mob/user)
- playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
+ playsound(src,'sound/items/change_drill.ogg',50,1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
diff --git a/code/game/objects/items/weapons/tools/weldingtool.dm b/code/game/objects/items/weapons/tools/weldingtool.dm
index 80d4d9a856..0c0add9e24 100644
--- a/code/game/objects/items/weapons/tools/weldingtool.dm
+++ b/code/game/objects/items/weapons/tools/weldingtool.dm
@@ -146,7 +146,7 @@
if(!welding && max_fuel)
O.reagents.trans_to_obj(src, max_fuel)
to_chat(user, "Welder refueled")
- playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
+ playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
return
else if(!welding)
to_chat(user, "[src] doesn't use fuel.")
@@ -273,7 +273,7 @@
to_chat(M, "You switch the [src] on.")
else if(T)
T.visible_message("\The [src] turns on.")
- playsound(loc, acti_sound, 50, 1)
+ playsound(src, acti_sound, 50, 1)
src.force = 15
src.damtype = "fire"
src.w_class = ITEMSIZE_LARGE
@@ -295,7 +295,7 @@
to_chat(M, "You switch \the [src] off.")
else if(T)
T.visible_message("\The [src] turns off.")
- playsound(loc, deac_sound, 50, 1)
+ playsound(src, deac_sound, 50, 1)
src.force = 3
src.damtype = "brute"
src.w_class = initial(src.w_class)
diff --git a/code/game/objects/items/weapons/tools/wirecutters.dm b/code/game/objects/items/weapons/tools/wirecutters.dm
index 6d5d0bb64a..d910f2cbf9 100644
--- a/code/game/objects/items/weapons/tools/wirecutters.dm
+++ b/code/game/objects/items/weapons/tools/wirecutters.dm
@@ -113,7 +113,7 @@
return ..()
/obj/item/weapon/tool/wirecutters/power/attack_self(mob/user)
- playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
+ playsound(src, 'sound/items/change_jaws.ogg', 50, 1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
diff --git a/code/game/objects/items/weapons/tools/wrench.dm b/code/game/objects/items/weapons/tools/wrench.dm
index e48e572a51..d96a244282 100644
--- a/code/game/objects/items/weapons/tools/wrench.dm
+++ b/code/game/objects/items/weapons/tools/wrench.dm
@@ -96,7 +96,7 @@
return ..()
/obj/item/weapon/tool/wrench/power/attack_self(mob/user)
- playsound(get_turf(user),'sound/items/change_drill.ogg',50,1)
+ playsound(src,'sound/items/change_drill.ogg',50,1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
diff --git a/code/game/objects/items/weapons/towels.dm b/code/game/objects/items/weapons/towels.dm
index ba1b662ebb..b9566c399b 100644
--- a/code/game/objects/items/weapons/towels.dm
+++ b/code/game/objects/items/weapons/towels.dm
@@ -12,7 +12,7 @@
/obj/item/weapon/towel/attack_self(mob/living/user as mob)
user.visible_message(text("[] uses [] to towel themselves off.", user, src))
- playsound(user, 'sound/weapons/towelwipe.ogg', 25, 1)
+ playsound(src, 'sound/weapons/towelwipe.ogg', 25, 1)
if(user.fire_stacks > 0)
user.fire_stacks = (max(0, user.fire_stacks - 1.5))
else if(user.fire_stacks < 0)
diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm
index 8e6667c759..0ec9bc7af3 100644
--- a/code/game/objects/items/weapons/traps.dm
+++ b/code/game/objects/items/weapons/traps.dm
@@ -39,7 +39,7 @@
"You have deployed \the [src]!",
"You hear a latch click loudly."
)
- playsound(src.loc, 'sound/machines/click.ogg',70, 1)
+ playsound(src, 'sound/machines/click.ogg',70, 1)
deployed = 1
user.drop_from_inventory(src)
@@ -64,7 +64,7 @@
"You begin disarming \the [src]!",
"You hear a latch click followed by the slow creaking of a spring."
)
- playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
if(do_after(user, 60))
user.visible_message(
@@ -98,6 +98,16 @@
if(!L.apply_damage(30, BRUTE, target_zone, blocked, soaked, used_weapon=src))
return 0
+ if(ishuman(L))
+ var/mob/living/carbon/human/H = L
+ var/obj/item/organ/external/affected = H.get_organ(check_zone(target_zone))
+ if(!affected) // took it clean off!
+ to_chat(H, "The steel jaws of \the [src] take your limb clean off!")
+ L.Stun(stun_length*2)
+ deployed = 0
+ anchored = FALSE
+ return
+
//trap the victim in place
set_dir(L.dir)
can_buckle = 1
diff --git a/code/game/objects/items/weapons/trays.dm b/code/game/objects/items/weapons/trays.dm
index 48d65ffb16..6809ae4547 100644
--- a/code/game/objects/items/weapons/trays.dm
+++ b/code/game/objects/items/weapons/trays.dm
@@ -36,10 +36,10 @@
M.Weaken(1)
user.take_organ_damage(2)
if(prob(50))
- playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
+ playsound(src, 'sound/items/trayhit1.ogg', 50, 1)
return
else
- playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
+ playsound(src, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
return //it always returns, but I feel like adding an extra return just for safety's sakes. EDIT; Oh well I won't :3
var/mob/living/carbon/human/H = M ///////////////////////////////////// /Let's have this ready for later.
@@ -60,12 +60,12 @@
else
M.take_organ_damage(5)
if(prob(50))
- playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
+ playsound(src, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("[] slams [] with the tray!", user, M), 1)
return
else
- playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc
+ playsound(src, 'sound/items/trayhit2.ogg', 50, 1) //we applied the damage, we played the sound, we showed the appropriate messages. Time to return and stop the proc
for(var/mob/O in viewers(M, null))
O.show_message(text("[] slams [] with the tray!", user, M), 1)
return
@@ -93,11 +93,11 @@
location.add_blood(H)
if(prob(50))
- playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
+ playsound(src, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("[] slams [] with the tray!", user, M), 1)
else
- playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
+ playsound(src, 'sound/items/trayhit2.ogg', 50, 1) //sound playin'
for(var/mob/O in viewers(M, null))
O.show_message(text("[] slams [] with the tray!", user, M), 1)
if(prob(10))
@@ -117,11 +117,11 @@
location.add_blood(H)
if(prob(50))
- playsound(M, 'sound/items/trayhit1.ogg', 50, 1)
+ playsound(src, 'sound/items/trayhit1.ogg', 50, 1)
for(var/mob/O in viewers(M, null))
O.show_message(text("[] slams [] in the face with the tray!", user, M), 1)
else
- playsound(M, 'sound/items/trayhit2.ogg', 50, 1) //sound playin' again
+ playsound(src, 'sound/items/trayhit2.ogg', 50, 1) //sound playin' again
for(var/mob/O in viewers(M, null))
O.show_message(text("[] slams [] in the face with the tray!", user, M), 1)
if(prob(30))
@@ -141,7 +141,7 @@
if(istype(W, /obj/item/weapon/material/kitchen/rollingpin))
if(cooldown < world.time - 25)
user.visible_message("[user] bashes [src] with [W]!")
- playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, 1)
+ playsound(src, 'sound/effects/shieldbash.ogg', 50, 1)
cooldown = world.time
else
..()
diff --git a/code/game/objects/items/weapons/weldbackpack.dm b/code/game/objects/items/weapons/weldbackpack.dm
index f603aa6498..e839bba3b3 100644
--- a/code/game/objects/items/weapons/weldbackpack.dm
+++ b/code/game/objects/items/weapons/weldbackpack.dm
@@ -68,7 +68,7 @@
to_chat(user, "That was close!")
src.reagents.trans_to_obj(W, T.max_fuel)
to_chat(user, "Welder refilled!")
- playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
+ playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
return
else if(nozzle)
if(nozzle == W)
@@ -105,7 +105,7 @@
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume < max_fuel)
O.reagents.trans_to_obj(src, max_fuel)
to_chat(user, "You crack the cap off the top of the pack and fill it back up again from the tank.")
- playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
+ playsound(src, 'sound/effects/refill.ogg', 50, 1, -6)
return
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume == max_fuel)
to_chat(user, "The pack is already full!")
diff --git a/code/game/objects/structures/catwalk.dm b/code/game/objects/structures/catwalk.dm
index a912f354da..147a5dc38f 100644
--- a/code/game/objects/structures/catwalk.dm
+++ b/code/game/objects/structures/catwalk.dm
@@ -116,7 +116,7 @@
health -= amount
if(health <= 0)
visible_message("\The [src] breaks down!")
- playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
+ playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
new /obj/item/stack/rods(get_turf(src))
Destroy()
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 3ff2f5fdd7..3c25ca3f90 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -122,7 +122,7 @@
src.icon_state = src.icon_opened
src.opened = 1
- playsound(src.loc, open_sound, 15, 1, -3)
+ playsound(src, open_sound, 15, 1, -3)
if(initial(density))
density = !density
return 1
@@ -147,7 +147,7 @@
src.icon_state = src.icon_closed
src.opened = 0
- playsound(src.loc, close_sound, 15, 1, -3)
+ playsound(src, close_sound, 15, 1, -3)
if(initial(density))
density = !density
return 1
@@ -427,7 +427,16 @@
breakout = 0
return
- playsound(src.loc, breakout_sound, 100, 1)
+ playsound(src, breakout_sound, 100, 1)
+ animate_shake()
+ add_fingerprint(escapee)
+
+ //Well then break it!
+ breakout = 0
+ to_chat(escapee, "You successfully break out!")
+ visible_message("\The [escapee] successfully broke out of \the [src]!")
+ playsound(src, breakout_sound, 100, 1)
+ break_open()
animate_shake()
add_fingerprint(escapee)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm
index 0a77e4cafc..3094814d16 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm
@@ -78,8 +78,8 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
- playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
- playsound(src.loc, "sparks", 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, "sparks", 50, 1)
else
to_chat(user, "Access Denied")
return
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
index af07ceb9e5..c5732a337e 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
@@ -56,7 +56,7 @@
return
if(src.allowed(user))
src.locked = !src.locked
- playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
+ playsound(src, 'sound/machines/click.ogg', 15, 1, -3)
for(var/mob/O in viewers(user, 3))
if((O.client && !( O.blinded )))
to_chat(O, "The locker has been [locked ? null : "un"]locked by [user].")
@@ -86,8 +86,8 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
- playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
- playsound(src.loc, "sparks", 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, "sparks", 50, 1)
else if(W.is_wrench())
if(sealed)
if(anchored)
diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm
index 55378be679..e6f37f64d0 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -34,7 +34,7 @@
if(usr.stunned)
return 2
- playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
+ playsound(src, 'sound/machines/click.ogg', 15, 1, -3)
for(var/obj/O in src)
O.forceMove(get_turf(src))
icon_state = icon_opened
@@ -50,7 +50,7 @@
if(!src.can_close())
return 0
- playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
+ playsound(src, 'sound/machines/click.ogg', 15, 1, -3)
var/itemcount = 0
for(var/obj/O in get_turf(src))
if(itemcount >= storage_capacity)
@@ -97,7 +97,7 @@
else if(W.is_wirecutter())
if(rigged)
to_chat(user , "You cut away the wiring.")
- playsound(src.loc, W.usesound, 100, 1)
+ playsound(src, W.usesound, 100, 1)
rigged = 0
return
else return attack_hand(user)
@@ -206,7 +206,7 @@
overlays += emag
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
- playsound(src.loc, "sparks", 60, 1)
+ playsound(src, "sparks", 60, 1)
src.locked = 0
src.broken = 1
to_chat(user, "You unlock \the [src].")
@@ -225,7 +225,7 @@
overlays += emag
overlays += sparks
spawn(6) overlays -= sparks //Tried lots of stuff but nothing works right. so i have to use this *sadface*
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
src.locked = 0
if(!opened && prob(20/severity))
if(!locked)
diff --git a/code/game/objects/structures/crates_lockers/vehiclecage.dm b/code/game/objects/structures/crates_lockers/vehiclecage.dm
index b565124e78..b98636eb16 100644
--- a/code/game/objects/structures/crates_lockers/vehiclecage.dm
+++ b/code/game/objects/structures/crates_lockers/vehiclecage.dm
@@ -32,11 +32,11 @@
if(!T)
to_chat(user, "You can't open this here!")
if(W.is_wrench() && do_after(user, 60 * W.toolspeed, src))
- playsound(loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message("[user] begins loosening \the [src]'s bolts.")
if(W.is_wirecutter() && do_after(user, 70 * W.toolspeed, src))
- playsound(loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
disassemble(W, user)
user.visible_message("[user] begins cutting \the [src]'s bolts.")
else
diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm
index c44f714cc5..9de63fd3d0 100644
--- a/code/game/objects/structures/curtains.dm
+++ b/code/game/objects/structures/curtains.dm
@@ -22,7 +22,7 @@
..(P, def_zone)
/obj/structure/curtain/attack_hand(mob/user)
- playsound(get_turf(loc), "rustle", 15, 1, -5)
+ playsound(src, "rustle", 15, 1, -5)
toggle()
..()
diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm
index 088dbd33c6..0f18d967b3 100644
--- a/code/game/objects/structures/displaycase.dm
+++ b/code/game/objects/structures/displaycase.dm
@@ -43,7 +43,7 @@
playsound(src, "shatter", 70, 1)
update_icon()
else
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
return
/obj/structure/displaycase/update_icon()
@@ -57,7 +57,7 @@
/obj/structure/displaycase/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.setClickCooldown(user.get_attack_speed(W))
user.do_attack_animation(src)
- playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 50, 1)
src.health -= W.force
src.healthcheck()
..()
diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index 40c47c9bb9..5a786cacd8 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -268,7 +268,7 @@
if (S)
if (S.get_amount() >= 1)
if(material_name == "rglass")
- playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
+ playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(1))
@@ -280,7 +280,7 @@
to_chat(user, "You cannot make an airlock out of that material.")
return
if(S.get_amount() >= 2)
- playsound(src.loc, 'sound/items/Crowbar.ogg', 100, 1)
+ playsound(src, 'sound/items/Crowbar.ogg', 100, 1)
user.visible_message("[user] adds [S.name] to the airlock assembly.", "You start to install [S.name] into the airlock assembly.")
if(do_after(user, 40) && !glass)
if (S.use(2))
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index 0879e196f2..ed3669247a 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -38,7 +38,7 @@
if(O.is_wrench())
if(!has_extinguisher)
to_chat(user, "You start to unwrench the extinguisher cabinet.")
- playsound(src.loc, O.usesound, 50, 1)
+ playsound(src, O.usesound, 50, 1)
if(do_after(user, 15 * O.toolspeed))
to_chat(user, "You unwrench the extinguisher cabinet.")
new /obj/item/frame/extinguisher_cabinet( src.loc )
diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm
index e5735d1255..2e2251fabe 100644
--- a/code/game/objects/structures/fireaxe.dm
+++ b/code/game/objects/structures/fireaxe.dm
@@ -31,7 +31,7 @@
if (isrobot(user) || locked)
if(istype(O, /obj/item/device/multitool))
to_chat(user, "Resetting circuitry...")
- playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
+ playsound(src, 'sound/machines/lockreset.ogg', 50, 1)
if(do_after(user, 20 * O.toolspeed))
locked = 0
to_chat(user, " You disable the locking modules.")
@@ -44,13 +44,13 @@
toggle_close_open()
return
else
- playsound(user, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
+ playsound(src, 'sound/effects/Glasshit.ogg', 100, 1) //We don't want this playing every time
if(W.force < 15)
to_chat(user, "The cabinet's protective glass glances off the hit.")
else
hitstaken++
if(hitstaken == 4)
- playsound(user, 'sound/effects/Glassbr3.ogg', 100, 1) //Break cabinet, receive goodies. Cabinet's fucked for life after that.
+ playsound(src, 'sound/effects/Glassbr3.ogg', 100, 1) //Break cabinet, receive goodies. Cabinet's fucked for life after that.
smashed = 1
locked = 0
open= 1
@@ -82,7 +82,7 @@
return
else
to_chat(user, "Resetting circuitry...")
- playsound(user, 'sound/machines/lockenable.ogg', 50, 1)
+ playsound(src, 'sound/machines/lockenable.ogg', 50, 1)
if(do_after(user,20 * O.toolspeed))
locked = 1
to_chat(user, " You re-enable the locking modules.")
diff --git a/code/game/objects/structures/fitness.dm b/code/game/objects/structures/fitness.dm
index 158bf5533b..729e578ba5 100644
--- a/code/game/objects/structures/fitness.dm
+++ b/code/game/objects/structures/fitness.dm
@@ -20,7 +20,7 @@
if(user.a_intent == I_HURT)
user.setClickCooldown(user.get_attack_speed())
flick("[icon_state]_hit", src)
- playsound(src.loc, 'sound/effects/woodhit.ogg', 25, 1, -1)
+ playsound(src, 'sound/effects/woodhit.ogg', 25, 1, -1)
user.do_attack_animation(src)
user.nutrition = user.nutrition - 5
to_chat(user, "You [pick(hit_message)] \the [src].")
@@ -34,7 +34,7 @@
/obj/structure/fitness/weightlifter/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(W.is_wrench())
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 75, 1)
weight = ((weight) % qualifiers.len) + 1
to_chat(user, "You set the machine's weight level to [weight].")
@@ -52,12 +52,12 @@
return
else
being_used = 1
- playsound(src.loc, 'sound/effects/weightlifter.ogg', 50, 1)
+ playsound(src, 'sound/effects/weightlifter.ogg', 50, 1)
user.set_dir(SOUTH)
flick("[icon_state]_[weight]", src)
if(do_after(user, 20 + (weight * 10)))
- playsound(src.loc, 'sound/effects/weightdrop.ogg', 25, 1)
- user.nutrition -= weight * 10
+ playsound(src, 'sound/effects/weightdrop.ogg', 25, 1)
+ user.adjust_nutrition(weight * -10)
to_chat(user, "You lift the weights [qualifiers[weight]].")
being_used = 0
else
diff --git a/code/game/objects/structures/flora/trees.dm b/code/game/objects/structures/flora/trees.dm
index c4d8f58ebd..a9f3658ff6 100644
--- a/code/game/objects/structures/flora/trees.dm
+++ b/code/game/objects/structures/flora/trees.dm
@@ -58,9 +58,9 @@
damage_to_do = round(damage_to_do / 4)
if(damage_to_do > 0)
if(W.sharp && W.edge)
- playsound(get_turf(src), 'sound/effects/woodcutting.ogg', 50, 1)
+ playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
else
- playsound(get_turf(src), W.hitsound, 50, 1)
+ playsound(src, W.hitsound, 50, 1)
if(damage_to_do > 5 && !indestructable)
adjust_health(-damage_to_do)
else
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index d959aaa1ee..2cc53ff821 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -27,7 +27,7 @@
/obj/structure/grille/attack_hand(mob/user as mob)
user.setClickCooldown(user.get_attack_speed())
- playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
+ playsound(src, 'sound/effects/grillehit.ogg', 80, 1)
user.do_attack_animation(src)
var/damage_dealt = 1
@@ -153,7 +153,7 @@
else if((W.flags & NOCONDUCT) || !shock(user, 70))
user.setClickCooldown(user.get_attack_speed(W))
user.do_attack_animation(src)
- playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
+ playsound(src, 'sound/effects/grillehit.ogg', 80, 1)
switch(W.damtype)
if("fire")
health -= W.force
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
index 995bf4eece..3e58a93850 100644
--- a/code/game/objects/structures/inflatable.dm
+++ b/code/game/objects/structures/inflatable.dm
@@ -86,7 +86,7 @@
/obj/structure/inflatable/proc/hit(var/damage, var/sound_effect = 1)
health = max(0, health - damage)
if(sound_effect)
- playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
if(health <= 0)
puncture()
@@ -102,7 +102,7 @@
qdel(src)
/obj/structure/inflatable/proc/deflate()
- playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
+ playsound(src, 'sound/machines/hiss.ogg', 75, 1)
//to_chat(user, "You slowly deflate the inflatable wall.")
visible_message("[src] slowly deflates.")
spawn(50)
@@ -111,7 +111,7 @@
qdel(src)
/obj/structure/inflatable/proc/puncture()
- playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
+ playsound(src, 'sound/machines/hiss.ogg', 75, 1)
visible_message("[src] rapidly deflates!")
var/obj/item/inflatable/torn/R = new /obj/item/inflatable/torn(loc)
src.transfer_fingerprints_to(R)
@@ -227,7 +227,7 @@
icon_state = "door_closed"
/obj/structure/inflatable/door/deflate()
- playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
+ playsound(src, 'sound/machines/hiss.ogg', 75, 1)
visible_message("[src] slowly deflates.")
spawn(50)
var/obj/item/inflatable/door/R = new /obj/item/inflatable/door(loc)
@@ -235,7 +235,7 @@
qdel(src)
/obj/structure/inflatable/door/puncture()
- playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
+ playsound(src, 'sound/machines/hiss.ogg', 75, 1)
visible_message("[src] rapidly deflates!")
var/obj/item/inflatable/door/torn/R = new /obj/item/inflatable/door/torn(loc)
src.transfer_fingerprints_to(R)
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index 78bc276ecd..f320c478b9 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -329,7 +329,7 @@ GLOBAL_LIST_BOILERPLATE(all_janitorial_carts, /obj/structure/janitorialcart)
if(reagents.total_volume > 1)
reagents.trans_to_obj(I, 2)
to_chat(user, "You wet [I] in the [callme].")
- playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
+ playsound(src, 'sound/effects/slosh.ogg', 25, 1)
else
to_chat(user, "This [callme] is out of water!")
else if(istype(I, /obj/item/key))
diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm
index 07cc774fb0..4705b39276 100644
--- a/code/game/objects/structures/mirror.dm
+++ b/code/game/objects/structures/mirror.dm
@@ -51,7 +51,7 @@
/obj/structure/mirror/attackby(obj/item/I as obj, mob/user as mob)
if(I.is_wrench())
if(!glass)
- playsound(src.loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
if(do_after(user, 20 * I.toolspeed))
to_chat(user, "You unfasten the frame.")
new /obj/item/frame/mirror( src.loc )
@@ -65,7 +65,7 @@
new /obj/item/weapon/material/shard( src.loc )
return
if(!shattered && glass)
- playsound(src.loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
to_chat(user, "You remove the glass.")
glass = !glass
icon_state = "mirror_frame"
@@ -88,7 +88,7 @@
return
if(shattered && glass)
- playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
+ playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return
if(prob(I.force * 2))
@@ -97,13 +97,13 @@
shatter()
else
visible_message("[user] hits [src] with [I]!")
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 70, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 70, 1)
/obj/structure/mirror/attack_generic(var/mob/user, var/damage)
user.do_attack_animation(src)
if(shattered && glass)
- playsound(src.loc, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
+ playsound(src, 'sound/effects/hit_on_shattered_glass.ogg', 70, 1)
return 0
if(damage)
diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm
index 13e3ca4cdc..e7e80206f2 100644
--- a/code/game/objects/structures/mop_bucket.dm
+++ b/code/game/objects/structures/mop_bucket.dm
@@ -28,4 +28,4 @@ GLOBAL_LIST_BOILERPLATE(all_mopbuckets, /obj/structure/mopbucket)
else
reagents.trans_to_obj(I, 5)
to_chat(user, "You wet \the [I] in \the [src].")
- playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
+ playsound(src, 'sound/effects/slosh.ogg', 25, 1)
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index c1ccfb6c69..d22d903861 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -95,13 +95,13 @@
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.forceMove(src)
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
qdel(src.connected)
src.connected = null
/obj/structure/morgue/proc/open()
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
src.connected = new /obj/structure/m_tray( src.loc )
step(src.connected, src.dir)
src.connected.layer = OBJ_LAYER
@@ -225,11 +225,11 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium)
for(var/atom/movable/A as mob|obj in src.connected.loc)
if (!( A.anchored ))
A.forceMove(src)
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
//src.connected = null
qdel(src.connected)
else if (src.locked == 0)
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
src.connected = new /obj/structure/m_tray/c_tray( src.loc )
step(src.connected, EAST)
src.connected.layer = OBJ_LAYER
@@ -319,7 +319,7 @@ GLOBAL_LIST_BOILERPLATE(all_crematoriums, /obj/structure/morgue/crematorium)
sleep(30)
cremating = 0
locked = 0
- playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
+ playsound(src, 'sound/machines/ding.ogg', 50, 1)
return
diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm
index 39eea11236..cfd036b9bb 100644
--- a/code/game/objects/structures/musician.dm
+++ b/code/game/objects/structures/musician.dm
@@ -345,7 +345,7 @@
/obj/structure/device/piano/attackby(obj/item/O as obj, mob/user as mob)
if(O.is_wrench())
if(anchored)
- playsound(src.loc, O.usesound, 50, 1)
+ playsound(src, O.usesound, 50, 1)
to_chat(user, "You begin to loosen \the [src]'s casters...")
if (do_after(user, 40 * O.toolspeed))
user.visible_message( \
@@ -354,7 +354,7 @@
"You hear ratchet.")
src.anchored = 0
else
- playsound(src.loc, O.usesound, 50, 1)
+ playsound(src, O.usesound, 50, 1)
to_chat(user, "You begin to tighten \the [src] to the floor...")
if (do_after(user, 20 * O.toolspeed))
user.visible_message( \
diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm
index c701ae9015..629bc1c41e 100644
--- a/code/game/objects/structures/noticeboard.dm
+++ b/code/game/objects/structures/noticeboard.dm
@@ -43,7 +43,7 @@
to_chat(user, "You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.")
if(O.is_wrench())
to_chat(user, "You start to unwrench the noticeboard.")
- playsound(src.loc, O.usesound, 50, 1)
+ playsound(src, O.usesound, 50, 1)
if(do_after(user, 15 * O.toolspeed))
to_chat(user, "You unwrench the noticeboard.")
new /obj/item/frame/noticeboard( src.loc )
diff --git a/code/game/objects/structures/props/swarm.dm b/code/game/objects/structures/props/swarm.dm
index 85cc967e68..128254a456 100644
--- a/code/game/objects/structures/props/swarm.dm
+++ b/code/game/objects/structures/props/swarm.dm
@@ -37,7 +37,7 @@
if(prob(1 + damage * 3))
visible_message("[shatter_message]")
STOP_PROCESSING(SSobj, src)
- playsound(get_turf(src),shatter_sound, 75, 1)
+ playsound(src,shatter_sound, 75, 1)
isbroken = 1
density = 0
icon_state = "[initial(icon_state)]-broken"
@@ -53,21 +53,21 @@
)
STOP_PROCESSING(SSobj, src)
user.do_attack_animation(src)
- playsound(get_turf(src),shatter_sound, 75, 1)
+ playsound(src,shatter_sound, 75, 1)
isbroken = 1
density = 0
icon_state = "[initial(icon_state)]-broken"
set_light(0)
else
to_chat(user, "You hit \the [src]!")
- playsound(get_turf(src),impact_sound, 75, 1)
+ playsound(src,impact_sound, 75, 1)
else
if(prob(damage * 2))
to_chat(user, "You pulverize what was left of \the [src]!")
qdel(src)
else
to_chat(user, "You hit \the [src]!")
- playsound(get_turf(src),impact_sound, 75, 1)
+ playsound(src,impact_sound, 75, 1)
/obj/structure/cult/pylon/swarm/pylon_unique()
. = ..()
@@ -117,7 +117,7 @@
if(prob(1 + damage * 3) && damage >= 25)
visible_message("[shatter_message]")
STOP_PROCESSING(SSobj, src)
- playsound(get_turf(src),shatter_sound, 75, 1)
+ playsound(src,shatter_sound, 75, 1)
isbroken = 1
density = 0
icon_state = "[initial(icon_state)]-broken"
@@ -133,18 +133,18 @@
)
STOP_PROCESSING(SSobj, src)
user.do_attack_animation(src)
- playsound(get_turf(src),shatter_sound, 75, 1)
+ playsound(src,shatter_sound, 75, 1)
isbroken = 1
density = 0
icon_state = "[initial(icon_state)]-broken"
set_light(0)
else
to_chat(user, "You hit \the [src]!")
- playsound(get_turf(src),impact_sound, 75, 1)
+ playsound(src,impact_sound, 75, 1)
else
if(prob(damage * 3))
to_chat(user, "You pulverize what was left of \the [src]!")
qdel(src)
else
to_chat(user, "You hit \the [src]!")
- playsound(get_turf(src),impact_sound, 75, 1)
+ playsound(src,impact_sound, 75, 1)
diff --git a/code/game/objects/structures/railing.dm b/code/game/objects/structures/railing.dm
index ae21c406c3..5a4ce00a8c 100644
--- a/code/game/objects/structures/railing.dm
+++ b/code/game/objects/structures/railing.dm
@@ -63,7 +63,7 @@
health -= amount
if(health <= 0)
visible_message("\The [src] breaks down!")
- playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
+ playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
new /obj/item/stack/rods(get_turf(src))
qdel(src)
@@ -203,7 +203,7 @@
/obj/structure/railing/attackby(obj/item/W as obj, mob/user as mob)
// Dismantle
if(W.is_wrench() && !anchored)
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("\The [user] dismantles \the [src].", "You dismantle \the [src].")
new /obj/item/stack/material/steel(get_turf(usr), 2)
@@ -214,7 +214,7 @@
if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/F = W
if(F.welding)
- playsound(src.loc, F.usesound, 50, 1)
+ playsound(src, F.usesound, 50, 1)
if(do_after(user, 20, src))
user.visible_message("\The [user] repairs some damage to \the [src].", "You repair some damage to \the [src].")
health = min(health+(maxhealth/5), maxhealth) // 20% repair per application
@@ -223,7 +223,7 @@
// Install
if(W.is_screwdriver())
user.visible_message(anchored ? "\The [user] begins unscrewing \the [src]." : "\The [user] begins fasten \the [src]." )
- playsound(loc, W.usesound, 75, 1)
+ playsound(src, W.usesound, 75, 1)
if(do_after(user, 10, src))
to_chat(user, (anchored ? "You have unfastened \the [src] from the floor." : "You have fastened \the [src] to the floor."))
anchored = !anchored
@@ -245,7 +245,7 @@
M.apply_damage(8,def_zone = "head")
take_damage(8)
visible_message("[G.assailant] slams [G.affecting]'s face against \the [src]!")
- playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
+ playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
else
to_chat(user, "You need a better grip to do that!")
return
@@ -260,7 +260,7 @@
return
else
- playsound(loc, 'sound/effects/grillehit.ogg', 50, 1)
+ playsound(src, 'sound/effects/grillehit.ogg', 50, 1)
take_damage(W.force)
user.setClickCooldown(user.get_attack_speed(W))
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index 9de9dc082b..e68fa43640 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -114,7 +114,7 @@ FLOOR SAFES
tumbler_2_pos = decrement(tumbler_2_pos)
if(canhear)
to_chat(user, "You hear a [pick("click", "chink", "clink")] from \the [src].")
- playsound(user, 'sound/machines/click.ogg', 20, 1)
+ playsound(src, 'sound/machines/click.ogg', 20, 1)
check_unlocked(user, canhear)
updateUsrDialog()
@@ -130,7 +130,7 @@ FLOOR SAFES
tumbler_2_pos = increment(tumbler_2_pos)
if(canhear)
to_chat(user, "You hear a [pick("click", "chink", "clink")] from \the [src].")
- playsound(user, 'sound/machines/click.ogg', 20, 1)
+ playsound(src, 'sound/machines/click.ogg', 20, 1)
check_unlocked(user, canhear)
updateUsrDialog()
return
diff --git a/code/game/objects/structures/salvageable.dm b/code/game/objects/structures/salvageable.dm
index 2703a7eed6..201b203acc 100644
--- a/code/game/objects/structures/salvageable.dm
+++ b/code/game/objects/structures/salvageable.dm
@@ -15,7 +15,7 @@
/obj/structure/salvageable/attackby(obj/item/I, mob/user)
if(I.is_crowbar())
- playsound(loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
var/actual_time = I.toolspeed * 170
user.visible_message( \
"\The [user] begins salvaging from \the [src].", \
@@ -240,7 +240,7 @@ obj/structure/salvageable/bliss/Initialize()
/obj/structure/salvageable/bliss/attackby(obj/item/I, mob/user)
if((. = ..()))
- playsound(user, 'sound/machines/shutdown.ogg', 60, 1)
+ playsound(src, 'sound/machines/shutdown.ogg', 60, 1)
//////////////////
//// ONE STAR ////
diff --git a/code/game/objects/structures/simple_doors.dm b/code/game/objects/structures/simple_doors.dm
index ff8dbe141e..95689683a5 100644
--- a/code/game/objects/structures/simple_doors.dm
+++ b/code/game/objects/structures/simple_doors.dm
@@ -95,7 +95,7 @@
/obj/structure/simple_door/proc/Open()
isSwitchingStates = 1
- playsound(loc, material.dooropen_noise, 100, 1)
+ playsound(src, material.dooropen_noise, 100, 1)
flick("[material.door_icon_base]opening",src)
sleep(10)
density = 0
@@ -107,7 +107,7 @@
/obj/structure/simple_door/proc/Close()
isSwitchingStates = 1
- playsound(loc, material.dooropen_noise, 100, 1)
+ playsound(src, material.dooropen_noise, 100, 1)
flick("[material.door_icon_base]closing",src)
sleep(10)
density = 1
@@ -135,9 +135,9 @@
hardness -= W.force/10
visible_message("[user] hits [src] with [W]!")
if(material == get_material_by_name("resin"))
- playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
else if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD)))
- playsound(loc, 'sound/effects/woodcutting.ogg', 100, 1)
+ playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
else
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
CheckHardness()
@@ -160,9 +160,9 @@
/obj/structure/simple_door/attack_generic(var/mob/user, var/damage, var/attack_verb)
visible_message("[user] [attack_verb] the [src]!")
if(material == get_material_by_name("resin"))
- playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
else if(material == (get_material_by_name(MAT_WOOD) || get_material_by_name(MAT_SIFWOOD)))
- playsound(loc, 'sound/effects/woodcutting.ogg', 100, 1)
+ playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
else
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
user.do_attack_animation(src)
diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
index 270583011d..ebba811fb9 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
@@ -73,7 +73,7 @@
/obj/structure/bed/nest/attackby(obj/item/weapon/W as obj, mob/user as mob)
var/aforce = W.force
health = max(0, health - aforce)
- playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
for(var/mob/M in viewers(src, 7))
M.show_message("[user] hits [src] with [W]!", 1)
healthcheck()
diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
index 0cf31edb89..3d6743d82b 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm
@@ -124,7 +124,7 @@
to_chat(user, "\The [src] has no padding to remove.")
return
to_chat(user, "You remove the padding from \the [src].")
- playsound(src.loc, W.usesound, 100, 1)
+ playsound(src, W.usesound, 100, 1)
remove_padding()
else if(istype(W, /obj/item/weapon/grab))
diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
index fc84fea573..593e1db1f2 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm
@@ -21,7 +21,7 @@
return
user.drop_item()
var/obj/structure/bed/chair/e_chair/E = new (src.loc, material.name)
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
E.set_dir(dir)
E.part = SK
SK.loc = E
@@ -188,7 +188,7 @@
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone, blocked, soaked)
- playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(istype(A, /mob/living))
var/mob/living/victim = A
def_zone = ran_zone()
diff --git a/code/game/objects/structures/stool_bed_chair_nest/stools.dm b/code/game/objects/structures/stool_bed_chair_nest/stools.dm
index 88b07f3243..407591b285 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/stools.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/stools.dm
@@ -145,7 +145,7 @@ var/global/list/stool_cache = list() //haha stool
to_chat(user, "\The [src] has no padding to remove.")
return
to_chat(user, "You remove the padding from \the [src].")
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
remove_padding()
else
..()
diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
index 639020ba5d..089e65fc04 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm
@@ -166,7 +166,7 @@
occupant.apply_effect(6, WEAKEN, blocked)
occupant.apply_effect(6, STUTTER, blocked)
occupant.apply_damage(10, BRUTE, def_zone, soaked)
- playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(istype(A, /mob/living))
var/mob/living/victim = A
def_zone = ran_zone()
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 467579a225..78ad49d907 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -46,7 +46,7 @@
/obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob)
if(I.is_crowbar())
to_chat(user, "You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"].")
- playsound(loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
+ playsound(src, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
if(do_after(user, 30))
user.visible_message("[user] [cistern ? "replaces the lid on the cistern" : "lifts the lid off the cistern"]!", "You [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]!", "You hear grinding porcelain.")
cistern = !cistern
@@ -172,7 +172,7 @@
if(I.is_wrench())
var/newtemp = input(user, "What setting would you like to set the temperature valve to?", "Water Temperature Valve") in temperature_settings
to_chat(user, "You begin to adjust the temperature valve with \the [I].")
- playsound(src.loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
if(do_after(user, 50 * I.toolspeed))
watertemp = newtemp
user.visible_message("[user] adjusts the shower with \the [I].", "You adjust the shower with \the [I].")
@@ -384,7 +384,7 @@
return
to_chat(usr, "You start washing your hands.")
- playsound(loc, 'sound/effects/sink_long.ogg', 75, 1)
+ playsound(src, 'sound/effects/sink_long.ogg', 75, 1)
busy = 1
sleep(40)
@@ -407,7 +407,7 @@
if (istype(RG) && RG.is_open_container())
RG.reagents.add_reagent("water", min(RG.volume - RG.reagents.total_volume, RG.amount_per_transfer_from_this))
user.visible_message("[user] fills \the [RG] using \the [src].","You fill \the [RG] using \the [src].")
- playsound(loc, 'sound/effects/sink.ogg', 75, 1)
+ playsound(src, 'sound/effects/sink.ogg', 75, 1)
return 1
else if (istype(O, /obj/item/weapon/melee/baton))
@@ -431,7 +431,7 @@
else if(istype(O, /obj/item/weapon/mop))
O.reagents.add_reagent("water", 5)
to_chat(user, "You wet \the [O] in \the [src].")
- playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
+ playsound(src, 'sound/effects/slosh.ogg', 25, 1)
return
var/turf/location = user.loc
diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm
index 353df5ecb8..400b997dc5 100644
--- a/code/game/objects/structures/windoor_assembly.dm
+++ b/code/game/objects/structures/windoor_assembly.dm
@@ -91,7 +91,7 @@ obj/structure/windoor_assembly/Destroy()
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
user.visible_message("[user] disassembles the windoor assembly.", "You start to disassemble the windoor assembly.")
- playsound(src.loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
if(do_after(user, 40 * WT.toolspeed))
if(!src || !WT.isOn()) return
@@ -157,7 +157,7 @@ obj/structure/windoor_assembly/Destroy()
//Adding airlock electronics for access. Step 6 complete.
else if(istype(W, /obj/item/weapon/airlock_electronics))
- playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
+ playsound(src, 'sound/items/Screwdriver.ogg', 100, 1)
user.visible_message("[user] installs the electronics into the airlock assembly.", "You start to install electronics into the airlock assembly.")
if(do_after(user, 40))
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 666f05b79b..79a6bf6e21 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -59,7 +59,7 @@
shatter()
else
if(sound_effect)
- playsound(loc, 'sound/effects/Glasshit.ogg', 100, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 100, 1)
if(health < maxhealth / 4 && initialhealth >= maxhealth / 4)
visible_message("[src] looks like it's about to shatter!" )
update_icon()
@@ -172,7 +172,7 @@
/obj/structure/window/attack_tk(mob/user as mob)
user.visible_message("Something knocks on [src].")
- playsound(loc, 'sound/effects/Glasshit.ogg', 50, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 50, 1)
/obj/structure/window/attack_hand(mob/user as mob)
user.setClickCooldown(user.get_attack_speed())
@@ -190,13 +190,13 @@
attack_generic(H,25)
return
- playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
+ playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
user.do_attack_animation(src)
usr.visible_message("\The [usr] bangs against \the [src]!",
"You bang against \the [src]!",
"You hear a banging sound.")
else
- playsound(src.loc, 'sound/effects/glassknock.ogg', 80, 1)
+ playsound(src, 'sound/effects/glassknock.ogg', 80, 1)
usr.visible_message("[usr.name] knocks on the [src.name].",
"You knock on the [src.name].",
"You hear a knocking sound.")
@@ -297,13 +297,13 @@
else if(istype(W, /obj/item/stack/cable_coil) && reinf && state == 0 && !istype(src, /obj/structure/window/reinforced/polarized))
var/obj/item/stack/cable_coil/C = W
if (C.use(1))
- playsound(src.loc, 'sound/effects/sparks1.ogg', 75, 1)
+ playsound(src, 'sound/effects/sparks1.ogg', 75, 1)
user.visible_message( \
"\The [user] begins to wire \the [src] for electrochromic tinting.", \
"You begin to wire \the [src] for electrochromic tinting.", \
"You hear sparks.")
if(do_after(user, 20 * C.toolspeed, src) && state == 0)
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
var/obj/structure/window/reinforced/polarized/P = new(loc, dir)
if(is_fulltile())
P.fulltile = TRUE
@@ -326,7 +326,7 @@
update_nearby_icons()
step(src, get_dir(user, src))
else
- playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
..()
return
diff --git a/code/game/turfs/simulated/water.dm b/code/game/turfs/simulated/water.dm
index 071499c297..9a5c0c4b48 100644
--- a/code/game/turfs/simulated/water.dm
+++ b/code/game/turfs/simulated/water.dm
@@ -45,7 +45,7 @@
else if(istype(O, /obj/item/weapon/mop))
O.reagents.add_reagent(reagent_type, 5)
to_chat(user, "You wet \the [O] in \the [src].")
- playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
+ playsound(src, 'sound/effects/slosh.ogg', 25, 1)
return 1
else return ..()
diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm
index 29bad72682..8b6e71aeda 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -136,15 +136,10 @@
return
/turf/space/Entered(var/atom/movable/A)
- ..()
-
- if (!A || src != A.loc)
- return
-
- inertial_drift(A)
+ . = ..()
if(edge && ticker?.mode)
- A.touch_map_edge()
+ A?.touch_map_edge()
/turf/space/proc/Sandbox_Spacemove(atom/movable/A as mob|obj)
var/cur_x
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 07969b9479..e93380d791 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -142,37 +142,6 @@ turf/attackby(obj/item/weapon/W as obj, mob/user as mob)
sleep(2)
O.update_transform()
-var/const/enterloopsanity = 100
-/turf/Entered(atom/atom as mob|obj)
-
- if(movement_disabled)
- to_chat(usr, "Movement is admin-disabled.") //This is to identify lag problems
- return
- ..()
-
- if(!istype(atom, /atom/movable))
- return
-
- var/atom/movable/A = atom
-
- if(ismob(A))
- var/mob/M = A
- if(M.lastarea?.has_gravity == 0)
- inertial_drift(M)
- else if(!is_space())
- M.inertia_dir = 0
- M.make_floating(0)
-
- var/objects = 0
- if(A && (A.flags & PROXMOVE))
- for(var/atom/movable/thing in range(1))
- if(objects++ > enterloopsanity) break
- spawn(0)
- if(A) //Runtime prevention
- A.HasProximity(thing, 1)
- if ((thing && A) && (thing.flags & PROXMOVE))
- thing.HasProximity(A, 1)
-
/turf/CanPass(atom/movable/mover, turf/target)
if(!target)
return FALSE
@@ -241,22 +210,6 @@ var/const/enterloopsanity = 100
/turf/proc/is_plating()
return 0
-/turf/proc/inertial_drift(atom/movable/A as mob|obj)
- if(!(A.last_move)) return
- if((istype(A, /mob/) && src.x > 1 && src.x < (world.maxx) && src.y > 1 && src.y < (world.maxy)))
- var/mob/M = A
- if(M.Process_Spacemove(1))
- M.inertia_dir = 0
- return
- spawn(5)
- if((M && !(M.anchored) && !(M.pulledby) && (M.loc == src)))
- if(M.inertia_dir)
- step(M, M.inertia_dir)
- return
- M.inertia_dir = M.last_move
- step(M, M.inertia_dir)
- return
-
/turf/proc/levelupdate()
for(var/obj/O in src)
O.hide(O.hides_under_flooring() && !is_plating())
diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm
index 2a946b492a..60f1640cdd 100644
--- a/code/modules/admin/verbs/playsound.dm
+++ b/code/modules/admin/verbs/playsound.dm
@@ -28,7 +28,7 @@ var/list/sounds_cache = list()
log_admin("[key_name(src)] played a local sound [S]")
message_admins("[key_name_admin(src)] played a local sound [S]", 1)
- playsound(get_turf(src.mob), S, 50, 0, 0)
+ playsound(src.mob, S, 50, 0, 0)
feedback_add_details("admin_verb","PLS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
diff --git a/code/modules/ai/ai_holder_communication.dm b/code/modules/ai/ai_holder_communication.dm
index ef8fcf253d..beddb68924 100644
--- a/code/modules/ai/ai_holder_communication.dm
+++ b/code/modules/ai/ai_holder_communication.dm
@@ -34,8 +34,8 @@
if(holder.say_list)
holder.ISay(safepick(holder.say_list.say_threaten))
- playsound(holder.loc, holder.say_list.threaten_sound, 50, 1) // We do this twice to make the sound -very- noticable to the target.
- playsound(target.loc, holder.say_list.threaten_sound, 50, 1) // Actual aim-mode also does that so at least it's consistant.
+ playsound(holder, holder.say_list.threaten_sound, 50, 1) // We do this twice to make the sound -very- noticable to the target.
+ playsound(target, holder.say_list.threaten_sound, 50, 1) // Actual aim-mode also does that so at least it's consistant.
else // Otherwise we are waiting for them to go away or to wait long enough for escalate.
if(target in list_targets()) // Are they still visible?
var/should_escalate = FALSE
@@ -57,8 +57,8 @@
set_stance(STANCE_IDLE)
if(holder.say_list)
holder.ISay(safepick(holder.say_list.say_stand_down))
- playsound(holder.loc, holder.say_list.stand_down_sound, 50, 1) // We do this twice to make the sound -very- noticable to the target.
- playsound(target.loc, holder.say_list.stand_down_sound, 50, 1) // Actual aim-mode also does that so at least it's consistant.
+ playsound(holder, holder.say_list.stand_down_sound, 50, 1) // We do this twice to make the sound -very- noticable to the target.
+ playsound(target, holder.say_list.stand_down_sound, 50, 1) // Actual aim-mode also does that so at least it's consistant.
// Determines what is deserving of a warning when STANCE_ALERT is active.
/datum/ai_holder/proc/will_threaten(mob/living/the_target)
diff --git a/code/modules/artifice/deadringer.dm b/code/modules/artifice/deadringer.dm
index 0906eda63e..b5edd57784 100644
--- a/code/modules/artifice/deadringer.dm
+++ b/code/modules/artifice/deadringer.dm
@@ -89,7 +89,7 @@
/obj/item/weapon/deadringer/proc/reveal()
if(watchowner)
watchowner.alpha = 255
- playsound(get_turf(src), 'sound/effects/uncloak.ogg', 35, 1, -1)
+ playsound(src, 'sound/effects/uncloak.ogg', 35, 1, -1)
return
/obj/item/weapon/deadringer/proc/makeacorpse(var/mob/living/carbon/human/H)
diff --git a/code/modules/assembly/holder.dm b/code/modules/assembly/holder.dm
index 2f6d7ab02f..824eb85b0a 100644
--- a/code/modules/assembly/holder.dm
+++ b/code/modules/assembly/holder.dm
@@ -3,7 +3,6 @@
icon = 'icons/obj/assemblies/new_assemblies.dmi'
icon_state = "holder"
item_state = "assembly"
- flags = PROXMOVE
throwforce = 5
w_class = ITEMSIZE_SMALL
throw_speed = 3
@@ -64,11 +63,18 @@
else
. += "\The [src] can be attached!"
-/obj/item/device/assembly_holder/HasProximity(atom/movable/AM as mob|obj)
+/obj/item/device/assembly_holder/Moved(atom/old_loc, direction, forced = FALSE)
+ . = ..()
+ if(isturf(old_loc))
+ unsense_proximity(callback = .HasProximity, center = old_loc)
+ if(isturf(loc))
+ sense_proximity(callback = .HasProximity)
+
+/obj/item/device/assembly_holder/HasProximity(turf/T, atom/movable/AM, old_loc)
if(a_left)
- a_left.HasProximity(AM)
+ a_left.HasProximity(T, AM, old_loc)
if(a_right)
- a_right.HasProximity(AM)
+ a_right.HasProximity(T, AM, old_loc)
/obj/item/device/assembly_holder/Crossed(atom/movable/AM as mob|obj)
if(AM.is_incorporeal())
diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm
index b294fc90c8..6ea9dfdff7 100644
--- a/code/modules/assembly/mousetrap.dm
+++ b/code/modules/assembly/mousetrap.dm
@@ -43,7 +43,7 @@
var/mob/living/simple_mob/animal/passive/mouse/M = target
visible_message("SPLAT!")
M.splat()
- playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
+ playsound(target, 'sound/effects/snap.ogg', 50, 1)
layer = MOB_LAYER - 0.2
armed = 0
update_icon()
@@ -65,7 +65,7 @@
to_chat(user, "You disarm [src].")
armed = !armed
update_icon()
- playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
+ playsound(user, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
/obj/item/device/assembly/mousetrap/attack_hand(var/mob/living/user)
if(armed)
diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm
index c439163fc2..f7d8e3e59e 100644
--- a/code/modules/assembly/proximity.dm
+++ b/code/modules/assembly/proximity.dm
@@ -4,7 +4,6 @@
icon_state = "prox"
origin_tech = list(TECH_MAGNET = 1)
matter = list(DEFAULT_WALL_MATERIAL = 800, "glass" = 200, "waste" = 50)
- flags = PROXMOVE
wires = WIRE_PULSE
secured = 0
@@ -33,7 +32,7 @@
update_icon()
return secured
-/obj/item/device/assembly/prox_sensor/HasProximity(atom/movable/AM as mob|obj)
+/obj/item/device/assembly/prox_sensor/HasProximity(turf/T, atom/movable/AM, old_loc)
if(!istype(AM))
log_debug("DEBUG: HasProximity called with [AM] on [src] ([usr]).")
return
@@ -90,6 +89,10 @@
/obj/item/device/assembly/prox_sensor/Moved(atom/old_loc, direction, forced = FALSE)
. = ..()
+ if(isturf(old_loc))
+ unsense_proximity(range = range, callback = .HasProximity, center = old_loc)
+ if(isturf(loc))
+ sense_proximity(range = range, callback = .HasProximity)
sense()
/obj/item/device/assembly/prox_sensor/interact(mob/user as mob)//TODO: Change this to the wires thingy
diff --git a/code/modules/blob/blob.dm b/code/modules/blob/blob.dm
index c9ab387753..e450e85ed4 100644
--- a/code/modules/blob/blob.dm
+++ b/code/modules/blob/blob.dm
@@ -43,7 +43,7 @@
/obj/effect/blob/proc/take_damage(var/damage)
health -= damage
if(health < 0)
- playsound(loc, 'sound/effects/splat.ogg', 50, 1)
+ playsound(src, 'sound/effects/splat.ogg', 50, 1)
qdel(src)
else
update_icon()
@@ -103,7 +103,7 @@
if(L.stat == DEAD)
continue
L.visible_message("The blob attacks \the [L]!", "The blob attacks you!")
- playsound(loc, 'sound/effects/attackblob.ogg', 50, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
L.take_organ_damage(rand(30, 40))
return
new expandType(T, min(health, 30))
@@ -135,7 +135,7 @@
/obj/effect/blob/attackby(var/obj/item/weapon/W, var/mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
- playsound(loc, 'sound/effects/attackblob.ogg', 50, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
visible_message("\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = 0
switch(W.damtype)
diff --git a/code/modules/blob2/blobs/base_blob.dm b/code/modules/blob2/blobs/base_blob.dm
index 1bcf7c35bd..71d4ad7254 100644
--- a/code/modules/blob2/blobs/base_blob.dm
+++ b/code/modules/blob2/blobs/base_blob.dm
@@ -32,7 +32,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
/obj/structure/blob/Destroy()
- playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) //Expand() is no longer broken, no check necessary.
+ playsound(src, 'sound/effects/splat.ogg', 50, 1) //Expand() is no longer broken, no check necessary.
GLOB.all_blobs -= src
overmind = null
return ..()
@@ -149,7 +149,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
if(istype(T, /turf/space) && !(locate(/obj/structure/lattice) in T) && prob(80))
make_blob = FALSE
- playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) //Let's give some feedback that we DID try to spawn in space, since players are used to it
+ playsound(src, 'sound/effects/splat.ogg', 50, 1) //Let's give some feedback that we DID try to spawn in space, since players are used to it
consume_tile() //hit the tile we're in, making sure there are no border objects blocking us
@@ -223,7 +223,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
/obj/structure/blob/attack_generic(var/mob/user, var/damage, var/attack_verb)
visible_message("[user] [attack_verb] the [src]!")
- playsound(loc, 'sound/effects/attackblob.ogg', 100, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 100, 1)
user.do_attack_animation(src)
if(overmind)
damage *= overmind.blob_type.brute_multiplier
@@ -307,7 +307,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
/obj/structure/blob/attackby(var/obj/item/weapon/W, var/mob/user)
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
- playsound(loc, 'sound/effects/attackblob.ogg', 50, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
visible_message("\The [src] has been attacked with \the [W][(user ? " by [user]." : ".")]")
var/damage = W.force
switch(W.damtype)
@@ -318,7 +318,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
damage *= 2
if(damage > 0)
- playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
+ playsound(src, 'sound/items/welder.ogg', 100, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(BRUTE, SEARING, TOX, CLONE)
@@ -328,7 +328,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
damage *= 2
if(damage > 0)
- playsound(src.loc, 'sound/effects/attackblob.ogg', 50, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
else
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
if(overmind)
@@ -369,7 +369,7 @@ GLOBAL_LIST_EMPTY(all_blobs)
/obj/structure/blob/proc/adjust_integrity(amount)
integrity = between(0, integrity + amount, max_integrity)
if(integrity == 0)
- playsound(loc, 'sound/effects/splat.ogg', 50, 1)
+ playsound(src, 'sound/effects/splat.ogg', 50, 1)
if(overmind)
overmind.blob_type.on_death(src)
qdel(src)
diff --git a/code/modules/catalogue/cataloguer.dm b/code/modules/catalogue/cataloguer.dm
index e4e148c230..8f7f3152f3 100644
--- a/code/modules/catalogue/cataloguer.dm
+++ b/code/modules/catalogue/cataloguer.dm
@@ -111,25 +111,25 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
box_segments = draw_box(target, scan_range, user.client)
color_box(box_segments, "#00FF00", scan_delay)
- playsound(src.loc, 'sound/machines/beep.ogg', 50)
+ playsound(src, 'sound/machines/beep.ogg', 50)
// The delay, and test for if the scan succeeds or not.
var/scan_start_time = world.time
if(do_after(user, scan_delay, target, ignore_movement = TRUE, max_distance = scan_range))
if(target.can_catalogue(user))
to_chat(user, span("notice", "You successfully scan \the [target] with \the [src]."))
- playsound(src.loc, 'sound/machines/ping.ogg', 50)
+ playsound(src, 'sound/machines/ping.ogg', 50)
catalogue_object(target, user)
else
// In case someone else scans it first, or it died, etc.
to_chat(user, span("warning", "\The [target] is no longer valid to scan with \the [src]."))
- playsound(src.loc, 'sound/machines/buzz-two.ogg', 50)
+ playsound(src, 'sound/machines/buzz-two.ogg', 50)
partial_scanned = null
partial_scan_time = 0
else
to_chat(user, span("warning", "You failed to finish scanning \the [target] with \the [src]."))
- playsound(src.loc, 'sound/machines/buzz-two.ogg', 50)
+ playsound(src, 'sound/machines/buzz-two.ogg', 50)
color_box(box_segments, "#FF0000", 3)
partial_scanned = weakref(target)
partial_scan_time += world.time - scan_start_time // This is added to the existing value so two partial scans will add up correctly.
@@ -204,7 +204,7 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
busy = TRUE
update_icon()
- playsound(src.loc, 'sound/machines/beep.ogg', 50)
+ playsound(src, 'sound/machines/beep.ogg', 50)
// First, get everything able to be scanned.
var/list/scannable_atoms = list()
@@ -232,9 +232,9 @@ GLOBAL_LIST_EMPTY(all_cataloguers)
busy = FALSE
update_icon()
if(scannable_atoms.len)
- playsound(src.loc, 'sound/machines/ping.ogg', 50)
+ playsound(src, 'sound/machines/ping.ogg', 50)
else
- playsound(src.loc, 'sound/machines/buzz-two.ogg', 50)
+ playsound(src, 'sound/machines/buzz-two.ogg', 50)
to_chat(user, span("notice", "\The [src] found [scannable_atoms.len] object\s that can be scanned."))
diff --git a/code/modules/client/preference_setup/general/03_body.dm b/code/modules/client/preference_setup/general/03_body.dm
index 92beaa5d9a..d5edede6ce 100644
--- a/code/modules/client/preference_setup/general/03_body.dm
+++ b/code/modules/client/preference_setup/general/03_body.dm
@@ -321,33 +321,33 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
. += "Hair
"
if(has_flag(mob_species, HAS_HAIR_COLOR))
- . += "Change Color "
- . += " Style: [pref.h_style]
"
+ . += "Change Color [color_square(pref.r_hair, pref.g_hair, pref.b_hair)] "
+ . += " Style: < > [pref.h_style]
" //The < & > in this line is correct-- those extra characters are the arrows you click to switch between styles.
. += "
Facial
"
if(has_flag(mob_species, HAS_HAIR_COLOR))
- . += "Change Color "
- . += " Style: [pref.f_style]
"
+ . += "Change Color [color_square(pref.r_facial, pref.g_facial, pref.b_facial)] "
+ . += " Style: < > [pref.f_style]
" //Same as above with the extra > & < characters
if(has_flag(mob_species, HAS_EYE_COLOR))
. += "
Eyes
"
- . += "Change Color
"
+ . += "Change Color [color_square(pref.r_eyes, pref.g_eyes, pref.b_eyes)]
"
if(has_flag(mob_species, HAS_SKIN_COLOR))
. += "
Body Color
"
- . += "Change Color
"
+ . += "Change Color [color_square(pref.r_skin, pref.g_skin, pref.b_skin)]
"
. += "
Body Markings +
"
+ . += "
"
for(var/M in pref.body_markings)
- . += "[M] [pref.body_markings.len > 1 ? "˄ ˅ " : ""]- Color"
- . += ""
- . += "
"
+ . += "| [M] | [pref.body_markings.len > 1 ? "˄ ˅ mv " : ""]- Color[color_square(hex = pref.body_markings[M])] |
"
+ . += "
"
. += "
"
. += "Allow Synth markings: [pref.synth_markings ? "Yes" : "No"]
"
. += "Allow Synth color: [pref.synth_color ? "Yes" : "No"]
"
if(pref.synth_color)
- . += "Change Color "
+ . += "Change Color [color_square(pref.r_synth, pref.g_synth, pref.b_synth)]"
. = jointext(.,null)
@@ -408,16 +408,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.set_biological_gender(mob_species.genders[1])
//grab one of the valid hair styles for the newly chosen species
- var/list/valid_hairstyles = list()
- for(var/hairstyle in hair_styles_list)
- var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
- if(pref.biological_gender == MALE && S.gender == FEMALE)
- continue
- if(pref.biological_gender == FEMALE && S.gender == MALE)
- continue
- if(!(pref.species in S.species_allowed))
- continue
- valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
+ var/list/valid_hairstyles = pref.get_valid_hairstyles()
if(valid_hairstyles.len)
pref.h_style = pick(valid_hairstyles)
@@ -426,17 +417,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.h_style = hair_styles_list["Bald"]
//grab one of the valid facial hair styles for the newly chosen species
- var/list/valid_facialhairstyles = list()
- for(var/facialhairstyle in facial_hair_styles_list)
- var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
- if(pref.biological_gender == MALE && S.gender == FEMALE)
- continue
- if(pref.biological_gender == FEMALE && S.gender == MALE)
- continue
- if(!(pref.species in S.species_allowed))
- continue
-
- valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
+ var/list/valid_facialhairstyles = pref.get_valid_facialhairstyles()
if(valid_facialhairstyles.len)
pref.f_style = pick(valid_facialhairstyles)
@@ -470,19 +451,35 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["hair_style"])
- var/list/valid_hairstyles = list()
- for(var/hairstyle in hair_styles_list)
- var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
- if(!(pref.species in S.species_allowed))
- continue
-
- valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
+ var/list/valid_hairstyles = pref.get_valid_hairstyles()
var/new_h_style = input(user, "Choose your character's hair style:", "Character Preference", pref.h_style) as null|anything in valid_hairstyles
if(new_h_style && CanUseTopic(user))
pref.h_style = new_h_style
return TOPIC_REFRESH_UPDATE_PREVIEW
+ else if(href_list["hair_style_left"])
+ var/H = href_list["hair_style_left"]
+ var/list/valid_hairstyles = pref.get_valid_hairstyles()
+ var/start = valid_hairstyles.Find(H)
+
+ if(start != 1) //If we're not the beginning of the list, become the previous element.
+ pref.h_style = valid_hairstyles[start-1]
+ else //But if we ARE, become the final element.
+ pref.h_style = valid_hairstyles[valid_hairstyles.len]
+ return TOPIC_REFRESH_UPDATE_PREVIEW
+
+ else if(href_list["hair_style_right"])
+ var/H = href_list["hair_style_right"]
+ var/list/valid_hairstyles = pref.get_valid_hairstyles()
+ var/start = valid_hairstyles.Find(H)
+
+ if(start != valid_hairstyles.len) //If we're not the end of the list, become the next element.
+ pref.h_style = valid_hairstyles[start+1]
+ else //But if we ARE, become the first element.
+ pref.h_style = valid_hairstyles[1]
+ return TOPIC_REFRESH_UPDATE_PREVIEW
+
else if(href_list["facial_color"])
if(!has_flag(mob_species, HAS_HAIR_COLOR))
return TOPIC_NOACTION
@@ -522,23 +519,35 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["facial_style"])
- var/list/valid_facialhairstyles = list()
- for(var/facialhairstyle in facial_hair_styles_list)
- var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
- if(pref.biological_gender == MALE && S.gender == FEMALE)
- continue
- if(pref.biological_gender == FEMALE && S.gender == MALE)
- continue
- if(!(pref.species in S.species_allowed))
- continue
-
- valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
+ var/list/valid_facialhairstyles = pref.get_valid_facialhairstyles()
var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference", pref.f_style) as null|anything in valid_facialhairstyles
if(new_f_style && has_flag(mob_species, HAS_HAIR_COLOR) && CanUseTopic(user))
pref.f_style = new_f_style
return TOPIC_REFRESH_UPDATE_PREVIEW
+ else if(href_list["facial_style_left"])
+ var/F = href_list["facial_style_left"]
+ var/list/valid_facialhairstyles = pref.get_valid_facialhairstyles()
+ var/start = valid_facialhairstyles.Find(F)
+
+ if(start != 1) //If we're not the beginning of the list, become the previous element.
+ pref.f_style = valid_facialhairstyles[start-1]
+ else //But if we ARE, become the final element.
+ pref.f_style = valid_facialhairstyles[valid_facialhairstyles.len]
+ return TOPIC_REFRESH_UPDATE_PREVIEW
+
+ else if(href_list["facial_style_right"])
+ var/F = href_list["facial_style_right"]
+ var/list/valid_facialhairstyles = pref.get_valid_facialhairstyles()
+ var/start = valid_facialhairstyles.Find(F)
+
+ if(start != valid_facialhairstyles.len) //If we're not the end of the list, become the next element.
+ pref.f_style = valid_facialhairstyles[start+1]
+ else //But if we ARE, become the first element.
+ pref.f_style = valid_facialhairstyles[1]
+ return TOPIC_REFRESH_UPDATE_PREVIEW
+
else if(href_list["marking_style"])
var/list/usable_markings = pref.body_markings.Copy() ^ body_marking_styles_list.Copy()
for(var/M in usable_markings)
@@ -571,6 +580,19 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
moveElement(pref.body_markings, start, 1)
return TOPIC_REFRESH_UPDATE_PREVIEW
+ else if(href_list["marking_move"])
+ var/M = href_list["marking_move"]
+ var/start = pref.body_markings.Find(M)
+ var/list/move_locs = pref.body_markings - M
+ if(start != 1)
+ move_locs -= pref.body_markings[start-1]
+
+ var/inject_after = input(user, "Move [M] ahead of...", "Character Preference") as null|anything in move_locs //Move ahead of any marking that isn't the current or previous one.
+ var/newpos = pref.body_markings.Find(inject_after)
+ if(newpos)
+ moveElement(pref.body_markings, start, newpos+1)
+ return TOPIC_REFRESH_UPDATE_PREVIEW
+
else if(href_list["marking_remove"])
var/M = href_list["marking_remove"]
pref.body_markings -= M
diff --git a/code/modules/client/preference_setup/global/01_ui.dm b/code/modules/client/preference_setup/global/01_ui.dm
index ed66138da5..a40155d2d5 100644
--- a/code/modules/client/preference_setup/global/01_ui.dm
+++ b/code/modules/client/preference_setup/global/01_ui.dm
@@ -29,7 +29,7 @@
/datum/category_item/player_setup_item/player_global/ui/content(var/mob/user)
. = "UI Style: [pref.UI_style]
"
. += "Custom UI (recommended for White UI):
"
- . += "-Color: [pref.UI_style_color] reset
"
+ . += "-Color: [pref.UI_style_color] [color_square(hex = pref.UI_style_color)] reset
"
. += "-Alpha(transparency): [pref.UI_style_alpha] reset
"
. += "Tooltip Style: [pref.tooltipstyle]
"
. += "Client FPS: [pref.client_fps]
"
@@ -38,7 +38,7 @@
if(pref.ooccolor == initial(pref.ooccolor))
. += "Using Default
"
else
- . += "[pref.ooccolor] reset
"
+ . += "[pref.ooccolor] [color_square(hex = pref.ooccolor)] reset
"
/datum/category_item/player_setup_item/player_global/ui/OnTopic(var/href,var/list/href_list, var/mob/user)
if(href_list["select_style"])
diff --git a/code/modules/client/preference_setup/preference_setup.dm b/code/modules/client/preference_setup/preference_setup.dm
index f53bf82cb8..4d6b15d685 100644
--- a/code/modules/client/preference_setup/preference_setup.dm
+++ b/code/modules/client/preference_setup/preference_setup.dm
@@ -304,4 +304,8 @@
return 220
if(PREF_FBP_SOFTWARE)
return 150
- return S.max_age // welp
\ No newline at end of file
+ return S.max_age // welp
+
+/datum/category_item/player_setup_item/proc/color_square(red, green, blue, hex)
+ var/color = hex ? hex : "#[num2hex(red, 2)][num2hex(green, 2)][num2hex(blue, 2)]"
+ return "___"
\ No newline at end of file
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 0fe1a4d8ee..b33a4d7178 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -311,7 +311,7 @@
update_icon()
return
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
user.visible_message("[user] cuts the fingertips off of the [src].","You cut the fingertips off of the [src].")
clipped = 1
@@ -588,7 +588,7 @@
if(usr.put_in_hands(holding))
usr.visible_message("\The [usr] pulls a knife out of their boot!")
- playsound(get_turf(src), 'sound/weapons/holster/sheathout.ogg', 25)
+ playsound(src, 'sound/weapons/holster/sheathout.ogg', 25)
holding = null
overlays -= image(icon, "[icon_state]_knife")
else
diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm
index 816c5052fc..7590817a37 100644
--- a/code/modules/clothing/shoes/magboots.dm
+++ b/code/modules/clothing/shoes/magboots.dm
@@ -37,7 +37,7 @@
set_slowdown()
force = 5
if(icon_base) icon_state = "[icon_base]1"
- playsound(get_turf(src), 'sound/effects/magnetclamp.ogg', 20)
+ playsound(src, 'sound/effects/magnetclamp.ogg', 20)
to_chat(user, "You enable the mag-pulse traction system.")
user.update_inv_shoes() //so our mob-overlays update
user.update_action_buttons()
diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm
index f2e9e689b4..cf055ae9c0 100644
--- a/code/modules/clothing/spacesuits/rig/modules/computer.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm
@@ -405,7 +405,7 @@
drain_loc = interfaced_with.loc
holder.spark_system.start()
- playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
+ playsound(H, 'sound/effects/sparks2.ogg', 50, 1)
return 1
@@ -429,7 +429,7 @@
return 0
holder.spark_system.start()
- playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
+ playsound(H, 'sound/effects/sparks2.ogg', 50, 1)
H.break_cloak()
diff --git a/code/modules/clothing/spacesuits/rig/modules/ninja.dm b/code/modules/clothing/spacesuits/rig/modules/ninja.dm
index 6381e6b1b0..f81a48c2ac 100644
--- a/code/modules/clothing/spacesuits/rig/modules/ninja.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/ninja.dm
@@ -59,7 +59,7 @@
for(var/mob/O in oviewers(H))
O.show_message("[H.name] appears from thin air!",1)
- playsound(get_turf(H), 'sound/effects/stealthoff.ogg', 75, 1)
+ playsound(src, 'sound/effects/stealthoff.ogg', 75, 1)
/obj/item/rig_module/teleporter
@@ -83,8 +83,8 @@
return
holder.spark_system.start()
- playsound(T, 'sound/effects/phasein.ogg', 25, 1)
- playsound(T, 'sound/effects/sparks2.ogg', 50, 1)
+ playsound(src, 'sound/effects/phasein.ogg', 25, 1)
+ playsound(src, 'sound/effects/sparks2.ogg', 50, 1)
anim(T,M,'icons/mob/mob.dmi',,"phasein",,M.dir)
/obj/item/rig_module/teleporter/proc/phase_out(var/mob/M,var/turf/T)
diff --git a/code/modules/clothing/spacesuits/rig/modules/specific/cloak.dm b/code/modules/clothing/spacesuits/rig/modules/specific/cloak.dm
index a1dfb05812..c63f1c2fbd 100644
--- a/code/modules/clothing/spacesuits/rig/modules/specific/cloak.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/specific/cloak.dm
@@ -50,4 +50,4 @@
H.alpha = initial(H.alpha)
H.visible_message("[H.name] appears from thin air!")
- playsound(get_turf(H), 'sound/effects/stealthoff.ogg', 75, 1)
\ No newline at end of file
+ playsound(H, 'sound/effects/stealthoff.ogg', 75, 1)
\ No newline at end of file
diff --git a/code/modules/clothing/spacesuits/rig/modules/specific/powersink.dm b/code/modules/clothing/spacesuits/rig/modules/specific/powersink.dm
index ec8fba92d6..bfea5ccf1c 100644
--- a/code/modules/clothing/spacesuits/rig/modules/specific/powersink.dm
+++ b/code/modules/clothing/spacesuits/rig/modules/specific/powersink.dm
@@ -57,7 +57,7 @@
drain_loc = interfaced_with.loc
holder.spark_system.start()
- playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
+ playsound(H, 'sound/effects/sparks2.ogg', 50, 1)
return 1
@@ -81,7 +81,7 @@
return 0
holder.spark_system.start()
- playsound(H.loc, 'sound/effects/sparks2.ogg', 50, 1)
+ playsound(H, 'sound/effects/sparks2.ogg', 50, 1)
H.break_cloak()
diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm
index 04df18d1e8..82caf79deb 100644
--- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm
+++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm
@@ -69,7 +69,7 @@
tacknife.loc = get_turf(src)
if(M.put_in_active_hand(tacknife))
to_chat(M, "You slide \the [tacknife] out of [src].")
- playsound(M, 'sound/weapons/flipblade.ogg', 40, 1)
+ playsound(src, 'sound/weapons/flipblade.ogg', 40, 1)
tacknife = null
update_icon()
return
@@ -83,7 +83,7 @@
tacknife = I
I.loc = src
to_chat(M, "You slide the [I] into [src].")
- playsound(M, 'sound/weapons/flipblade.ogg', 40, 1)
+ playsound(src, 'sound/weapons/flipblade.ogg', 40, 1)
update_icon()
..()
diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm
index c41ff83d81..7fb4df785e 100644
--- a/code/modules/clothing/suits/armor.dm
+++ b/code/modules/clothing/suits/armor.dm
@@ -189,7 +189,7 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
- playsound(user.loc, "sparks", 50, 1)
+ playsound(src, "sparks", 50, 1)
user.loc = picked
return PROJECTILE_FORCE_MISS
diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm
index 1c4ab7e709..83e2fe2c69 100644
--- a/code/modules/clothing/under/accessories/holster.dm
+++ b/code/modules/clothing/under/accessories/holster.dm
@@ -18,7 +18,7 @@
return
if(holster_in)
- playsound(get_turf(src), holster_in, 50)
+ playsound(src, holster_in, 50)
if(istype(user))
user.stop_aiming(no_message=1)
@@ -55,7 +55,7 @@
)
if(holster_out)
- playsound(get_turf(src), holster_out, sound_vol)
+ playsound(src, holster_out, sound_vol)
user.put_in_hands(holstered)
holstered.add_fingerprint(user)
diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm
index 2b0fae4923..616a0b2a3b 100644
--- a/code/modules/economy/ATM.dm
+++ b/code/modules/economy/ATM.dm
@@ -58,9 +58,9 @@ log transactions
for(var/obj/item/weapon/spacecash/S in src)
S.loc = src.loc
if(prob(50))
- playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
+ playsound(src, 'sound/items/polaroid1.ogg', 50, 1)
else
- playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
+ playsound(src, 'sound/items/polaroid2.ogg', 50, 1)
break
/obj/machinery/atm/emag_act(var/remaining_charges, var/mob/user)
@@ -103,9 +103,9 @@ log transactions
//consume the money
authenticated_account.money += I:worth
if(prob(50))
- playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
+ playsound(src, 'sound/items/polaroid1.ogg', 50, 1)
else
- playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
+ playsound(src, 'sound/items/polaroid2.ogg', 50, 1)
//create a transaction log entry
var/datum/transaction/T = new()
@@ -383,9 +383,9 @@ log transactions
R.stamps += "
This paper has been stamped by the Automatic Teller Machine."
if(prob(50))
- playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
+ playsound(src, 'sound/items/polaroid1.ogg', 50, 1)
else
- playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
+ playsound(src, 'sound/items/polaroid2.ogg', 50, 1)
if ("print_transaction")
if(authenticated_account)
var/obj/item/weapon/paper/R = new(src.loc)
@@ -425,9 +425,9 @@ log transactions
R.stamps += "
This paper has been stamped by the Automatic Teller Machine."
if(prob(50))
- playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
+ playsound(src, 'sound/items/polaroid1.ogg', 50, 1)
else
- playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
+ playsound(src, 'sound/items/polaroid2.ogg', 50, 1)
if("insert_card")
if(!held_card)
diff --git a/code/modules/events/money_spam.dm b/code/modules/events/money_spam.dm
index c6ac3e3c41..f59b9b24a5 100644
--- a/code/modules/events/money_spam.dm
+++ b/code/modules/events/money_spam.dm
@@ -65,7 +65,7 @@
message = pick("Luxury watches for Blowout sale prices!",\
"Watches, Jewelry & Accessories, Bags & Wallets !",\
"Deposit 100$ and get 300$ totally free!",\
- " 100K NT.|WOWGOLD õnly $89 ",\
+ " 100K NT.|WOWGOLD �nly $89 ",\
"We have been filed with a complaint from one of your customers in respect of their business relations with you.",\
"We kindly ask you to open the COMPLAINT REPORT (attached) to reply on this complaint..")
if(4)
@@ -111,7 +111,7 @@
//P.tnote += "← From [sender] (Unknown / spam?):
[message]
"
if (!P.message_silent)
- playsound(P.loc, 'sound/machines/twobeep.ogg', 50, 1)
+ playsound(P, 'sound/machines/twobeep.ogg', 50, 1)
for (var/mob/O in hearers(3, P.loc))
if(!P.message_silent) O.show_message(text("[bicon(P)] *[P.ttone]*"))
//Search for holder of the PDA.
diff --git a/code/modules/food/food/condiment.dm b/code/modules/food/food/condiment.dm
index 1dd137ff32..657946d019 100644
--- a/code/modules/food/food/condiment.dm
+++ b/code/modules/food/food/condiment.dm
@@ -48,7 +48,7 @@
..()
/obj/item/weapon/reagent_containers/food/condiment/feed_sound(var/mob/user)
- playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
+ playsound(src, 'sound/items/drink.ogg', rand(10, 50), 1)
/obj/item/weapon/reagent_containers/food/condiment/self_feed_message(var/mob/user)
to_chat(user, "You swallow some of contents of \the [src].")
diff --git a/code/modules/food/food/drinks.dm b/code/modules/food/food/drinks.dm
index 546c47a7e2..816c910339 100644
--- a/code/modules/food/food/drinks.dm
+++ b/code/modules/food/food/drinks.dm
@@ -25,7 +25,7 @@
open(user)
/obj/item/weapon/reagent_containers/food/drinks/proc/open(mob/user)
- playsound(loc,"canopen", rand(10,50), 1)
+ playsound(src,"canopen", rand(10,50), 1)
to_chat(user, "You open [src] with an audible pop!")
flags |= OPENCONTAINER
@@ -69,7 +69,7 @@
to_chat(user, "You swallow a gulp from \the [src].")
/obj/item/weapon/reagent_containers/food/drinks/feed_sound(var/mob/user)
- playsound(user.loc, 'sound/items/drink.ogg', rand(10, 50), 1)
+ playsound(src, 'sound/items/drink.ogg', rand(10, 50), 1)
/obj/item/weapon/reagent_containers/food/drinks/examine(mob/user)
. = ..()
diff --git a/code/modules/food/food/drinks/bottle.dm b/code/modules/food/food/drinks/bottle.dm
index 731efb1ff7..ebd1233fe8 100644
--- a/code/modules/food/food/drinks/bottle.dm
+++ b/code/modules/food/food/drinks/bottle.dm
@@ -187,7 +187,7 @@
var/icon/broken_outline = icon('icons/obj/drinks.dmi', "broken")
/obj/item/weapon/broken_bottle/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
- playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/bladeslice.ogg', 50, 1, -1)
return ..()
/obj/item/weapon/reagent_containers/food/drinks/bottle/gin
diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm
index 1731710492..57d6801ffc 100644
--- a/code/modules/food/food/snacks.dm
+++ b/code/modules/food/food/snacks.dm
@@ -120,7 +120,7 @@
return
if(reagents) //Handle ingestion of the reagent.
- playsound(M.loc,'sound/items/eatfood.ogg', rand(10,50), 1)
+ playsound(M,'sound/items/eatfood.ogg', rand(10,50), 1)
if(reagents.total_volume)
if(reagents.total_volume > bitesize)
reagents.trans_to_mob(M, bitesize, CHEM_INGEST)
diff --git a/code/modules/food/kitchen/cooking_machines/_cooker.dm b/code/modules/food/kitchen/cooking_machines/_cooker.dm
index 70d7a9ad9c..f0716e015f 100644
--- a/code/modules/food/kitchen/cooking_machines/_cooker.dm
+++ b/code/modules/food/kitchen/cooking_machines/_cooker.dm
@@ -166,7 +166,7 @@
qdel(cooking_obj)
src.visible_message("\The [src] pings!")
if(cooked_sound)
- playsound(get_turf(src), cooked_sound, 50, 1)
+ playsound(src, cooked_sound, 50, 1)
if(!can_burn_food)
icon_state = off_icon
diff --git a/code/modules/food/kitchen/gibber.dm b/code/modules/food/kitchen/gibber.dm
index ab70028bd6..1fca845091 100644
--- a/code/modules/food/kitchen/gibber.dm
+++ b/code/modules/food/kitchen/gibber.dm
@@ -227,7 +227,7 @@
occupant.gib()
occupant = null
- playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
+ playsound(src, 'sound/effects/splat.ogg', 50, 1)
operating = 0
for (var/obj/thing in contents)
// There's a chance that the gibber will fail to destroy some evidence.
diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm
index a8da49a436..e8a9e0586a 100644
--- a/code/modules/food/kitchen/microwave.dm
+++ b/code/modules/food/kitchen/microwave.dm
@@ -353,7 +353,7 @@
src.updateUsrDialog()
/obj/machinery/microwave/proc/muck_start()
- playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound
+ playsound(src, 'sound/effects/splat.ogg', 50, 1) // Play a splat sound
src.icon_state = "mwbloody1" // Make it look dirty!!
/obj/machinery/microwave/proc/muck_finish()
diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm
index d4eb606aa2..3be22f940a 100644
--- a/code/modules/games/cards.dm
+++ b/code/modules/games/cards.dm
@@ -230,7 +230,7 @@
cards -= P
cards = newcards
user.visible_message("\The [user] shuffles [src].")
- playsound(user, 'sound/items/cardshuffle.ogg', 50, 1)
+ playsound(src, 'sound/items/cardshuffle.ogg', 50, 1)
cooldown = world.time
else
return
diff --git a/code/modules/games/tarot.dm b/code/modules/games/tarot.dm
index cae71540cb..7c49f7ec43 100644
--- a/code/modules/games/tarot.dm
+++ b/code/modules/games/tarot.dm
@@ -36,7 +36,7 @@
newcards += P
cards -= P
cards = newcards
- playsound(user, 'sound/items/cardshuffle.ogg', 50, 1)
+ playsound(src, 'sound/items/cardshuffle.ogg', 50, 1)
user.visible_message("\The [user] shuffles [src].")
cooldown = world.time
else
diff --git a/code/modules/holodeck/HolodeckControl.dm b/code/modules/holodeck/HolodeckControl.dm
index 2d02146315..1cd3ddf51d 100644
--- a/code/modules/holodeck/HolodeckControl.dm
+++ b/code/modules/holodeck/HolodeckControl.dm
@@ -155,7 +155,7 @@
SSnanoui.update_uis(src)
/obj/machinery/computer/HolodeckControl/emag_act(var/remaining_charges, var/mob/user as mob)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
last_to_emag = user //emag again to change the owner
if (!emagged)
emagged = 1
diff --git a/code/modules/holodeck/HolodeckObjects.dm b/code/modules/holodeck/HolodeckObjects.dm
index b3783460ad..e5b7b1c3d7 100644
--- a/code/modules/holodeck/HolodeckObjects.dm
+++ b/code/modules/holodeck/HolodeckObjects.dm
@@ -137,7 +137,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
user.do_attack_animation(src)
var/damage = rand(0, 9)
if(!damage)
- playsound(target.loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+ playsound(target, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
target.visible_message("[user] has attempted to punch [target]!")
return TRUE
var/obj/item/organ/external/affecting = target.get_organ(ran_zone(user.zone_sel.selecting))
@@ -147,7 +147,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
if(HULK in user.mutations)
damage += 5
- playsound(target.loc, "punch", 25, 1, -1)
+ playsound(target, "punch", 25, 1, -1)
target.visible_message("[user] has punched [target]!")
@@ -204,7 +204,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
update_nearby_icons()
step(src, get_dir(user, src))
else
- playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
..()
return
@@ -222,7 +222,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
if(src.density && istype(I, /obj/item/weapon) && !istype(I, /obj/item/weapon/card))
var/aforce = I.force
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
visible_message("[src] was hit by [I].")
if(I.damtype == BRUTE || I.damtype == BURN)
take_damage(aforce)
@@ -289,7 +289,7 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, user.loc)
spark_system.start()
- playsound(user.loc, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
return TRUE
return FALSE
@@ -299,13 +299,13 @@ datum/unarmed_attack/holopugilism/unarmed_override(var/mob/living/carbon/human/u
force = 30
item_state = "[icon_state]_blade"
w_class = ITEMSIZE_LARGE
- playsound(user, 'sound/weapons/saberon.ogg', 50, 1)
+ playsound(src, 'sound/weapons/saberon.ogg', 50, 1)
to_chat(user, "[src] is now active.")
else
force = 3
item_state = "[icon_state]"
w_class = ITEMSIZE_SMALL
- playsound(user, 'sound/weapons/saberoff.ogg', 50, 1)
+ playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
to_chat(user, "[src] can now be concealed.")
update_icon()
diff --git a/code/modules/hydroponics/beekeeping/beehive.dm b/code/modules/hydroponics/beekeeping/beehive.dm
index 253ca6f928..cf90921475 100644
--- a/code/modules/hydroponics/beekeeping/beehive.dm
+++ b/code/modules/hydroponics/beekeeping/beehive.dm
@@ -43,7 +43,7 @@
return
else if(I.is_wrench())
anchored = !anchored
- playsound(loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
user.visible_message("[user] [anchored ? "wrenches" : "unwrenches"] \the [src].", "You [anchored ? "wrench" : "unwrench"] \the [src].")
return
else if(istype(I, /obj/item/bee_smoker))
diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm
index 0cb0dbb0d3..9e84c741cb 100644
--- a/code/modules/hydroponics/grown.dm
+++ b/code/modules/hydroponics/grown.dm
@@ -163,7 +163,7 @@
M.stop_pulling()
to_chat(M, "You slipped on the [name]!")
- playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
+ playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
M.Stun(8)
M.Weaken(5)
seed.thrown_at(src,M)
@@ -199,7 +199,7 @@
else if(seed.chems)
if(W.sharp && W.edge && !isnull(seed.chems["woodpulp"]))
user.show_message("You make planks out of \the [src]!", 1)
- playsound(loc, 'sound/effects/woodcutting.ogg', 50, 1)
+ playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
var/flesh_colour = seed.get_trait(TRAIT_FLESH_COLOUR)
if(!flesh_colour) flesh_colour = seed.get_trait(TRAIT_PRODUCT_COLOUR)
for(var/i=0,i<2,i++)
diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm
index 053ce5a59c..b8ea1fa748 100644
--- a/code/modules/hydroponics/seed_storage.dm
+++ b/code/modules/hydroponics/seed_storage.dm
@@ -502,7 +502,7 @@
to_chat(user, "There are no seeds in \the [O.name].")
return
else if(O.is_wrench())
- playsound(loc, O.usesound, 50, 1)
+ playsound(src, O.usesound, 50, 1)
anchored = !anchored
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
else if(O.is_screwdriver())
diff --git a/code/modules/hydroponics/spreading/spreading.dm b/code/modules/hydroponics/spreading/spreading.dm
index e3ac11ed76..2f93bb108b 100644
--- a/code/modules/hydroponics/spreading/spreading.dm
+++ b/code/modules/hydroponics/spreading/spreading.dm
@@ -72,8 +72,9 @@
var/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/plant
/obj/effect/plant/Destroy()
- if(plant_controller)
- plant_controller.remove_plant(src)
+ if(seed.get_trait(TRAIT_SPREAD)==2)
+ unsense_proximity(callback = .HasProximity, center = get_turf(src))
+ plant_controller.remove_plant(src)
for(var/obj/effect/plant/neighbor in range(1,src))
plant_controller.add_plant(neighbor)
return ..()
@@ -106,6 +107,7 @@
name = seed.display_name
max_health = round(seed.get_trait(TRAIT_ENDURANCE)/2)
if(seed.get_trait(TRAIT_SPREAD)==2)
+ sense_proximity(callback = .HasProximity) // Grabby
max_growth = VINE_GROWTH_STAGES
growth_threshold = max_health/VINE_GROWTH_STAGES
icon = 'icons/obj/hydroponics_vines.dmi'
diff --git a/code/modules/hydroponics/spreading/spreading_response.dm b/code/modules/hydroponics/spreading/spreading_response.dm
index 8c694c8b00..58f4b4da08 100644
--- a/code/modules/hydroponics/spreading/spreading_response.dm
+++ b/code/modules/hydroponics/spreading/spreading_response.dm
@@ -1,4 +1,4 @@
-/obj/effect/plant/HasProximity(var/atom/movable/AM)
+/obj/effect/plant/HasProximity(turf/T, atom/movable/AM, old_loc)
if(!is_mature() || seed.get_trait(TRAIT_SPREAD) != 2)
return
@@ -13,6 +13,14 @@
spawn(1)
entangle(M)
+/obj/effect/plant/Moved(atom/old_loc, direction, forced = FALSE)
+ . = ..()
+ if(seed.get_trait(TRAIT_SPREAD)==2)
+ if(isturf(old_loc))
+ unsense_proximity(callback = .HasProximity, center = old_loc)
+ if(isturf(loc))
+ sense_proximity(callback = .HasProximity)
+
/obj/effect/plant/attack_hand(var/mob/user)
manual_unbuckle(user)
diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm
index 4c7a659e4a..236fbb1a0d 100644
--- a/code/modules/hydroponics/trays/tray.dm
+++ b/code/modules/hydroponics/trays/tray.dm
@@ -558,7 +558,7 @@
pestlevel -= spray.pest_kill_str
weedlevel -= spray.weed_kill_str
to_chat(user, "You spray [src] with [O].")
- playsound(loc, 'sound/effects/spray3.ogg', 50, 1, -6)
+ playsound(src, 'sound/effects/spray3.ogg', 50, 1, -6)
qdel(O)
check_health()
@@ -568,7 +568,7 @@
if(locate(/obj/machinery/atmospherics/portables_connector/) in loc)
return ..()
- playsound(loc, O.usesound, 50, 1)
+ playsound(src, O.usesound, 50, 1)
anchored = !anchored
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm
index 6218783b6e..aea7ffc4ea 100644
--- a/code/modules/integrated_electronics/core/assemblies.dm
+++ b/code/modules/integrated_electronics/core/assemblies.dm
@@ -248,12 +248,12 @@
return FALSE
if(add_circuit(I, user))
to_chat(user, "You slide \the [I] inside \the [src].")
- playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
interact(user)
return TRUE
else if(I.is_crowbar())
- playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
+ playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
opened = !opened
to_chat(user, "You [opened ? "opened" : "closed"] \the [src].")
update_icon()
@@ -284,7 +284,7 @@
user.drop_item(cell)
cell.forceMove(src)
battery = cell
- playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "You slot \the [cell] inside \the [src]'s power supplier.")
interact(user)
return TRUE
@@ -349,14 +349,6 @@
return TRUE
return FALSE
-/obj/item/device/electronic_assembly/on_loc_moved(oldloc)
- for(var/obj/O in contents)
- O.on_loc_moved(oldloc)
-
-/obj/item/device/electronic_assembly/Moved(var/oldloc)
- for(var/obj/O in contents)
- O.on_loc_moved(oldloc)
-
/obj/item/device/electronic_assembly/proc/on_anchored()
for(var/obj/item/integrated_circuit/IC in contents)
IC.on_anchored()
diff --git a/code/modules/integrated_electronics/core/assemblies/clothing.dm b/code/modules/integrated_electronics/core/assemblies/clothing.dm
index d00057e411..23e84da6d6 100644
--- a/code/modules/integrated_electronics/core/assemblies/clothing.dm
+++ b/code/modules/integrated_electronics/core/assemblies/clothing.dm
@@ -67,18 +67,6 @@
else
..()
-/obj/item/clothing/Moved(oldloc)
- if(IC)
- IC.on_loc_moved(oldloc)
- else
- ..()
-
-/obj/item/clothing/on_loc_moved(oldloc)
- if(IC)
- IC.on_loc_moved(oldloc)
- else
- ..()
-
// Does most of the repeatative setup.
/obj/item/clothing/proc/setup_integrated_circuit(new_type)
// Set up the internal circuit holder.
diff --git a/code/modules/integrated_electronics/core/assemblies/device.dm b/code/modules/integrated_electronics/core/assemblies/device.dm
index de92fe6638..3170393fc3 100644
--- a/code/modules/integrated_electronics/core/assemblies/device.dm
+++ b/code/modules/integrated_electronics/core/assemblies/device.dm
@@ -20,7 +20,7 @@
..()
/obj/item/device/assembly/electronic_assembly/proc/toggle_open(mob/user)
- playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
+ playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
opened = !opened
EA.opened = opened
to_chat(user, "You [opened ? "opened" : "closed"] \the [src].")
diff --git a/code/modules/integrated_electronics/core/assemblies/generic.dm b/code/modules/integrated_electronics/core/assemblies/generic.dm
index 2508f9919d..49a933fe1b 100644
--- a/code/modules/integrated_electronics/core/assemblies/generic.dm
+++ b/code/modules/integrated_electronics/core/assemblies/generic.dm
@@ -211,7 +211,7 @@
if(!istype(T, /turf/simulated/floor))
to_chat(user, "You cannot place \the [src] on this spot!")
return
- playsound(src.loc, 'sound/machines/click.ogg', 75, 1)
+ playsound(src, 'sound/machines/click.ogg', 75, 1)
user.visible_message("\The [user] attaches \the [src] to the wall.",
"You attach \the [src] to the wall.",
"You hear clicking.")
diff --git a/code/modules/integrated_electronics/subtypes/manipulation.dm b/code/modules/integrated_electronics/subtypes/manipulation.dm
index 7bb9b332d1..d64f9a8645 100644
--- a/code/modules/integrated_electronics/subtypes/manipulation.dm
+++ b/code/modules/integrated_electronics/subtypes/manipulation.dm
@@ -39,7 +39,7 @@
size += gun.w_class
gun.forceMove(src)
to_chat(user, "You slide \the [gun] into the firing mechanism.")
- playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
+ playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
else
..()
@@ -48,7 +48,7 @@
installed_gun.forceMove(get_turf(src))
to_chat(user, "You slide \the [installed_gun] out of the firing mechanism.")
size = initial(size)
- playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
+ playsound(src, 'sound/items/Crowbar.ogg', 50, 1)
installed_gun = null
else
to_chat(user, "There's no weapon to remove from the mechanism.")
diff --git a/code/modules/integrated_electronics/subtypes/output.dm b/code/modules/integrated_electronics/subtypes/output.dm
index 17c492dc04..42a0d344c9 100644
--- a/code/modules/integrated_electronics/subtypes/output.dm
+++ b/code/modules/integrated_electronics/subtypes/output.dm
@@ -197,7 +197,7 @@
if(!selected_sound)
return
vol = between(0, vol, 100)
- playsound(get_turf(src), selected_sound, vol, freq, -1)
+ playsound(src, selected_sound, vol, freq, -1)
/obj/item/integrated_circuit/output/sound/beeper
name = "beeper circuit"
@@ -413,8 +413,13 @@
// var/datum/beam/holo_beam = null // A visual effect, to make it easy to know where a hologram is coming from.
// It is commented out due to picking up the assembly killing the beam.
+/obj/item/integrated_circuit/output/holographic_projector/Initialize()
+ . = ..()
+ GLOB.moved_event.register(src, src, .proc/on_moved)
+
/obj/item/integrated_circuit/output/holographic_projector/Destroy()
destroy_hologram()
+ GLOB.moved_event.unregister(src, src, .proc/on_moved)
return ..()
/obj/item/integrated_circuit/output/holographic_projector/do_work()
@@ -505,7 +510,7 @@
if(hologram)
update_hologram()
-/obj/item/integrated_circuit/output/holographic_projector/on_loc_moved(atom/oldloc)
+/obj/item/integrated_circuit/output/holographic_projector/proc/on_moved()
if(hologram)
update_hologram_position()
diff --git a/code/modules/integrated_electronics/subtypes/reagents.dm b/code/modules/integrated_electronics/subtypes/reagents.dm
index ca834b3a09..f0e92e9e7a 100644
--- a/code/modules/integrated_electronics/subtypes/reagents.dm
+++ b/code/modules/integrated_electronics/subtypes/reagents.dm
@@ -37,7 +37,7 @@
..()
/obj/item/integrated_circuit/reagent/smoke/do_work()
- playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
+ playsound(src, 'sound/effects/smoke.ogg', 50, 1, -3)
var/datum/effect/effect/system/smoke_spread/chem/smoke_system = new()
smoke_system.set_up(reagents, 10, 0, get_turf(src))
spawn(0)
diff --git a/code/modules/library/lib_items.dm b/code/modules/library/lib_items.dm
index 1eb05b7949..9273ece79e 100644
--- a/code/modules/library/lib_items.dm
+++ b/code/modules/library/lib_items.dm
@@ -39,11 +39,11 @@
else
name = ("bookcase ([newname])")
else if(O.is_wrench())
- playsound(loc, O.usesound, 100, 1)
+ playsound(src, O.usesound, 100, 1)
to_chat(user, (anchored ? "You unfasten \the [src] from the floor." : "You secure \the [src] to the floor."))
anchored = !anchored
else if(O.is_screwdriver())
- playsound(loc, O.usesound, 75, 1)
+ playsound(src, O.usesound, 75, 1)
to_chat(user, "You begin dismantling \the [src].")
if(do_after(user,25 * O.toolspeed))
to_chat(user, "You dismantle \the [src].")
@@ -195,9 +195,9 @@ Book Cart End
if(src.dat)
user << browse("Penned by [author].
" + "[dat]", "window=book")
user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.")
- playsound(loc, 'sound/bureaucracy/bookopen.ogg', 50, 1)
+ playsound(src, 'sound/bureaucracy/bookopen.ogg', 50, 1)
onclose(user, "book")
- playsound(loc, 'sound/bureaucracy/bookclose.ogg', 50, 1)
+ playsound(src, 'sound/bureaucracy/bookclose.ogg', 50, 1)
else
to_chat(user, "This book is completely blank!")
@@ -280,7 +280,7 @@ Book Cart End
to_chat(user, "You begin to carve out [title].")
if(do_after(user, 30))
to_chat(user, "You carve out the pages from [title]! You didn't want to read it anyway.")
- playsound(loc, 'sound/bureaucracy/papercrumple.ogg', 50, 1)
+ playsound(src, 'sound/bureaucracy/papercrumple.ogg', 50, 1)
new /obj/item/weapon/shreddedp(get_turf(src))
carved = 1
return
@@ -353,11 +353,11 @@ Book Cart End
if(href_list["next_page"])
if(page != pages.len)
page++
- playsound(src.loc, "pageturn", 50, 1)
+ playsound(src, "pageturn", 50, 1)
if(href_list["prev_page"])
if(page > 1)
page--
- playsound(src.loc, "pageturn", 50, 1)
+ playsound(src, "pageturn", 50, 1)
src.attack_self(usr)
updateUsrDialog()
else
diff --git a/code/modules/looking_glass/lg_console.dm b/code/modules/looking_glass/lg_console.dm
index f4a5a97b6b..17a4523e9d 100644
--- a/code/modules/looking_glass/lg_console.dm
+++ b/code/modules/looking_glass/lg_console.dm
@@ -110,7 +110,7 @@
/obj/machinery/computer/looking_glass/emag_act(var/remaining_charges, var/mob/user as mob)
if (!emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
to_chat(user, "You unlock several programs that were hidden somewhere in memory.")
log_game("[key_name(usr)] emagged the [name]")
diff --git a/code/modules/materials/material_sheets.dm b/code/modules/materials/material_sheets.dm
index 01cfd9bc62..029191ff6e 100644
--- a/code/modules/materials/material_sheets.dm
+++ b/code/modules/materials/material_sheets.dm
@@ -362,7 +362,7 @@
user.setClickCooldown(time)
if(do_after(user, time, src) && use(1))
to_chat(user, "You cut up a log into planks.")
- playsound(get_turf(src), 'sound/effects/woodcutting.ogg', 50, 1)
+ playsound(src, 'sound/effects/woodcutting.ogg', 50, 1)
var/obj/item/stack/material/wood/existing_wood = null
for(var/obj/item/stack/material/wood/M in user.loc)
if(M.material.name == src.material.name)
diff --git a/code/modules/mining/abandonedcrates.dm b/code/modules/mining/abandonedcrates.dm
index 6f8fc7a8f9..11917f4c40 100644
--- a/code/modules/mining/abandonedcrates.dm
+++ b/code/modules/mining/abandonedcrates.dm
@@ -164,7 +164,7 @@
to_chat(user, "You leave the crate alone.")
else if(check_input(input))
to_chat(user, "The crate unlocks!")
- playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
+ playsound(src, 'sound/machines/lockreset.ogg', 50, 1)
set_locked(0)
else
visible_message("A red light on \the [src]'s control panel flashes briefly.")
diff --git a/code/modules/mining/drilling/scanner.dm b/code/modules/mining/drilling/scanner.dm
index 1bd784bdb9..31da4a9753 100644
--- a/code/modules/mining/drilling/scanner.dm
+++ b/code/modules/mining/drilling/scanner.dm
@@ -10,7 +10,7 @@
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
to_chat(user, "You begin sweeping \the [src] about, scanning for metal deposits.")
- playsound(loc, 'sound/items/goggles_charge.ogg', 50, 1, -6)
+ playsound(src, 'sound/items/goggles_charge.ogg', 50, 1, -6)
if(!do_after(user, scan_time))
return
diff --git a/code/modules/mining/fulton.dm b/code/modules/mining/fulton.dm
index c6f7cc4a9f..d2bb572512 100644
--- a/code/modules/mining/fulton.dm
+++ b/code/modules/mining/fulton.dm
@@ -93,7 +93,7 @@ var/global/list/total_extraction_beacons = list()
balloon.appearance_flags = RESET_COLOR | RESET_ALPHA | RESET_TRANSFORM
holder_obj.cut_overlay(balloon2)
holder_obj.add_overlay(balloon)
- playsound(holder_obj.loc, 'sound/items/fulext_deploy.wav', 50, 1, -3)
+ playsound(holder_obj, 'sound/items/fulext_deploy.wav', 50, 1, -3)
animate(holder_obj, pixel_z = 10, time = 20)
sleep(20)
animate(holder_obj, pixel_z = 15, time = 10)
@@ -104,7 +104,7 @@ var/global/list/total_extraction_beacons = list()
sleep(10)
animate(holder_obj, pixel_z = 10, time = 10)
sleep(10)
- playsound(holder_obj.loc, 'sound/items/fultext_launch.wav', 50, 1, -3)
+ playsound(holder_obj, 'sound/items/fultext_launch.wav', 50, 1, -3)
animate(holder_obj, pixel_z = 1000, time = 30)
if(ishuman(A))
var/mob/living/carbon/human/L = A
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index 7bfde03250..d7b9bad320 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -327,7 +327,7 @@ turf/simulated/mineral/floor/light_corner
return
to_chat(user, "You start digging.")
- playsound(user.loc, 'sound/effects/rustle1.ogg', 50, 1)
+ playsound(user, 'sound/effects/rustle1.ogg', 50, 1)
if(!do_after(user,40)) return
diff --git a/code/modules/mob/living/bot/SLed209bot.dm b/code/modules/mob/living/bot/SLed209bot.dm
index 7b5bbc76e5..fa17b05696 100644
--- a/code/modules/mob/living/bot/SLed209bot.dm
+++ b/code/modules/mob/living/bot/SLed209bot.dm
@@ -40,7 +40,7 @@
if(emagged)
projectile = /obj/item/projectile/beam/shock
- playsound(loc, emagged ? 'sound/weapons/laser3.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
+ playsound(src, emagged ? 'sound/weapons/laser3.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
var/obj/item/projectile/P = new projectile(loc)
P.firer = src
diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm
index b1ea693f2f..6a4c45f123 100644
--- a/code/modules/mob/living/bot/cleanbot.dm
+++ b/code/modules/mob/living/bot/cleanbot.dm
@@ -22,7 +22,7 @@
/mob/living/bot/cleanbot/handleIdle()
if(!screwloose && !oddbutton && prob(2))
custom_emote(2, "makes an excited booping sound!")
- playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
+ playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
if(screwloose && prob(5)) // Make a mess
if(istype(loc, /turf/simulated))
@@ -179,7 +179,7 @@
if(!screwloose || !oddbutton)
if(user)
to_chat(user, "The [src] buzzes and beeps.")
- playsound(src.loc, 'sound/machines/buzzbeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/buzzbeep.ogg', 50, 0)
oddbutton = 1
screwloose = 1
return 1
diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm
index 0d77e837f0..f0e58c455f 100644
--- a/code/modules/mob/living/bot/ed209bot.dm
+++ b/code/modules/mob/living/bot/ed209bot.dm
@@ -65,7 +65,7 @@
if(emagged)
projectile = /obj/item/projectile/beam
- playsound(loc, emagged ? 'sound/weapons/Laser.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
+ playsound(src, emagged ? 'sound/weapons/Laser.ogg' : 'sound/weapons/Taser.ogg', 50, 1)
var/obj/item/projectile/P = new projectile(loc)
P.firer = src
diff --git a/code/modules/mob/living/bot/edCLNbot.dm b/code/modules/mob/living/bot/edCLNbot.dm
index 13abfa8da3..a7b9812b9f 100644
--- a/code/modules/mob/living/bot/edCLNbot.dm
+++ b/code/modules/mob/living/bot/edCLNbot.dm
@@ -27,7 +27,7 @@
/mob/living/bot/cleanbot/edCLN/handleIdle()
if(prob(10))
custom_emote(2, "makes a less than thrilled beeping sound.")
- playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
+ playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
if(red_switch && !blue_switch && !green_switch && prob(10) || src.emagged)
if(istype(loc, /turf/simulated))
@@ -124,7 +124,7 @@
if(!emagged)
if(user)
to_chat(user, "The [src] buzzes and beeps.")
- playsound(src.loc, 'sound/machines/buzzbeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/buzzbeep.ogg', 50, 0)
emagged = 1
return 1
diff --git a/code/modules/mob/living/bot/farmbot.dm b/code/modules/mob/living/bot/farmbot.dm
index 4eb7743254..9cec0dfe47 100644
--- a/code/modules/mob/living/bot/farmbot.dm
+++ b/code/modules/mob/living/bot/farmbot.dm
@@ -180,7 +180,7 @@
busy = 1
if(do_after(src, 30, A))
- playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
+ playsound(src, 'sound/effects/slosh.ogg', 25, 1)
visible_message("[src] waters \the [A].")
tank.reagents.trans_to(T, 100 - T.waterlevel)
if(FARMBOT_UPROOT)
@@ -218,7 +218,7 @@
while(do_after(src, 10) && tank.reagents.total_volume < tank.reagents.maximum_volume)
tank.reagents.add_reagent("water", 10)
if(prob(5))
- playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
+ playsound(src, 'sound/effects/slosh.ogg', 25, 1)
busy = 0
action = ""
diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm
index aa399a22f3..c34274a6ab 100644
--- a/code/modules/mob/living/bot/floorbot.dm
+++ b/code/modules/mob/living/bot/floorbot.dm
@@ -58,7 +58,7 @@
emagged = 1
if(user)
to_chat(user, "The [src] buzzes and beeps.")
- playsound(src.loc, 'sound/machines/buzzbeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/buzzbeep.ogg', 50, 0)
return 1
/mob/living/bot/floorbot/Topic(href, href_list)
@@ -102,7 +102,7 @@
if(prob(1))
custom_emote(2, "makes an excited beeping sound!")
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
/mob/living/bot/floorbot/handleAdjacentTarget()
if(get_turf(target) == src.loc)
@@ -278,7 +278,7 @@
/mob/living/bot/floorbot/explode()
turn_off()
visible_message("\The [src] blows apart!")
- playsound(src.loc, "sparks", 50, 1)
+ playsound(src, "sparks", 50, 1)
var/turf/Tsec = get_turf(src)
var/obj/item/weapon/storage/toolbox/mechanical/N = new /obj/item/weapon/storage/toolbox/mechanical(Tsec)
diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm
index edb7486fd1..a67440e013 100644
--- a/code/modules/mob/living/bot/medbot.dm
+++ b/code/modules/mob/living/bot/medbot.dm
@@ -44,7 +44,7 @@
)
var/message = pick(message_options)
say(message)
- playsound(loc, message_options[message], 50, 0)
+ playsound(src, message_options[message], 50, 0)
/mob/living/bot/medbot/handleAdjacentTarget()
UnarmedAttack(target)
@@ -88,7 +88,7 @@
)
var/message = pick(message_options)
say(message)
- playsound(loc, message_options[message], 50, 0)
+ playsound(src, message_options[message], 50, 0)
custom_emote(1, "points at [H.name].")
last_newpatient_speak = world.time
break
@@ -133,7 +133,7 @@
)
var/message = pick(death_messages)
say(message)
- playsound(loc, death_messages[message], 50, 0)
+ playsound(src, death_messages[message], 50, 0)
// This is down here for the same reason as above.
else
@@ -148,7 +148,7 @@
)
var/message = pick(possible_messages)
say(message)
- playsound(loc, possible_messages[message], 50, 0)
+ playsound(src, possible_messages[message], 50, 0)
busy = 0
update_icons()
@@ -293,7 +293,7 @@
reagent_glass = null
if(emagged && prob(25))
- playsound(loc, 'sound/voice/medbot/minsult.ogg', 50, 0)
+ playsound(src, 'sound/voice/medbot/minsult.ogg', 50, 0)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
diff --git a/code/modules/mob/living/bot/mulebot.dm b/code/modules/mob/living/bot/mulebot.dm
index b0eee0e650..9bef4c0cbc 100644
--- a/code/modules/mob/living/bot/mulebot.dm
+++ b/code/modules/mob/living/bot/mulebot.dm
@@ -183,7 +183,7 @@
locked = !locked
to_chat(user, "You [locked ? "lock" : "unlock"] the mulebot's controls!")
flick("mulebot-emagged", src)
- playsound(loc, 'sound/effects/sparks1.ogg', 100, 0)
+ playsound(src, 'sound/effects/sparks1.ogg', 100, 0)
return 1
/mob/living/bot/mulebot/update_icons()
@@ -202,13 +202,13 @@
/mob/living/bot/mulebot/handleFrustrated()
custom_emote(2, "makes a sighing buzz.")
- playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
+ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
..()
/mob/living/bot/mulebot/handleAdjacentTarget()
if(target == src.loc)
custom_emote(2, "makes a chiming sound.")
- playsound(loc, 'sound/machines/chime.ogg', 50, 0)
+ playsound(src, 'sound/machines/chime.ogg', 50, 0)
UnarmedAttack(target)
resetTarget()
if(auto_return && home && (loc != home))
@@ -244,7 +244,7 @@
/mob/living/bot/mulebot/proc/runOver(var/mob/living/carbon/human/H)
if(istype(H)) // No safety checks - WILL run over lying humans. Stop ERPing in the maint!
visible_message("[src] drives over [H]!")
- playsound(loc, 'sound/effects/splat.ogg', 50, 1)
+ playsound(src, 'sound/effects/splat.ogg', 50, 1)
var/damage = rand(5, 7)
H.apply_damage(2 * damage, BRUTE, BP_HEAD)
@@ -298,7 +298,7 @@
if(crates_only && !istype(C,/obj/structure/closet/crate))
custom_emote(2, "makes a sighing buzz.")
- playsound(loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
+ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
return
var/obj/structure/closet/crate/crate = C
diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm
index 6d7ec44860..17f4fadd99 100644
--- a/code/modules/mob/living/bot/secbot.dm
+++ b/code/modules/mob/living/bot/secbot.dm
@@ -158,7 +158,7 @@
return
if(!target)
- playsound(src.loc, pick(threat_found_sounds), 50)
+ playsound(src, pick(threat_found_sounds), 50)
global_announcer.autosay("[src] was attacked by a hostile [target_name(attacker)] in [get_area(src)].", "[src]", "Security")
target = attacker
attacked = TRUE
@@ -169,7 +169,7 @@
if(declare_arrests)
global_announcer.autosay("[src] is [arrest_type ? "detaining" : "arresting"] a level [threat] suspect [suspect_name] in [get_area(src)].", "[src]", "Security")
say("Down on the floor, [suspect_name]! You have [SECBOT_WAIT_TIME*2] seconds to comply.")
- playsound(src.loc, pick(preparing_arrest_sounds), 50)
+ playsound(src, pick(preparing_arrest_sounds), 50)
// Register to be told when the target moves
GLOB.moved_event.register(target, src, /mob/living/bot/secbot/proc/target_moved)
@@ -207,7 +207,7 @@
awaiting_surrender = 0
say("Level [threat] infraction alert!")
custom_emote(1, "points at [M.name]!")
- playsound(src.loc, pick(threat_found_sounds), 50)
+ playsound(src, pick(threat_found_sounds), 50)
return
/mob/living/bot/secbot/handleAdjacentTarget()
@@ -256,10 +256,10 @@
if(can_next_insult > world.time)
return
if(threat >= 10)
- playsound(src.loc, 'sound/voice/binsult.ogg', 75)
+ playsound(src, 'sound/voice/binsult.ogg', 75)
can_next_insult = world.time + 20 SECONDS
else
- playsound(src.loc, pick(fighting_sounds), 75)
+ playsound(src, pick(fighting_sounds), 75)
can_next_insult = world.time + 5 SECONDS
@@ -278,7 +278,7 @@
cuff = FALSE
if(!cuff)
H.stun_effect_act(0, stun_strength, null)
- playsound(loc, 'sound/weapons/Egloves.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/Egloves.ogg', 50, 1, -1)
do_attack_animation(H)
busy = TRUE
update_icons()
@@ -288,7 +288,7 @@
visible_message("\The [H] was prodded by \the [src] with a stun baton!")
insult(H)
else
- playsound(loc, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
+ playsound(src, 'sound/weapons/handcuffs.ogg', 30, 1, -2)
visible_message("\The [src] is trying to put handcuffs on \the [H]!")
busy = TRUE
if(do_mob(src, H, 60))
@@ -303,7 +303,7 @@
var/mob/living/L = M
L.adjustBruteLoss(xeno_harm_strength)
do_attack_animation(M)
- playsound(loc, "swing_hit", 50, 1, -1)
+ playsound(src, "swing_hit", 50, 1, -1)
busy = TRUE
update_icons()
spawn(2)
diff --git a/code/modules/mob/living/carbon/alien/alien_attacks.dm b/code/modules/mob/living/carbon/alien/alien_attacks.dm
index c120b9deef..e2c965e2c9 100644
--- a/code/modules/mob/living/carbon/alien/alien_attacks.dm
+++ b/code/modules/mob/living/carbon/alien/alien_attacks.dm
@@ -25,7 +25,7 @@
LAssailant = M
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("[] has grabbed [] passively!", M, src), 1)
@@ -40,7 +40,7 @@
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
- playsound(loc, "punch", 25, 1, -1)
+ playsound(src, "punch", 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("[] has punched []!", M, src), 1)
@@ -52,7 +52,7 @@
adjustBruteLoss(damage)
updatehealth()
else
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("[] has attempted to punch []!", M, src), 1)
diff --git a/code/modules/mob/living/carbon/alien/emote.dm b/code/modules/mob/living/carbon/alien/emote.dm
index 6c9cca88fb..5782b5d127 100644
--- a/code/modules/mob/living/carbon/alien/emote.dm
+++ b/code/modules/mob/living/carbon/alien/emote.dm
@@ -98,7 +98,7 @@
m_type = 2
if("chirp")
message = "[src] chirps!"
- playsound(loc, 'sound/misc/nymphchirp.ogg', 50, 0)
+ playsound(src, 'sound/misc/nymphchirp.ogg', 50, 0)
m_type = 2
if("help")
to_chat(src, "burp, chirp, choke, collapse, dance, drool, gasp, shiver, gnarl, jump, moan, nod, roll, scratch,\nscretch, shake, sign-#, sulk, sway, tail, twitch, whimper")
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index db1866d2a5..dd1f0db829 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -1,403 +1,403 @@
-/mob/living/carbon/Initialize()
- . = ..()
- //setup reagent holders
- bloodstr = new/datum/reagents/metabolism/bloodstream(500, src)
- ingested = new/datum/reagents/metabolism/ingested(500, src)
- touching = new/datum/reagents/metabolism/touch(500, src)
- reagents = bloodstr
- if (!default_language && species_language)
- default_language = GLOB.all_languages[species_language]
-
-/mob/living/carbon/Life()
- ..()
-
- handle_viruses()
-
- // Increase germ_level regularly
- if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
- germ_level++
-
-/mob/living/carbon/Destroy()
- qdel(ingested)
- qdel(touching)
- // We don't qdel(bloodstr) because it's the same as qdel(reagents)
- for(var/guts in internal_organs)
- qdel(guts)
- for(var/food in stomach_contents)
- qdel(food)
- return ..()
-
-/mob/living/carbon/rejuvenate()
- bloodstr.clear_reagents()
- ingested.clear_reagents()
- touching.clear_reagents()
- ..()
-
-/mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
- . = ..()
- if(src.nutrition && src.stat != 2)
- adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
- if(src.m_intent == "run")
- adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
-
- if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
- src.bodytemperature += 2
-
- // Moving around increases germ_level faster
- if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
- germ_level++
-
-/mob/living/carbon/relaymove(var/mob/living/user, direction)
- if((user in src.stomach_contents) && istype(user))
- if(user.last_special <= world.time)
- user.last_special = world.time + 50
- src.visible_message("You hear something rumbling inside [src]'s stomach...")
- var/obj/item/I = user.get_active_hand()
- if(I && I.force)
- var/d = rand(round(I.force / 4), I.force)
- if(istype(src, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = src
- var/obj/item/organ/external/organ = H.get_organ(BP_TORSO)
- if (istype(organ))
- if(organ.take_damage(d, 0))
- H.UpdateDamageIcon()
- H.updatehealth()
- else
- src.take_organ_damage(d)
- user.visible_message("[user] attacks [src]'s stomach wall with the [I.name]!")
- playsound(user.loc, 'sound/effects/attackblob.ogg', 50, 1)
-
- if(prob(src.getBruteLoss() - 50))
- for(var/atom/movable/A in stomach_contents)
- A.loc = loc
- stomach_contents.Remove(A)
- src.gib()
-
-/mob/living/carbon/gib()
- for(var/mob/M in src)
- if(M in src.stomach_contents)
- src.stomach_contents.Remove(M)
- M.loc = src.loc
- for(var/mob/N in viewers(src, null))
- if(N.client)
- N.show_message(text("[M] bursts out of [src]!"), 2)
- ..()
-
-/mob/living/carbon/attack_hand(mob/M as mob)
- if(!istype(M, /mob/living/carbon)) return
- if (ishuman(M))
- var/mob/living/carbon/human/H = M
- var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
- if (H.hand)
- temp = H.organs_by_name["l_hand"]
- if(temp && !temp.is_usable())
- to_chat(H, "You can't use your [temp.name]")
- return
-
- return
-
-/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null, var/stun = 1)
- if(status_flags & GODMODE) return 0 //godmode
- if(def_zone == "l_hand" || def_zone == "r_hand") //Diona (And any other potential plant people) hands don't get shocked.
- if(species.flags & IS_PLANT)
- return 0
- shock_damage *= siemens_coeff
- if (shock_damage<1)
- return 0
-
- src.apply_damage(0.2 * shock_damage, BURN, def_zone, used_weapon="Electrocution") //shock the target organ
- src.apply_damage(0.4 * shock_damage, BURN, BP_TORSO, used_weapon="Electrocution") //shock the torso more
- src.apply_damage(0.2 * shock_damage, BURN, null, used_weapon="Electrocution") //shock a random part!
- src.apply_damage(0.2 * shock_damage, BURN, null, used_weapon="Electrocution") //shock a random part!
-
- playsound(loc, "sparks", 50, 1, -1)
- if (shock_damage > 15)
- src.visible_message(
- "[src] was electrocuted[source ? " by the [source]" : ""]!", \
- "You feel a powerful shock course through your body!", \
- "You hear a heavy electrical crack." \
- )
- else
- src.visible_message(
- "[src] was shocked[source ? " by the [source]" : ""].", \
- "You feel a shock course through your body.", \
- "You hear a zapping sound." \
- )
-
- if(stun)
- switch(shock_damage)
- if(16 to 20)
- Stun(2)
- if(21 to 25)
- Weaken(2)
- if(26 to 30)
- Weaken(5)
- if(31 to INFINITY)
- Weaken(10) //This should work for now, more is really silly and makes you lay there forever
-
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, loc)
- s.start()
-
- return shock_damage
-
-/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
- if (src.health >= config.health_threshold_crit)
- if(src == M && istype(src, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = src
- var/datum/gender/T = gender_datums[H.get_visible_gender()]
- src.visible_message( \
- "[src] examines [T.himself].", \
- "You check yourself for injuries." \
- )
-
- for(var/obj/item/organ/external/org in H.organs)
- var/list/status = list()
- var/brutedamage = org.brute_dam
- var/burndamage = org.burn_dam
- /*
- if(halloss > 0) //Makes halloss show up as actual wounds on self examine.
- if(prob(30))
- brutedamage += halloss
- if(prob(30))
- burndamage += halloss
- */
- switch(brutedamage)
- if(1 to 20)
- status += "bruised"
- if(20 to 40)
- status += "wounded"
- if(40 to INFINITY)
- status += "mangled"
-
- switch(burndamage)
- if(1 to 10)
- status += "numb"
- if(10 to 40)
- status += "blistered"
- if(40 to INFINITY)
- status += "peeling away"
-
- if(org.is_stump())
- status += "MISSING"
- if(org.status & ORGAN_MUTATED)
- status += "weirdly shapen"
- if(org.dislocated == 2)
- status += "dislocated"
- if(org.status & ORGAN_BROKEN)
- status += "hurts when touched"
- if(org.status & ORGAN_DEAD)
- status += "is bruised and necrotic"
- if(!org.is_usable() || org.is_dislocated())
- status += "dangling uselessly"
- if(status.len)
- src.show_message("My [org.name] is [english_list(status)].",1)
- else
- src.show_message("My [org.name] is OK.",1)
-
- if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
- H.play_xylophone()
- else if (on_fire)
- playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
- if (M.on_fire)
- M.visible_message("[M] tries to pat out [src]'s flames, but to no avail!",
- "You try to pat out [src]'s flames, but to no avail! Put yourself out first!")
- else
- M.visible_message("[M] tries to pat out [src]'s flames!",
- "You try to pat out [src]'s flames! Hot!")
- if(do_mob(M, src, 15))
- src.adjust_fire_stacks(-0.5)
- if (prob(10) && (M.fire_stacks <= 0))
- M.adjust_fire_stacks(1)
- M.IgniteMob()
- if (M.on_fire)
- M.visible_message("The fire spreads from [src] to [M]!",
- "The fire spreads to you as well!")
- else
- src.adjust_fire_stacks(-0.5) //Less effective than stop, drop, and roll - also accounting for the fact that it takes half as long.
- if (src.fire_stacks <= 0)
- M.visible_message("[M] successfully pats out [src]'s flames.",
- "You successfully pat out [src]'s flames.")
- src.ExtinguishMob()
- src.fire_stacks = 0
- else
- if (istype(src,/mob/living/carbon/human) && src:w_uniform)
- var/mob/living/carbon/human/H = src
- H.w_uniform.add_fingerprint(M)
-
- var/show_ssd
- var/mob/living/carbon/human/H = src
- var/datum/gender/T = gender_datums[H.get_visible_gender()] // make sure to cast to human before using get_gender() or get_visible_gender()!
- if(istype(H)) show_ssd = H.species.show_ssd
- if(show_ssd && !client && !teleop)
- M.visible_message("[M] shakes [src] trying to wake [T.him] up!", \
- "You shake [src], but [T.he] [T.does] not respond... Maybe [T.he] [T.has] S.S.D?")
- else if(lying || src.sleeping)
- src.sleeping = max(0,src.sleeping-5)
- if(src.sleeping == 0)
- src.resting = 0
- M.visible_message("[M] shakes [src] trying to wake [T.him] up!", \
- "You shake [src] trying to wake [T.him] up!")
- else
- var/mob/living/carbon/human/hugger = M
- var/datum/gender/TM = gender_datums[M.get_visible_gender()]
- if(M.resting == 1) //Are they resting on the ground?
- M.visible_message("[M] grabs onto [src] and pulls [TM.himself] up", \
- "You grip onto [src] and pull yourself up off the ground!")
- if(M.fire_stacks >= (src.fire_stacks + 3)) //Fire checks.
- src.adjust_fire_stacks(1)
- M.adjust_fire_stacks(-1)
- if(M.on_fire)
- src.IgniteMob()
- if(do_after(M, 0.5 SECONDS)) //.5 second delay. Makes it a bit stronger than just typing rest.
- M.resting = 0 //Hoist yourself up up off the ground. No para/stunned/weakened removal.
- else if(istype(hugger))
- hugger.species.hug(hugger,src)
- else
- M.visible_message("[M] hugs [src] to make [T.him] feel better!", \
- "You hug [src] to make [T.him] feel better!")
- if(M.fire_stacks >= (src.fire_stacks + 3))
- src.adjust_fire_stacks(1)
- M.adjust_fire_stacks(-1)
- if(M.on_fire)
- src.IgniteMob()
- AdjustParalysis(-3)
- AdjustStunned(-3)
- AdjustWeakened(-3)
-
- playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
-
-/mob/living/carbon/proc/eyecheck()
- return 0
-
-/mob/living/carbon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
- if(eyecheck() < intensity || override_blindness_check)
- return ..()
-
-// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching.
-// Stop! ... Hammertime! ~Carn
-
-/mob/living/carbon/proc/getDNA()
- return dna
-
-/mob/living/carbon/proc/setDNA(var/datum/dna/newDNA)
- dna = newDNA
-
-// ++++ROCKDTBEN++++ MOB PROCS //END
-
-/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
- ..()
- var/temp_inc = max(min(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), exposed_temperature - bodytemperature), 0)
- bodytemperature += temp_inc
-
-/mob/living/carbon/can_use_hands()
- if(handcuffed)
- return 0
- if(buckled && istype(buckled, /obj/structure/bed/nest)) // buckling does not restrict hands
- return 0
- return 1
-
-/mob/living/carbon/restrained()
- if (handcuffed)
- return 1
- return
-
-/mob/living/carbon/u_equip(obj/item/W as obj)
- if(!W) return 0
-
- else if (W == handcuffed)
- handcuffed = null
- update_inv_handcuffed()
- if(buckled && buckled.buckle_require_restraints)
- buckled.unbuckle_mob()
-
- else if (W == legcuffed)
- legcuffed = null
- update_inv_legcuffed()
- else
- ..()
-
- return
-
-//generates realistic-ish pulse output based on preset levels
-/mob/living/carbon/proc/get_pulse(var/method) //method 0 is for hands, 1 is for machines, more accurate
- var/temp = 0 //see setup.dm:694
- switch(src.pulse)
- if(PULSE_NONE)
- return "0"
- if(PULSE_SLOW)
- temp = rand(40, 60)
- return num2text(method ? temp : temp + rand(-10, 10))
- if(PULSE_NORM)
- temp = rand(60, 90)
- return num2text(method ? temp : temp + rand(-10, 10))
- if(PULSE_FAST)
- temp = rand(90, 120)
- return num2text(method ? temp : temp + rand(-10, 10))
- if(PULSE_2FAST)
- temp = rand(120, 160)
- return num2text(method ? temp : temp + rand(-10, 10))
- if(PULSE_THREADY)
- return method ? ">250" : "extremely weak and fast, patient's artery feels like a thread"
-// output for machines^ ^^^^^^^output for people^^^^^^^^^
-
-/mob/living/carbon/verb/mob_sleep()
- set name = "Sleep"
- set category = "IC"
-
- if(usr.sleeping)
- to_chat(usr, "You are already sleeping")
- return
- if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
- usr.sleeping = 20 //Short nap
-
-/mob/living/carbon/Bump(atom/A)
- if(now_pushing)
- return
- ..()
- if(istype(A, /mob/living/carbon) && prob(10))
- spread_disease_to(A, "Contact")
-
-/mob/living/carbon/cannot_use_vents()
- return
-
-/mob/living/carbon/slip(var/slipped_on,stun_duration=8)
- if(buckled)
- return 0
- stop_pulling()
- to_chat(src, "You slipped on [slipped_on]!")
- playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
- Weaken(FLOOR(stun_duration/2, 1))
- return 1
-
-/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
- if(effect in chem_effects)
- chem_effects[effect] += magnitude
- else
- chem_effects[effect] = magnitude
-
-/mob/living/carbon/get_default_language()
- if(default_language)
- if(can_speak(default_language))
- return default_language
- else
- return GLOB.all_languages[LANGUAGE_GIBBERISH]
-
- if(!species)
- return null
-
- return species.default_language ? GLOB.all_languages[species.default_language] : null
-
-/mob/living/carbon/proc/should_have_organ(var/organ_check)
- return 0
-
-/mob/living/carbon/can_feel_pain(var/check_organ)
- if(isSynthetic())
- return 0
- return !(species.flags & NO_PAIN)
-
-/mob/living/carbon/needs_to_breathe()
- if(does_not_breathe)
- return FALSE
- return ..()
+/mob/living/carbon/Initialize()
+ . = ..()
+ //setup reagent holders
+ bloodstr = new/datum/reagents/metabolism/bloodstream(500, src)
+ ingested = new/datum/reagents/metabolism/ingested(500, src)
+ touching = new/datum/reagents/metabolism/touch(500, src)
+ reagents = bloodstr
+ if (!default_language && species_language)
+ default_language = GLOB.all_languages[species_language]
+
+/mob/living/carbon/Life()
+ ..()
+
+ handle_viruses()
+
+ // Increase germ_level regularly
+ if(germ_level < GERM_LEVEL_AMBIENT && prob(30)) //if you're just standing there, you shouldn't get more germs beyond an ambient level
+ germ_level++
+
+/mob/living/carbon/Destroy()
+ qdel(ingested)
+ qdel(touching)
+ // We don't qdel(bloodstr) because it's the same as qdel(reagents)
+ for(var/guts in internal_organs)
+ qdel(guts)
+ for(var/food in stomach_contents)
+ qdel(food)
+ return ..()
+
+/mob/living/carbon/rejuvenate()
+ bloodstr.clear_reagents()
+ ingested.clear_reagents()
+ touching.clear_reagents()
+ ..()
+
+/mob/living/carbon/Moved(atom/old_loc, direction, forced = FALSE)
+ . = ..()
+ if(src.nutrition && src.stat != 2)
+ adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
+ if(src.m_intent == "run")
+ adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10)
+
+ if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360)
+ src.bodytemperature += 2
+
+ // Moving around increases germ_level faster
+ if(germ_level < GERM_LEVEL_MOVE_CAP && prob(8))
+ germ_level++
+
+/mob/living/carbon/relaymove(var/mob/living/user, direction)
+ if((user in src.stomach_contents) && istype(user))
+ if(user.last_special <= world.time)
+ user.last_special = world.time + 50
+ src.visible_message("You hear something rumbling inside [src]'s stomach...")
+ var/obj/item/I = user.get_active_hand()
+ if(I && I.force)
+ var/d = rand(round(I.force / 4), I.force)
+ if(istype(src, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = src
+ var/obj/item/organ/external/organ = H.get_organ(BP_TORSO)
+ if (istype(organ))
+ if(organ.take_damage(d, 0))
+ H.UpdateDamageIcon()
+ H.updatehealth()
+ else
+ src.take_organ_damage(d)
+ user.visible_message("[user] attacks [src]'s stomach wall with the [I.name]!")
+ playsound(user, 'sound/effects/attackblob.ogg', 50, 1)
+
+ if(prob(src.getBruteLoss() - 50))
+ for(var/atom/movable/A in stomach_contents)
+ A.loc = loc
+ stomach_contents.Remove(A)
+ src.gib()
+
+/mob/living/carbon/gib()
+ for(var/mob/M in src)
+ if(M in src.stomach_contents)
+ src.stomach_contents.Remove(M)
+ M.loc = src.loc
+ for(var/mob/N in viewers(src, null))
+ if(N.client)
+ N.show_message(text("[M] bursts out of [src]!"), 2)
+ ..()
+
+/mob/living/carbon/attack_hand(mob/M as mob)
+ if(!istype(M, /mob/living/carbon)) return
+ if (ishuman(M))
+ var/mob/living/carbon/human/H = M
+ var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
+ if (H.hand)
+ temp = H.organs_by_name["l_hand"]
+ if(temp && !temp.is_usable())
+ to_chat(H, "You can't use your [temp.name]")
+ return
+
+ return
+
+/mob/living/carbon/electrocute_act(var/shock_damage, var/obj/source, var/siemens_coeff = 1.0, var/def_zone = null, var/stun = 1)
+ if(status_flags & GODMODE) return 0 //godmode
+ if(def_zone == "l_hand" || def_zone == "r_hand") //Diona (And any other potential plant people) hands don't get shocked.
+ if(species.flags & IS_PLANT)
+ return 0
+ shock_damage *= siemens_coeff
+ if (shock_damage<1)
+ return 0
+
+ src.apply_damage(0.2 * shock_damage, BURN, def_zone, used_weapon="Electrocution") //shock the target organ
+ src.apply_damage(0.4 * shock_damage, BURN, BP_TORSO, used_weapon="Electrocution") //shock the torso more
+ src.apply_damage(0.2 * shock_damage, BURN, null, used_weapon="Electrocution") //shock a random part!
+ src.apply_damage(0.2 * shock_damage, BURN, null, used_weapon="Electrocution") //shock a random part!
+
+ playsound(src, "sparks", 50, 1, -1)
+ if (shock_damage > 15)
+ src.visible_message(
+ "[src] was electrocuted[source ? " by the [source]" : ""]!", \
+ "You feel a powerful shock course through your body!", \
+ "You hear a heavy electrical crack." \
+ )
+ else
+ src.visible_message(
+ "[src] was shocked[source ? " by the [source]" : ""].", \
+ "You feel a shock course through your body.", \
+ "You hear a zapping sound." \
+ )
+
+ if(stun)
+ switch(shock_damage)
+ if(16 to 20)
+ Stun(2)
+ if(21 to 25)
+ Weaken(2)
+ if(26 to 30)
+ Weaken(5)
+ if(31 to INFINITY)
+ Weaken(10) //This should work for now, more is really silly and makes you lay there forever
+
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(5, 1, loc)
+ s.start()
+
+ return shock_damage
+
+/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
+ if (src.health >= config.health_threshold_crit)
+ if(src == M && istype(src, /mob/living/carbon/human))
+ var/mob/living/carbon/human/H = src
+ var/datum/gender/T = gender_datums[H.get_visible_gender()]
+ src.visible_message( \
+ "[src] examines [T.himself].", \
+ "You check yourself for injuries." \
+ )
+
+ for(var/obj/item/organ/external/org in H.organs)
+ var/list/status = list()
+ var/brutedamage = org.brute_dam
+ var/burndamage = org.burn_dam
+ /*
+ if(halloss > 0) //Makes halloss show up as actual wounds on self examine.
+ if(prob(30))
+ brutedamage += halloss
+ if(prob(30))
+ burndamage += halloss
+ */
+ switch(brutedamage)
+ if(1 to 20)
+ status += "bruised"
+ if(20 to 40)
+ status += "wounded"
+ if(40 to INFINITY)
+ status += "mangled"
+
+ switch(burndamage)
+ if(1 to 10)
+ status += "numb"
+ if(10 to 40)
+ status += "blistered"
+ if(40 to INFINITY)
+ status += "peeling away"
+
+ if(org.is_stump())
+ status += "MISSING"
+ if(org.status & ORGAN_MUTATED)
+ status += "weirdly shapen"
+ if(org.dislocated == 2)
+ status += "dislocated"
+ if(org.status & ORGAN_BROKEN)
+ status += "hurts when touched"
+ if(org.status & ORGAN_DEAD)
+ status += "is bruised and necrotic"
+ if(!org.is_usable() || org.is_dislocated())
+ status += "dangling uselessly"
+ if(status.len)
+ src.show_message("My [org.name] is [english_list(status)].",1)
+ else
+ src.show_message("My [org.name] is OK.",1)
+
+ if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
+ H.play_xylophone()
+ else if (on_fire)
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+ if (M.on_fire)
+ M.visible_message("[M] tries to pat out [src]'s flames, but to no avail!",
+ "You try to pat out [src]'s flames, but to no avail! Put yourself out first!")
+ else
+ M.visible_message("[M] tries to pat out [src]'s flames!",
+ "You try to pat out [src]'s flames! Hot!")
+ if(do_mob(M, src, 15))
+ src.adjust_fire_stacks(-0.5)
+ if (prob(10) && (M.fire_stacks <= 0))
+ M.adjust_fire_stacks(1)
+ M.IgniteMob()
+ if (M.on_fire)
+ M.visible_message("The fire spreads from [src] to [M]!",
+ "The fire spreads to you as well!")
+ else
+ src.adjust_fire_stacks(-0.5) //Less effective than stop, drop, and roll - also accounting for the fact that it takes half as long.
+ if (src.fire_stacks <= 0)
+ M.visible_message("[M] successfully pats out [src]'s flames.",
+ "You successfully pat out [src]'s flames.")
+ src.ExtinguishMob()
+ src.fire_stacks = 0
+ else
+ if (istype(src,/mob/living/carbon/human) && src:w_uniform)
+ var/mob/living/carbon/human/H = src
+ H.w_uniform.add_fingerprint(M)
+
+ var/show_ssd
+ var/mob/living/carbon/human/H = src
+ var/datum/gender/T = gender_datums[H.get_visible_gender()] // make sure to cast to human before using get_gender() or get_visible_gender()!
+ if(istype(H)) show_ssd = H.species.show_ssd
+ if(show_ssd && !client && !teleop)
+ M.visible_message("[M] shakes [src] trying to wake [T.him] up!", \
+ "You shake [src], but [T.he] [T.does] not respond... Maybe [T.he] [T.has] S.S.D?")
+ else if(lying || src.sleeping)
+ src.sleeping = max(0,src.sleeping-5)
+ if(src.sleeping == 0)
+ src.resting = 0
+ M.visible_message("[M] shakes [src] trying to wake [T.him] up!", \
+ "You shake [src] trying to wake [T.him] up!")
+ else
+ var/mob/living/carbon/human/hugger = M
+ var/datum/gender/TM = gender_datums[M.get_visible_gender()]
+ if(M.resting == 1) //Are they resting on the ground?
+ M.visible_message("[M] grabs onto [src] and pulls [TM.himself] up", \
+ "You grip onto [src] and pull yourself up off the ground!")
+ if(M.fire_stacks >= (src.fire_stacks + 3)) //Fire checks.
+ src.adjust_fire_stacks(1)
+ M.adjust_fire_stacks(-1)
+ if(M.on_fire)
+ src.IgniteMob()
+ if(do_after(M, 0.5 SECONDS)) //.5 second delay. Makes it a bit stronger than just typing rest.
+ M.resting = 0 //Hoist yourself up up off the ground. No para/stunned/weakened removal.
+ else if(istype(hugger))
+ hugger.species.hug(hugger,src)
+ else
+ M.visible_message("[M] hugs [src] to make [T.him] feel better!", \
+ "You hug [src] to make [T.him] feel better!")
+ if(M.fire_stacks >= (src.fire_stacks + 3))
+ src.adjust_fire_stacks(1)
+ M.adjust_fire_stacks(-1)
+ if(M.on_fire)
+ src.IgniteMob()
+ AdjustParalysis(-3)
+ AdjustStunned(-3)
+ AdjustWeakened(-3)
+
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+
+/mob/living/carbon/proc/eyecheck()
+ return 0
+
+/mob/living/carbon/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
+ if(eyecheck() < intensity || override_blindness_check)
+ return ..()
+
+// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching.
+// Stop! ... Hammertime! ~Carn
+
+/mob/living/carbon/proc/getDNA()
+ return dna
+
+/mob/living/carbon/proc/setDNA(var/datum/dna/newDNA)
+ dna = newDNA
+
+// ++++ROCKDTBEN++++ MOB PROCS //END
+
+/mob/living/carbon/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
+ ..()
+ var/temp_inc = max(min(BODYTEMP_HEATING_MAX*(1-get_heat_protection()), exposed_temperature - bodytemperature), 0)
+ bodytemperature += temp_inc
+
+/mob/living/carbon/can_use_hands()
+ if(handcuffed)
+ return 0
+ if(buckled && istype(buckled, /obj/structure/bed/nest)) // buckling does not restrict hands
+ return 0
+ return 1
+
+/mob/living/carbon/restrained()
+ if (handcuffed)
+ return 1
+ return
+
+/mob/living/carbon/u_equip(obj/item/W as obj)
+ if(!W) return 0
+
+ else if (W == handcuffed)
+ handcuffed = null
+ update_inv_handcuffed()
+ if(buckled && buckled.buckle_require_restraints)
+ buckled.unbuckle_mob()
+
+ else if (W == legcuffed)
+ legcuffed = null
+ update_inv_legcuffed()
+ else
+ ..()
+
+ return
+
+//generates realistic-ish pulse output based on preset levels
+/mob/living/carbon/proc/get_pulse(var/method) //method 0 is for hands, 1 is for machines, more accurate
+ var/temp = 0 //see setup.dm:694
+ switch(src.pulse)
+ if(PULSE_NONE)
+ return "0"
+ if(PULSE_SLOW)
+ temp = rand(40, 60)
+ return num2text(method ? temp : temp + rand(-10, 10))
+ if(PULSE_NORM)
+ temp = rand(60, 90)
+ return num2text(method ? temp : temp + rand(-10, 10))
+ if(PULSE_FAST)
+ temp = rand(90, 120)
+ return num2text(method ? temp : temp + rand(-10, 10))
+ if(PULSE_2FAST)
+ temp = rand(120, 160)
+ return num2text(method ? temp : temp + rand(-10, 10))
+ if(PULSE_THREADY)
+ return method ? ">250" : "extremely weak and fast, patient's artery feels like a thread"
+// output for machines^ ^^^^^^^output for people^^^^^^^^^
+
+/mob/living/carbon/verb/mob_sleep()
+ set name = "Sleep"
+ set category = "IC"
+
+ if(usr.sleeping)
+ to_chat(usr, "You are already sleeping")
+ return
+ if(alert(src,"You sure you want to sleep for a while?","Sleep","Yes","No") == "Yes")
+ usr.sleeping = 20 //Short nap
+
+/mob/living/carbon/Bump(atom/A)
+ if(now_pushing)
+ return
+ ..()
+ if(istype(A, /mob/living/carbon) && prob(10))
+ spread_disease_to(A, "Contact")
+
+/mob/living/carbon/cannot_use_vents()
+ return
+
+/mob/living/carbon/slip(var/slipped_on,stun_duration=8)
+ if(buckled)
+ return 0
+ stop_pulling()
+ to_chat(src, "You slipped on [slipped_on]!")
+ playsound(src, 'sound/misc/slip.ogg', 50, 1, -3)
+ Weaken(FLOOR(stun_duration/2, 1))
+ return 1
+
+/mob/living/carbon/proc/add_chemical_effect(var/effect, var/magnitude = 1)
+ if(effect in chem_effects)
+ chem_effects[effect] += magnitude
+ else
+ chem_effects[effect] = magnitude
+
+/mob/living/carbon/get_default_language()
+ if(default_language)
+ if(can_speak(default_language))
+ return default_language
+ else
+ return GLOB.all_languages[LANGUAGE_GIBBERISH]
+
+ if(!species)
+ return null
+
+ return species.default_language ? GLOB.all_languages[species.default_language] : null
+
+/mob/living/carbon/proc/should_have_organ(var/organ_check)
+ return 0
+
+/mob/living/carbon/can_feel_pain(var/check_organ)
+ if(isSynthetic())
+ return 0
+ return !(species.flags & NO_PAIN)
+
+/mob/living/carbon/needs_to_breathe()
+ if(does_not_breathe)
+ return FALSE
+ return ..()
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index cd59a549ec..df195a495e 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -92,7 +92,7 @@
user.visible_message("\The [user] cut [src]'s neck with \the [W]!")
if(W.hitsound)
- playsound(loc, W.hitsound, 50, 1, -1)
+ playsound(src, W.hitsound, 50, 1, -1)
G.last_action = world.time
flick(G.hud.icon_state, G.hud)
@@ -112,7 +112,7 @@
apply_damage(damage, W.damtype, "torso", 0, sharp=W.sharp, edge=W.edge)
if(W.hitsound)
- playsound(loc, W.hitsound, 50, 1, -1)
+ playsound(src, W.hitsound, 50, 1, -1)
add_attack_logs(user,src,"Knifed (shanked)")
diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm
index 6caeffdb6a..8b492e7dc4 100644
--- a/code/modules/mob/living/carbon/human/death.dm
+++ b/code/modules/mob/living/carbon/human/death.dm
@@ -87,7 +87,7 @@
to_chat(O, "[src] has died in [get_area(src)]. [ghost_follow_link(src, O)] ")
if(!gibbed && species.death_sound)
- playsound(loc, species.death_sound, 80, 1, 1)
+ playsound(src, species.death_sound, 80, 1, 1)
if(ticker && ticker.mode)
sql_report_death(src)
diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm
index 16ea5e1ee4..e4afd8e20e 100644
--- a/code/modules/mob/living/carbon/human/emote.dm
+++ b/code/modules/mob/living/carbon/human/emote.dm
@@ -75,7 +75,7 @@
message = "[display_msg] at [param]."
else
message = "[display_msg]."
- playsound(src.loc, use_sound, 50, 0)
+ playsound(src, use_sound, 50, 0)
m_type = 1
//Promethean-only emotes
@@ -84,7 +84,7 @@
to_chat(src, "You are not a slime thing!")
return
- playsound(src.loc, 'sound/effects/slime_squish.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound.
+ playsound(src, 'sound/effects/slime_squish.ogg', 50, 0) //Credit to DrMinky (freesound.org) for the sound.
message = "squishes."
m_type = 1
@@ -94,7 +94,7 @@
to_chat(src, "You are not a Skrell!")
return
- playsound(src.loc, 'sound/effects/warble.ogg', 50, 0) // Copyright CC BY 3.0 alienistcog (freesound.org) for the sound.
+ playsound(src, 'sound/effects/warble.ogg', 50, 0) // Copyright CC BY 3.0 alienistcog (freesound.org) for the sound.
message = "warbles."
m_type = 2
@@ -186,7 +186,7 @@
if("clap")
if(!src.restrained())
message = "claps."
- playsound(src.loc, 'sound/misc/clapping.ogg')
+ playsound(src, 'sound/misc/clapping.ogg')
m_type = 2
if(miming)
m_type = 1
@@ -267,7 +267,7 @@
use_sound = pick('sound/effects/mob_effects/f_machine_cougha.ogg','sound/effects/mob_effects/f_machine_coughb.ogg')
else
use_sound = pick('sound/effects/mob_effects/m_machine_cougha.ogg','sound/effects/mob_effects/m_machine_coughb.ogg', 'sound/effects/mob_effects/m_machine_coughc.ogg')
- playsound(src.loc, use_sound, 50, 0)
+ playsound(src, use_sound, 50, 0)
else
message = "makes a strong noise."
m_type = 2
@@ -540,7 +540,7 @@
use_sound = 'sound/effects/mob_effects/machine_sneeze.ogg'
else
use_sound = 'sound/effects/mob_effects/f_machine_sneeze.ogg'
- playsound(src.loc, use_sound, 50, 0)
+ playsound(src, use_sound, 50, 0)
else
message = "makes a strange noise."
m_type = 2
@@ -653,14 +653,14 @@
break
if(M)
message = "slaps [M] across the face. Ouch!"
- playsound(loc, 'sound/effects/snap.ogg', 50, 1)
+ playsound(src, 'sound/effects/snap.ogg', 50, 1)
if(ishuman(M)) //Snowflakey!
var/mob/living/carbon/human/H = M
if(istype(H.wear_mask,/obj/item/clothing/mask/smokable))
H.drop_from_inventory(H.wear_mask)
else
message = "slaps [T.himself]!"
- playsound(loc, 'sound/effects/snap.ogg', 50, 1)
+ playsound(src, 'sound/effects/snap.ogg', 50, 1)
if("scream", "screams")
if(miming)
@@ -672,9 +672,9 @@
m_type = 2
/* Removed, pending the location of some actually good, properly licensed sounds.
if(get_gender() == FEMALE)
- playsound(loc, "[species.female_scream_sound]", 80, 1)
+ playsound(src, "[species.female_scream_sound]", 80, 1)
else
- playsound(loc, "[species.male_scream_sound]", 80, 1) //default to male screams if no gender is present.
+ playsound(src, "[species.male_scream_sound]", 80, 1) //default to male screams if no gender is present.
*/
else
message = "makes a very loud noise."
@@ -697,7 +697,7 @@
return
message = "snaps [T.his] fingers."
- playsound(loc, 'sound/effects/fingersnap.ogg', 50, 1, -3)
+ playsound(src, 'sound/effects/fingersnap.ogg', 50, 1, -3)
if("swish")
src.animate_tail_once()
@@ -721,14 +721,14 @@
if("whistle" || "whistles")
if(!muzzled)
message = "whistles a tune."
- playsound(loc, 'sound/misc/longwhistle.ogg') //praying this doesn't get abused
+ playsound(src, 'sound/misc/longwhistle.ogg') //praying this doesn't get abused
else
message = "makes a light spitting noise, a poor attempt at a whistle."
if("qwhistle")
if(!muzzled)
message = "whistles quietly."
- playsound(loc, 'sound/misc/shortwhistle.ogg')
+ playsound(src, 'sound/misc/shortwhistle.ogg')
else
message = "makes a light spitting noise, a poor attempt at a whistle."
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 5ce9e835a0..c9cbf747b8 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -747,7 +747,7 @@
var/datum/gender/T = gender_datums[get_visible_gender()]
visible_message("\The [src] begins playing [T.his] ribcage like a xylophone. It's quite spooky.","You begin to play a spooky refrain on your ribcage.","You hear a spooky xylophone melody.")
var/song = pick('sound/effects/xylophone1.ogg','sound/effects/xylophone2.ogg','sound/effects/xylophone3.ogg')
- playsound(loc, song, 50, 1, -1)
+ playsound(src, song, 50, 1, -1)
xylophone = 1
spawn(1200)
xylophone=0
diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm
index 52c0fdbe0c..b8fc94afe6 100644
--- a/code/modules/mob/living/carbon/human/human_attackhand.dm
+++ b/code/modules/mob/living/carbon/human/human_attackhand.dm
@@ -38,7 +38,7 @@
var/hit_zone = get_zone_with_miss_chance(H.zone_sel.selecting, src, H.get_accuracy_penalty())
if(!hit_zone)
H.do_attack_animation(src)
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("[H] reaches for [src], but misses!")
return FALSE
@@ -111,7 +111,7 @@
LAssailant = M
H.do_attack_animation(src)
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("[M] has grabbed [src][(M.zone_sel.selecting == "l_hand" || M.zone_sel.selecting == "r_hand")? " by their hands!":" passively!"]")
return TRUE
@@ -220,7 +220,7 @@
else
H.visible_message("[attack_message]")
- playsound(loc, ((miss_type) ? (miss_type == 1 ? attack.miss_sound : 'sound/weapons/thudswoosh.ogg') : attack.attack_sound), 25, 1, -1)
+ playsound(src, ((miss_type) ? (miss_type == 1 ? attack.miss_sound : 'sound/weapons/thudswoosh.ogg') : attack.attack_sound), 25, 1, -1)
add_attack_logs(H,src,"Melee attacked with fists (miss/block)")
@@ -286,7 +286,7 @@
if((shoes || !(species.flags & NO_SLIP)) && randn <= 25)
var/armor_check = run_armor_check(affecting, "melee")
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("[M] has pushed [src]!")
else
@@ -296,7 +296,7 @@
if(randn <= 60)
//See about breaking grips or pulls
if(break_all_grabs(M))
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
//Actually disarm them
@@ -304,10 +304,10 @@
if(I)
drop_from_inventory(I)
visible_message("[M] has disarmed [src]!")
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message(" [M] attempted to disarm [src]!")
return
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 3675866e24..8e351372c9 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -227,7 +227,7 @@ emp_act
if(!hit_zone)
user.do_attack_animation(src)
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("\The [user] misses [src] with \the [I]!")
return null
diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm
index a0aa2363b8..fbd585fe6b 100644
--- a/code/modules/mob/living/carbon/human/human_powers.dm
+++ b/code/modules/mob/living/carbon/human/human_powers.dm
@@ -72,7 +72,7 @@
else
failed = 1
- playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
+ playsound(src, 'sound/weapons/pierce.ogg', 25, 1, -1)
if(failed)
src.Weaken(rand(2,4))
diff --git a/code/modules/mob/living/carbon/human/species/species_attack.dm b/code/modules/mob/living/carbon/human/species/species_attack.dm
index 9e6a07d168..3a5c358720 100644
--- a/code/modules/mob/living/carbon/human/species/species_attack.dm
+++ b/code/modules/mob/living/carbon/human/species/species_attack.dm
@@ -92,4 +92,4 @@
/datum/unarmed_attack/stomp/weak/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/obj/item/organ/external/affecting = target.get_organ(zone)
user.visible_message("[user] jumped up and down on \the [target]'s [affecting.name]!")
- playsound(user.loc, attack_sound, 25, 1, -1)
\ No newline at end of file
+ playsound(user, attack_sound, 25, 1, -1)
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm
index a3a14f2aa1..030a0e0335 100644
--- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm
+++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_facehugger.dm
@@ -15,7 +15,6 @@ var/const/MAX_ACTIVE_TIME = 400
icon_state = "facehugger"
item_state = "facehugger"
w_class = 3 //note: can be picked up by aliens unlike most other items of w_class below 4
- flags = PROXMOVE
body_parts_covered = FACE|EYES
throw_range = 5
diff --git a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
index 42c104bf18..bfeaf73fde 100644
--- a/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
+++ b/code/modules/mob/living/carbon/human/species/xenomorphs/alien_powers.dm
@@ -144,7 +144,7 @@
P.firer = src
P.old_style_target(A)
P.fire()
- playsound(loc, 'sound/weapons/pierce.ogg', 25, 0)
+ playsound(src, 'sound/weapons/pierce.ogg', 25, 0)
else
..()
@@ -295,7 +295,7 @@
src.visible_message("\The [src] leaps at [T]!")
src.throw_at(get_step(get_turf(T),get_turf(src)), 4, 1, src)
- playsound(src.loc, 'sound/voice/hiss5.ogg', 50, 1)
+ playsound(src, 'sound/voice/hiss5.ogg', 50, 1)
sleep(5)
diff --git a/code/modules/mob/living/carbon/human/unarmed_attack.dm b/code/modules/mob/living/carbon/human/unarmed_attack.dm
index 57001713e9..2f15a4ba49 100644
--- a/code/modules/mob/living/carbon/human/unarmed_attack.dm
+++ b/code/modules/mob/living/carbon/human/unarmed_attack.dm
@@ -91,7 +91,7 @@ var/global/list/sparring_attack_cache = list()
/datum/unarmed_attack/proc/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
var/obj/item/organ/external/affecting = target.get_organ(zone)
user.visible_message("[user] [pick(attack_verb)] [target] in the [affecting.name]!")
- playsound(user.loc, attack_sound, 25, 1, -1)
+ playsound(user, attack_sound, 25, 1, -1)
/datum/unarmed_attack/proc/handle_eye_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target)
var/obj/item/organ/internal/eyes/eyes = target.internal_organs_by_name[O_EYES]
diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm
index 1b973ae1b5..31c6ac1c82 100644
--- a/code/modules/mob/living/living.dm
+++ b/code/modules/mob/living/living.dm
@@ -165,7 +165,7 @@ default behaviour is:
if (!istype(AM, /atom/movable) || AM.anchored)
if(confused && prob(50) && m_intent=="run")
Weaken(2)
- playsound(loc, "punch", 25, 1, -1)
+ playsound(src, "punch", 25, 1, -1)
visible_message("[src] [pick("ran", "slammed")] into \the [AM]!")
src.apply_damage(5, BRUTE)
to_chat(src, "You just [pick("ran", "slammed")] into \the [AM]!")
@@ -774,19 +774,18 @@ default behaviour is:
handle_footstep(loc)
if(pulling) // we were pulling a thing and didn't lose it during our move.
+ var/pull_dir = get_dir(src, pulling)
+
if(pulling.anchored || !isturf(pulling.loc))
stop_pulling()
- return
-
- var/pull_dir = get_dir(src, pulling)
- if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir))) // puller and pullee more than one tile away or in diagonal position
+
+ else if(get_dist(src, pulling) > 1 || (moving_diagonally != SECOND_DIAG_STEP && ((pull_dir - 1) & pull_dir))) // puller and pullee more than one tile away or in diagonal position
// If it is too far away or across z-levels from old location, stop pulling.
if(get_dist(pulling.loc, oldloc) > 1 || pulling.loc.z != oldloc?.z)
stop_pulling()
- return
// living might take damage from drags
- if(isliving(pulling))
+ else if(isliving(pulling))
var/mob/living/M = pulling
M.dragged(src, oldloc)
@@ -794,6 +793,30 @@ default behaviour is:
if(pulling && get_dist(src, pulling) > 1) // the pullee couldn't keep up
stop_pulling()
+ if(!isturf(loc))
+ return
+ else if(lastarea?.has_gravity == 0)
+ inertial_drift()
+ else if(!isspace(loc))
+ inertia_dir = 0
+ make_floating(0)
+
+/mob/living/proc/inertial_drift()
+ if(x > 1 && x < (world.maxx) && y > 1 && y < (world.maxy))
+ if(Process_Spacemove(1))
+ inertia_dir = 0
+ return
+
+ var/locthen = loc
+ spawn(5)
+ if(!anchored && !pulledby && loc == locthen)
+ var/stepdir = inertia_dir ? inertia_dir : last_move
+ if(!stepdir)
+ return
+ var/turf/T = get_step(src, stepdir)
+ if(!T)
+ return
+ Move(T, stepdir, 5)
/mob/living/proc/handle_footstep(turf/T)
return FALSE
@@ -975,7 +998,7 @@ default behaviour is:
Stun(5)
src.visible_message("[src] throws up!","You throw up!")
- playsound(loc, 'sound/effects/splat.ogg', 50, 1)
+ playsound(src, 'sound/effects/splat.ogg', 50, 1)
var/turf/simulated/T = get_turf(src) //TODO: Make add_blood_floor remove blood from human mobs
if(istype(T))
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 5eeae44d68..2603552863 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -209,7 +209,7 @@
damage *= 0.66 // Take 2/3s as much damage.
visible_message("\The [B] [attack_verb] \the [src]!", "[attack_message]!")
- playsound(loc, 'sound/effects/attackblob.ogg', 50, 1)
+ playsound(src, 'sound/effects/attackblob.ogg', 50, 1)
//Armor
var/soaked = get_armor_soak(def_zone, armor_check, armor_pen)
diff --git a/code/modules/mob/living/silicon/emote.dm b/code/modules/mob/living/silicon/emote.dm
index ff3e340419..00a5e42993 100644
--- a/code/modules/mob/living/silicon/emote.dm
+++ b/code/modules/mob/living/silicon/emote.dm
@@ -23,7 +23,7 @@
message = "[src] beeps at [param]."
else
message = "[src] beeps."
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
m_type = 1
if("ping")
@@ -40,7 +40,7 @@
message = "[src] pings at [param]."
else
message = "[src] pings."
- playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
+ playsound(src, 'sound/machines/ping.ogg', 50, 0)
m_type = 1
if("buzz")
@@ -57,7 +57,7 @@
message = "[src] buzzes at [param]."
else
message = "[src] buzzes."
- playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
+ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
m_type = 1
if("yes", "ye")
@@ -74,7 +74,7 @@
message = "[src] emits an affirmative blip at [param]."
else
message = "[src] emits an affirmative blip."
- playsound(src.loc, 'sound/machines/synth_yes.ogg', 50, 0)
+ playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
m_type = 1
if("dwoop")
@@ -90,7 +90,7 @@
message = "[src] chirps happily at [param]"
else
message = "[src] chirps happily."
- playsound(src.loc, 'sound/machines/dwoop.ogg', 50, 0)
+ playsound(src, 'sound/machines/dwoop.ogg', 50, 0)
m_type = 1
if("no")
@@ -107,7 +107,7 @@
message = "[src] emits a negative blip at [param]."
else
message = "[src] emits a negative blip."
- playsound(src.loc, 'sound/machines/synth_no.ogg', 50, 0)
+ playsound(src, 'sound/machines/synth_no.ogg', 50, 0)
m_type = 1
..(act, m_type, message)
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm
index e159308d1b..e4f461179d 100644
--- a/code/modules/mob/living/silicon/pai/life.dm
+++ b/code/modules/mob/living/silicon/pai/life.dm
@@ -8,7 +8,7 @@
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
M.show_message("The data cable rapidly retracts back into its spool.", 3, "You hear a click and the sound of wire spooling rapidly.", 2)
- playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
qdel(src.cable)
src.cable = null
diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm
index 7658ddc1bf..656e46aef7 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone.dm
@@ -127,7 +127,7 @@ var/list/mob_hat_cache = list()
if(!module) module = new module_type(src)
flavor_text = "It's a tiny little repair drone. The casing is stamped with an corporate logo and the subscript: '[using_map.company_name] Recursive Repair Systems: Fixing Tomorrow's Problem, Today!'"
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
//Redefining some robot procs...
/mob/living/silicon/robot/drone/SetName(pickedName as text)
diff --git a/code/modules/mob/living/silicon/robot/emote.dm b/code/modules/mob/living/silicon/robot/emote.dm
index 403ee0ee0b..a3c46ab69a 100644
--- a/code/modules/mob/living/silicon/robot/emote.dm
+++ b/code/modules/mob/living/silicon/robot/emote.dm
@@ -123,7 +123,7 @@
if(istype(module,/obj/item/weapon/robot_module/robot/security))
message = "[src] shows its legal authorization barcode."
- playsound(src.loc, 'sound/voice/biamthelaw.ogg', 50, 0)
+ playsound(src, 'sound/voice/biamthelaw.ogg', 50, 0)
m_type = 2
else
to_chat(src, "You are not THE LAW, pal.")
@@ -132,7 +132,7 @@
if(istype(module,/obj/item/weapon/robot_module/robot/security))
message = "[src] 's speakers skreech, \"Halt! Security!\"."
- playsound(src.loc, 'sound/voice/halt.ogg', 50, 0)
+ playsound(src, 'sound/voice/halt.ogg', 50, 0)
m_type = 2
else
to_chat(src, "You are not security.")
diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm
index a4a3c8c14b..78d741b012 100644
--- a/code/modules/mob/living/silicon/robot/robot_items.dm
+++ b/code/modules/mob/living/silicon/robot/robot_items.dm
@@ -27,7 +27,7 @@
if(confirm == "Yes" && !QDELETED(loaded_item)) //This is pretty copypasta-y
to_chat(user, "You activate the analyzer's microlaser, analyzing \the [loaded_item] and breaking it down.")
flick("portable_analyzer_scan", src)
- playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1)
+ playsound(src, 'sound/items/Welder2.ogg', 50, 1)
for(var/T in loaded_item.origin_tech)
files.UpdateTech(T, loaded_item.origin_tech[T])
to_chat(user, "\The [loaded_item] had level [loaded_item.origin_tech[T]] in [CallTechName(T)].")
@@ -63,10 +63,10 @@
files.RefreshResearch()
if(success)
to_chat(user, "You connect to the research server, push your data upstream to it, then pull the resulting merged data from the master branch.")
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
else
to_chat(user, "Reserch server ping response timed out. Unable to connect. Please contact the system administrator.")
- playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 1)
+ playsound(src, 'sound/machines/buzz-two.ogg', 50, 1)
if(response == "Eject")
if(loaded_item)
loaded_item.loc = get_turf(src)
@@ -276,7 +276,7 @@
var/choice = input("Would you like to change colour or mode?") as null|anything in list("Colour","Mode")
if(!choice) return
- playsound(src.loc, 'sound/effects/pop.ogg', 50, 0)
+ playsound(src, 'sound/effects/pop.ogg', 50, 0)
switch(choice)
@@ -486,7 +486,7 @@
return
stored_doors++
qdel(A)
- playsound(loc, 'sound/machines/hiss.ogg', 75, 1)
+ playsound(src, 'sound/machines/hiss.ogg', 75, 1)
visible_message("\The [user] deflates \the [A] with \the [src]!")
return
if(istype(A, /obj/item/inflatable))
diff --git a/code/modules/mob/living/silicon/robot/robot_remote_control.dm b/code/modules/mob/living/silicon/robot/robot_remote_control.dm
index 2f4ca0e56b..c605584aa0 100644
--- a/code/modules/mob/living/silicon/robot/robot_remote_control.dm
+++ b/code/modules/mob/living/silicon/robot/robot_remote_control.dm
@@ -17,9 +17,9 @@ GLOBAL_LIST_EMPTY(available_ai_shells)
/mob/living/silicon/robot/proc/post_mmi_setup()
if(istype(mmi, /obj/item/device/mmi/inert/ai_remote))
make_shell()
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
else
- playsound(loc, 'sound/voice/liveagain.ogg', 75, 1)
+ playsound(src, 'sound/voice/liveagain.ogg', 75, 1)
return
/mob/living/silicon/robot/proc/make_shell()
diff --git a/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm b/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm
index 255eef5318..23e4aa81ea 100644
--- a/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm
+++ b/code/modules/mob/living/silicon/robot/subtypes/gravekeeper.dm
@@ -24,4 +24,4 @@
laws = new /datum/ai_laws/gravekeeper()
- playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
+ playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
diff --git a/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm b/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm
index d374562230..0460226f3f 100644
--- a/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm
+++ b/code/modules/mob/living/silicon/robot/subtypes/lost_drone.dm
@@ -21,7 +21,7 @@
if(!cell)
cell = new /obj/item/weapon/cell/high(src) // 15k cell, as recharging stations are a lot more rare on the Surface.
- playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
+ playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/lost/speech_bubble_appearance()
return "synthetic_evil"
diff --git a/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm b/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm
index 76496f4d4c..00e75248c7 100644
--- a/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm
+++ b/code/modules/mob/living/silicon/robot/subtypes/syndicate.dm
@@ -25,7 +25,7 @@
radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio)
radio.recalculateChannels()
- playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
+ playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
/mob/living/silicon/robot/syndicate/protector/init()
..()
diff --git a/code/modules/mob/living/silicon/robot/syndicate.dm b/code/modules/mob/living/silicon/robot/syndicate.dm
index acd441171b..c52755e696 100644
--- a/code/modules/mob/living/silicon/robot/syndicate.dm
+++ b/code/modules/mob/living/silicon/robot/syndicate.dm
@@ -25,4 +25,4 @@
radio.keyslot = new /obj/item/device/encryptionkey/syndicate(radio)
radio.recalculateChannels()
- playsound(loc, 'sound/mecha/nominalsyndi.ogg', 75, 0)
+ playsound(src, 'sound/mecha/nominalsyndi.ogg', 75, 0)
diff --git a/code/modules/mob/living/simple_mob/combat.dm b/code/modules/mob/living/simple_mob/combat.dm
index 046a4ef988..7a950bf11a 100644
--- a/code/modules/mob/living/simple_mob/combat.dm
+++ b/code/modules/mob/living/simple_mob/combat.dm
@@ -143,7 +143,7 @@
if(do_after(src, reload_time))
if(reload_sound)
- playsound(src.loc, reload_sound, 50, 1)
+ playsound(src, reload_sound, 50, 1)
reload_count = 0
. = TRUE
else
diff --git a/code/modules/mob/living/simple_mob/defense.dm b/code/modules/mob/living/simple_mob/defense.dm
index a8234ac970..d94d83c0a9 100644
--- a/code/modules/mob/living/simple_mob/defense.dm
+++ b/code/modules/mob/living/simple_mob/defense.dm
@@ -163,7 +163,7 @@
return 0
apply_damage(damage = shock_damage, damagetype = BURN, def_zone = null, blocked = null, blocked = resistance, used_weapon = null, sharp = FALSE, edge = FALSE)
- playsound(loc, "sparks", 50, 1, -1)
+ playsound(src, "sparks", 50, 1, -1)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, loc)
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/lurker.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/lurker.dm
index 15b04e119a..cb086c6ec3 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/lurker.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/lurker.dm
@@ -104,7 +104,7 @@
var/mob/living/L = A
L.Weaken(cloaked_weaken_amount)
to_chat(L, span("danger", "\The [src] ambushes you!"))
- playsound(L, 'sound/weapons/spiderlunge.ogg', 75, 1)
+ playsound(src, 'sound/weapons/spiderlunge.ogg', 75, 1)
uncloak()
..() // For the poison.
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/tunneler.dm b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/tunneler.dm
index 31997d204c..53d4bd0d24 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/tunneler.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/giant_spider/tunneler.dm
@@ -115,7 +115,7 @@
continue
visible_message(span("danger","\The [src] erupts from underneath, and hits \the [L]!"))
- playsound(L, 'sound/weapons/heavysmash.ogg', 75, 1)
+ playsound(src, 'sound/weapons/heavysmash.ogg', 75, 1)
L.Weaken(3)
overshoot = FALSE
@@ -164,7 +164,7 @@
// Stun anyone in our way.
for(var/mob/living/L in T)
- playsound(L, 'sound/weapons/heavysmash.ogg', 75, 1)
+ playsound(src, 'sound/weapons/heavysmash.ogg', 75, 1)
L.Weaken(2)
// Get into the tile.
diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/sif/hooligan_crab.dm b/code/modules/mob/living/simple_mob/subtypes/animal/sif/hooligan_crab.dm
index 5f4a4dc7e0..0ac8d54c2b 100644
--- a/code/modules/mob/living/simple_mob/subtypes/animal/sif/hooligan_crab.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/animal/sif/hooligan_crab.dm
@@ -93,7 +93,7 @@
var/was_stunned = L.incapacitated(INCAPACITATION_DISABLED)
L.Weaken(weaken_amount)
- playsound(L, 'sound/effects/break_stone.ogg', 75, 1)
+ playsound(src, 'sound/effects/break_stone.ogg', 75, 1)
if(was_stunned) // Try to prevent chain-stuns by having them thrown.
var/throwdir = get_dir(src, L)
L.throw_at(get_edge_target_turf(L, throwdir), 5, 1, src)
diff --git a/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm b/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm
index 0b1dea13ff..69486a061d 100644
--- a/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/illusion/illusion.dm
@@ -56,7 +56,7 @@
/mob/living/simple_mob/illusion/attack_hand(mob/living/carbon/human/M)
if(!realistic)
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message(span("warning", "\The [M]'s hand goes through \the [src]!"))
return
else
@@ -67,10 +67,10 @@
span("notice", "\The [M] hugs [src] to make [T.him] feel better!"), \
span("notice", "You hug [src] to make [T.him] feel better!")
) // slightly redundant as at the moment most mobs still use the normal gender var, but it works and future-proofs it
- playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
if(I_DISARM)
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message(span("danger", "\The [M] attempted to disarm [src]!"))
M.do_attack_animation(src)
@@ -86,7 +86,7 @@
if(realistic)
return ..()
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+ playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message(span("warning", "\The [user]'s [I] goes through \the [src]!"))
return FALSE
diff --git a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm
index 0129e6970a..4049ba0370 100644
--- a/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/mechanical/mecha/adv_dark_gygax.dm
@@ -152,7 +152,7 @@
visible_message(span("warning", "\The [src] creates \an [energy_ball] around itself!"))
- playsound(src.loc, 'sound/effects/lightning_chargeup.ogg', 100, 1, extrarange = 30)
+ playsound(src, 'sound/effects/lightning_chargeup.ogg', 100, 1, extrarange = 30)
// Shock nearby things that aren't ourselves.
for(var/i = 1 to 10)
@@ -179,7 +179,7 @@
// Shoot a tesla bolt, and flashes people who are looking at the mecha without sufficent eye protection.
visible_message(span("warning", "\The [energy_ball] explodes in a flash of light, sending a shock everywhere!"))
- playsound(src.loc, 'sound/effects/lightningbolt.ogg', 100, 1, extrarange = 30)
+ playsound(src, 'sound/effects/lightningbolt.ogg', 100, 1, extrarange = 30)
tesla_zap(src.loc, 5, ELECTRIC_ZAP_POWER, FALSE)
for(var/mob/living/L in viewers(src))
if(L == src)
diff --git a/code/modules/mob/living/simple_mob/subtypes/plant/tree.dm b/code/modules/mob/living/simple_mob/subtypes/plant/tree.dm
index 30c891088c..404a209c60 100644
--- a/code/modules/mob/living/simple_mob/subtypes/plant/tree.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/plant/tree.dm
@@ -38,6 +38,6 @@
/mob/living/simple_mob/animal/space/tree/death()
..(null,"is hacked into pieces!")
- playsound(loc, 'sound/effects/woodcutting.ogg', 100, 1)
+ playsound(src, 'sound/effects/woodcutting.ogg', 100, 1)
new /obj/item/stack/material/wood(loc)
qdel(src)
\ No newline at end of file
diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/feral/feral.dm b/code/modules/mob/living/simple_mob/subtypes/slime/feral/feral.dm
index 5144d22697..e2ef92e982 100644
--- a/code/modules/mob/living/simple_mob/subtypes/slime/feral/feral.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/slime/feral/feral.dm
@@ -69,7 +69,7 @@
sharp = TRUE
/obj/item/projectile/icicle/on_impact(atom/A)
- playsound(get_turf(A), "shatter", 70, 1)
+ playsound(A, "shatter", 70, 1)
return ..()
/obj/item/projectile/icicle/get_structure_damage()
diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm b/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm
index 2b73efe8c1..b06baf71a3 100644
--- a/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/slime/slime.dm
@@ -1,217 +1,217 @@
-// The top-level slime defines. Xenobio slimes and feral slimes will inherit from this.
-
-/mob/living/simple_mob/slime
- name = "slime"
- desc = "It's a slime."
- tt_desc = "A Macrolimbus vulgaris"
- icon = 'icons/mob/slime2.dmi'
- icon_state = "slime baby"
- icon_living = "slime baby"
- icon_dead = "slime baby dead"
- var/shiny = FALSE // If true, will add a 'shiny' overlay.
- var/icon_state_override = null // Used for special slime appearances like the rainbow slime.
- color = "#CACACA"
- glow_range = 3
- glow_intensity = 2
- gender = NEUTER
-
- faction = "slime" // Note that slimes are hostile to other slimes of different color regardless of faction (unless Unified).
- maxHealth = 150
- movement_cooldown = 0
- pass_flags = PASSTABLE
- makes_dirt = FALSE // Goop
- mob_class = MOB_CLASS_SLIME
-
- response_help = "pets"
-
- // Atmos stuff.
- minbodytemp = T0C-30
- heat_damage_per_tick = 0
- cold_damage_per_tick = 40
-
- min_oxy = 0
- max_oxy = 0
- min_tox = 0
- max_tox = 0
- min_co2 = 0
- max_co2 = 0
- min_n2 = 0
- max_n2 = 0
- unsuitable_atoms_damage = 0
- shock_resist = 0.5 // Slimes are resistant to electricity, and it actually charges them.
- taser_kill = FALSE
- water_resist = 0 // Slimes are very weak to water.
-
- melee_damage_lower = 10
- melee_damage_upper = 15
- base_attack_cooldown = 10 // One attack a second.
- attack_sound = 'sound/weapons/bite.ogg'
- attacktext = list("glomped")
- speak_emote = list("chirps")
- friendly = list("pokes")
-
- ai_holder_type = /datum/ai_holder/simple_mob/melee
- say_list_type = /datum/say_list/slime
-
- var/cores = 1 // How many cores you get when placed in a Processor.
- var/obj/item/clothing/head/hat = null // The hat the slime may be wearing.
- var/slime_color = "grey" // Used for updating the name and for slime color-ism.
- var/unity = FALSE // If true, slimes will consider other colors as their own. Other slimes will see this slime as the same color as well.
- var/coretype = /obj/item/slime_extract/grey // What core is inside the slime, and what you get from the processor.
- var/reagent_injected = null // Some slimes inject reagents on attack. This tells the game what reagent to use.
- var/injection_amount = 5 // This determines how much.
- var/mood = ":3" // Icon to use to display 'mood', as an overlay.
-
- can_enter_vent_with = list(/obj/item/clothing/head)
-
-/datum/say_list/slime
- speak = list("Blorp...", "Blop...")
- emote_see = list("bounces", "jiggles", "sways")
- emote_hear = list("squishes")
-
-/mob/living/simple_mob/slime/Initialize()
- verbs += /mob/living/proc/ventcrawl
- update_mood()
- glow_color = color
- handle_light()
- update_icon()
- return ..()
-
-/mob/living/simple_mob/slime/Destroy()
- if(hat)
- drop_hat()
- return ..()
-
-/mob/living/simple_mob/slime/death()
- // Make dead slimes stop glowing.
- glow_toggle = FALSE
- handle_light()
- ..()
-
-/mob/living/simple_mob/slime/revive()
- // Make revived slimes resume glowing.
- glow_toggle = initial(glow_toggle)
- handle_light()
- ..()
-
-/mob/living/simple_mob/slime/update_icon()
- ..() // Do the regular stuff first.
-
- if(stat != DEAD)
- // General slime shine.
- var/image/I = image(icon, src, "slime light")
- I.appearance_flags = RESET_COLOR
- add_overlay(I)
-
- // 'Shiny' overlay, for gemstone-slimes.
- if(shiny)
- I = image(icon, src, "slime shiny")
- I.appearance_flags = RESET_COLOR
- add_overlay(I)
-
- // Mood overlay.
- I = image(icon, src, "aslime-[mood]")
- I.appearance_flags = RESET_COLOR
- add_overlay(I)
-
- // Hat simulator.
- if(hat)
- var/hat_state = hat.item_state ? hat.item_state : hat.icon_state
- var/image/I = image('icons/mob/head.dmi', src, hat_state)
- I.pixel_y = -7 // Slimes are small.
- I.appearance_flags = RESET_COLOR
- add_overlay(I)
-
-// Controls the 'mood' overlay. Overrided in subtypes for specific behaviour.
-/mob/living/simple_mob/slime/proc/update_mood()
- mood = "feral" // This is to avoid another override in the /feral subtype.
-
-/mob/living/simple_mob/slime/proc/unify()
- unity = TRUE
-
-// Interface override, because slimes are supposed to attack other slimes of different color regardless of faction.
-// (unless Unified, of course).
-/mob/living/simple_mob/slime/IIsAlly(mob/living/L)
- . = ..()
- if(istype(L, /mob/living/simple_mob/slime)) // Slimes should care about their color subfaction compared to another's.
- var/mob/living/simple_mob/slime/S = L
- if(S.unity || src.unity)
- return TRUE
- if(S.slime_color == src.slime_color)
- return TRUE
- else
- return FALSE
- // The other stuff was already checked in parent proc, and the . variable will implicitly return the correct value.
-
-// Slimes regenerate passively.
-/mob/living/simple_mob/slime/handle_special()
- adjustOxyLoss(-1)
- adjustToxLoss(-1)
- adjustFireLoss(-1)
- adjustCloneLoss(-1)
- adjustBruteLoss(-1)
-
-// Clicked on by empty hand.
-/mob/living/simple_mob/slime/attack_hand(mob/living/L)
- if(L.a_intent == I_GRAB && hat)
- remove_hat(L)
- else
- ..()
-
-// Clicked on while holding an object.
-/mob/living/simple_mob/slime/attackby(obj/item/I, mob/user)
- if(istype(I, /obj/item/clothing/head)) // Handle hat simulator.
- give_hat(I, user)
- return
-
- // Otherwise they're probably fighting the slime.
- if(prob(25))
- visible_message(span("warning", "\The [user]'s [I] passes right through \the [src]!"))
- user.setClickCooldown(user.get_attack_speed(I))
- return
- ..()
-
-// Called when hit with an active slimebaton (or xeno taser).
-// Subtypes react differently.
-/mob/living/simple_mob/slime/proc/slimebatoned(mob/living/user, amount)
- return
-
-// Hat simulator
-/mob/living/simple_mob/slime/proc/give_hat(var/obj/item/clothing/head/new_hat, var/mob/living/user)
- if(!istype(new_hat))
- to_chat(user, span("warning", "\The [new_hat] isn't a hat."))
- return
- if(hat)
- to_chat(user, span("warning", "\The [src] is already wearing \a [hat]."))
- return
- else
- user.drop_item(new_hat)
- hat = new_hat
- new_hat.forceMove(src)
- to_chat(user, span("notice", "You place \a [new_hat] on \the [src]. How adorable!"))
- update_icon()
- return
-
-/mob/living/simple_mob/slime/proc/remove_hat(var/mob/living/user)
- if(!hat)
- to_chat(user, "\The [src] doesn't have a hat to remove.")
- else
- hat.forceMove(get_turf(src))
- user.put_in_hands(hat)
- to_chat(user, "You take away \the [src]'s [hat.name]. How mean.")
- hat = null
- update_icon()
-
-/mob/living/simple_mob/slime/proc/drop_hat()
- if(!hat)
- return
- hat.forceMove(get_turf(src))
- hat = null
- update_icon()
-
-/mob/living/simple_mob/slime/speech_bubble_appearance()
- return "slime"
-
-/mob/living/simple_mob/slime/proc/squish()
- playsound(src.loc, 'sound/effects/slime_squish.ogg', 50, 0)
+// The top-level slime defines. Xenobio slimes and feral slimes will inherit from this.
+
+/mob/living/simple_mob/slime
+ name = "slime"
+ desc = "It's a slime."
+ tt_desc = "A Macrolimbus vulgaris"
+ icon = 'icons/mob/slime2.dmi'
+ icon_state = "slime baby"
+ icon_living = "slime baby"
+ icon_dead = "slime baby dead"
+ var/shiny = FALSE // If true, will add a 'shiny' overlay.
+ var/icon_state_override = null // Used for special slime appearances like the rainbow slime.
+ color = "#CACACA"
+ glow_range = 3
+ glow_intensity = 2
+ gender = NEUTER
+
+ faction = "slime" // Note that slimes are hostile to other slimes of different color regardless of faction (unless Unified).
+ maxHealth = 150
+ movement_cooldown = 0
+ pass_flags = PASSTABLE
+ makes_dirt = FALSE // Goop
+ mob_class = MOB_CLASS_SLIME
+
+ response_help = "pets"
+
+ // Atmos stuff.
+ minbodytemp = T0C-30
+ heat_damage_per_tick = 0
+ cold_damage_per_tick = 40
+
+ min_oxy = 0
+ max_oxy = 0
+ min_tox = 0
+ max_tox = 0
+ min_co2 = 0
+ max_co2 = 0
+ min_n2 = 0
+ max_n2 = 0
+ unsuitable_atoms_damage = 0
+ shock_resist = 0.5 // Slimes are resistant to electricity, and it actually charges them.
+ taser_kill = FALSE
+ water_resist = 0 // Slimes are very weak to water.
+
+ melee_damage_lower = 10
+ melee_damage_upper = 15
+ base_attack_cooldown = 10 // One attack a second.
+ attack_sound = 'sound/weapons/bite.ogg'
+ attacktext = list("glomped")
+ speak_emote = list("chirps")
+ friendly = list("pokes")
+
+ ai_holder_type = /datum/ai_holder/simple_mob/melee
+ say_list_type = /datum/say_list/slime
+
+ var/cores = 1 // How many cores you get when placed in a Processor.
+ var/obj/item/clothing/head/hat = null // The hat the slime may be wearing.
+ var/slime_color = "grey" // Used for updating the name and for slime color-ism.
+ var/unity = FALSE // If true, slimes will consider other colors as their own. Other slimes will see this slime as the same color as well.
+ var/coretype = /obj/item/slime_extract/grey // What core is inside the slime, and what you get from the processor.
+ var/reagent_injected = null // Some slimes inject reagents on attack. This tells the game what reagent to use.
+ var/injection_amount = 5 // This determines how much.
+ var/mood = ":3" // Icon to use to display 'mood', as an overlay.
+
+ can_enter_vent_with = list(/obj/item/clothing/head)
+
+/datum/say_list/slime
+ speak = list("Blorp...", "Blop...")
+ emote_see = list("bounces", "jiggles", "sways")
+ emote_hear = list("squishes")
+
+/mob/living/simple_mob/slime/Initialize()
+ verbs += /mob/living/proc/ventcrawl
+ update_mood()
+ glow_color = color
+ handle_light()
+ update_icon()
+ return ..()
+
+/mob/living/simple_mob/slime/Destroy()
+ if(hat)
+ drop_hat()
+ return ..()
+
+/mob/living/simple_mob/slime/death()
+ // Make dead slimes stop glowing.
+ glow_toggle = FALSE
+ handle_light()
+ ..()
+
+/mob/living/simple_mob/slime/revive()
+ // Make revived slimes resume glowing.
+ glow_toggle = initial(glow_toggle)
+ handle_light()
+ ..()
+
+/mob/living/simple_mob/slime/update_icon()
+ ..() // Do the regular stuff first.
+
+ if(stat != DEAD)
+ // General slime shine.
+ var/image/I = image(icon, src, "slime light")
+ I.appearance_flags = RESET_COLOR
+ add_overlay(I)
+
+ // 'Shiny' overlay, for gemstone-slimes.
+ if(shiny)
+ I = image(icon, src, "slime shiny")
+ I.appearance_flags = RESET_COLOR
+ add_overlay(I)
+
+ // Mood overlay.
+ I = image(icon, src, "aslime-[mood]")
+ I.appearance_flags = RESET_COLOR
+ add_overlay(I)
+
+ // Hat simulator.
+ if(hat)
+ var/hat_state = hat.item_state ? hat.item_state : hat.icon_state
+ var/image/I = image('icons/mob/head.dmi', src, hat_state)
+ I.pixel_y = -7 // Slimes are small.
+ I.appearance_flags = RESET_COLOR
+ add_overlay(I)
+
+// Controls the 'mood' overlay. Overrided in subtypes for specific behaviour.
+/mob/living/simple_mob/slime/proc/update_mood()
+ mood = "feral" // This is to avoid another override in the /feral subtype.
+
+/mob/living/simple_mob/slime/proc/unify()
+ unity = TRUE
+
+// Interface override, because slimes are supposed to attack other slimes of different color regardless of faction.
+// (unless Unified, of course).
+/mob/living/simple_mob/slime/IIsAlly(mob/living/L)
+ . = ..()
+ if(istype(L, /mob/living/simple_mob/slime)) // Slimes should care about their color subfaction compared to another's.
+ var/mob/living/simple_mob/slime/S = L
+ if(S.unity || src.unity)
+ return TRUE
+ if(S.slime_color == src.slime_color)
+ return TRUE
+ else
+ return FALSE
+ // The other stuff was already checked in parent proc, and the . variable will implicitly return the correct value.
+
+// Slimes regenerate passively.
+/mob/living/simple_mob/slime/handle_special()
+ adjustOxyLoss(-1)
+ adjustToxLoss(-1)
+ adjustFireLoss(-1)
+ adjustCloneLoss(-1)
+ adjustBruteLoss(-1)
+
+// Clicked on by empty hand.
+/mob/living/simple_mob/slime/attack_hand(mob/living/L)
+ if(L.a_intent == I_GRAB && hat)
+ remove_hat(L)
+ else
+ ..()
+
+// Clicked on while holding an object.
+/mob/living/simple_mob/slime/attackby(obj/item/I, mob/user)
+ if(istype(I, /obj/item/clothing/head)) // Handle hat simulator.
+ give_hat(I, user)
+ return
+
+ // Otherwise they're probably fighting the slime.
+ if(prob(25))
+ visible_message(span("warning", "\The [user]'s [I] passes right through \the [src]!"))
+ user.setClickCooldown(user.get_attack_speed(I))
+ return
+ ..()
+
+// Called when hit with an active slimebaton (or xeno taser).
+// Subtypes react differently.
+/mob/living/simple_mob/slime/proc/slimebatoned(mob/living/user, amount)
+ return
+
+// Hat simulator
+/mob/living/simple_mob/slime/proc/give_hat(var/obj/item/clothing/head/new_hat, var/mob/living/user)
+ if(!istype(new_hat))
+ to_chat(user, span("warning", "\The [new_hat] isn't a hat."))
+ return
+ if(hat)
+ to_chat(user, span("warning", "\The [src] is already wearing \a [hat]."))
+ return
+ else
+ user.drop_item(new_hat)
+ hat = new_hat
+ new_hat.forceMove(src)
+ to_chat(user, span("notice", "You place \a [new_hat] on \the [src]. How adorable!"))
+ update_icon()
+ return
+
+/mob/living/simple_mob/slime/proc/remove_hat(var/mob/living/user)
+ if(!hat)
+ to_chat(user, "\The [src] doesn't have a hat to remove.")
+ else
+ hat.forceMove(get_turf(src))
+ user.put_in_hands(hat)
+ to_chat(user, "You take away \the [src]'s [hat.name]. How mean.")
+ hat = null
+ update_icon()
+
+/mob/living/simple_mob/slime/proc/drop_hat()
+ if(!hat)
+ return
+ hat.forceMove(get_turf(src))
+ hat = null
+ update_icon()
+
+/mob/living/simple_mob/slime/speech_bubble_appearance()
+ return "slime"
+
+/mob/living/simple_mob/slime/proc/squish()
+ playsound(src, 'sound/effects/slime_squish.ogg', 50, 0)
visible_message("\The [src] squishes!")
\ No newline at end of file
diff --git a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/defense.dm b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/defense.dm
index ff055bae52..51266a6d88 100644
--- a/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/defense.dm
+++ b/code/modules/mob/living/simple_mob/subtypes/slime/xenobio/defense.dm
@@ -1,54 +1,54 @@
-// Contains code for slimes getting attacked, beat, touched, etc, and reacting to that.
-
-// Clicked on by empty hand.
-// Handles trying to wrestle a slime off of someone being eatten.
-/mob/living/simple_mob/slime/xenobio/attack_hand(mob/living/L)
- if(victim) // Are we eating someone?
- var/fail_odds = 30
- if(victim == L) // Harder to get the slime off if it's you that is being eatten.
- fail_odds = 60
-
- if(prob(fail_odds))
- visible_message(span("warning", "\The [L] attempts to wrestle \the [name] off!"))
- playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
-
- else
- visible_message(span("warning", "\The [L] manages to wrestle \the [name] off!"))
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
-
- if(prob(40))
- adjust_discipline(1) // Do this here so that it will be justified discipline.
- stop_consumption()
- step_away(src, L)
-
- else
- ..()
-
-// Handles the actual harming by a melee weapon.
-/mob/living/simple_mob/slime/xenobio/hit_with_weapon(obj/item/I, mob/living/user, effective_force, hit_zone)
- ..() // Apply damage and etc.
- if(!stat && effective_force > 0)
- if(!is_justified_to_discipline()) // Wow, buddy, why am I getting attacked??
- adjust_discipline(1) // This builds resentment due to being unjustified.
-
- if(user in friends) // Friend attacking us for no reason.
- if(prob(25))
- friends -= user
- say("[user]... not friend...")
-
- else // We're actually being bad.
- var/prob_to_back_down = round(effective_force)
- if(is_adult)
- prob_to_back_down /= 2
- if(prob(prob_to_back_down))
- adjust_discipline(2) // Justified.
-
-// Shocked grilles don't hurt slimes, and in fact give them charge.
-/mob/living/simple_mob/slime/xenobio/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0, def_zone = null)
- power_charge = between(0, power_charge + round(shock_damage / 10), 10)
- to_chat(src, span("notice", "\The [source] shocks you, and it charges you."))
-
-// Getting slimebatoned/xenotased.
-/mob/living/simple_mob/slime/xenobio/slimebatoned(mob/living/user, amount)
- adjust_discipline(round(amount/2))
- Weaken(amount) // This needs to come afterwards or else it will always be considered abuse to the slime.
+// Contains code for slimes getting attacked, beat, touched, etc, and reacting to that.
+
+// Clicked on by empty hand.
+// Handles trying to wrestle a slime off of someone being eatten.
+/mob/living/simple_mob/slime/xenobio/attack_hand(mob/living/L)
+ if(victim) // Are we eating someone?
+ var/fail_odds = 30
+ if(victim == L) // Harder to get the slime off if it's you that is being eatten.
+ fail_odds = 60
+
+ if(prob(fail_odds))
+ visible_message(span("warning", "\The [L] attempts to wrestle \the [name] off!"))
+ playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
+
+ else
+ visible_message(span("warning", "\The [L] manages to wrestle \the [name] off!"))
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+
+ if(prob(40))
+ adjust_discipline(1) // Do this here so that it will be justified discipline.
+ stop_consumption()
+ step_away(src, L)
+
+ else
+ ..()
+
+// Handles the actual harming by a melee weapon.
+/mob/living/simple_mob/slime/xenobio/hit_with_weapon(obj/item/I, mob/living/user, effective_force, hit_zone)
+ ..() // Apply damage and etc.
+ if(!stat && effective_force > 0)
+ if(!is_justified_to_discipline()) // Wow, buddy, why am I getting attacked??
+ adjust_discipline(1) // This builds resentment due to being unjustified.
+
+ if(user in friends) // Friend attacking us for no reason.
+ if(prob(25))
+ friends -= user
+ say("[user]... not friend...")
+
+ else // We're actually being bad.
+ var/prob_to_back_down = round(effective_force)
+ if(is_adult)
+ prob_to_back_down /= 2
+ if(prob(prob_to_back_down))
+ adjust_discipline(2) // Justified.
+
+// Shocked grilles don't hurt slimes, and in fact give them charge.
+/mob/living/simple_mob/slime/xenobio/electrocute_act(shock_damage, obj/source, siemens_coeff = 1.0, def_zone = null)
+ power_charge = between(0, power_charge + round(shock_damage / 10), 10)
+ to_chat(src, span("notice", "\The [source] shocks you, and it charges you."))
+
+// Getting slimebatoned/xenotased.
+/mob/living/simple_mob/slime/xenobio/slimebatoned(mob/living/user, amount)
+ adjust_discipline(round(amount/2))
+ Weaken(amount) // This needs to come afterwards or else it will always be considered abuse to the slime.
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 9091e338ab..40a7b3ab59 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -3,7 +3,6 @@
layer = MOB_LAYER
plane = MOB_PLANE
animate_movement = 2
- flags = PROXMOVE
var/datum/mind/mind
var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak
diff --git a/code/modules/mob/mob_grab_specials.dm b/code/modules/mob/mob_grab_specials.dm
index 1702e73ec9..a7a9d45db7 100644
--- a/code/modules/mob/mob_grab_specials.dm
+++ b/code/modules/mob/mob_grab_specials.dm
@@ -108,7 +108,7 @@
target.apply_effect(20, PARALYZE)
target.visible_message("[target] [target.species.get_knockout_message(target)]")
- playsound(attacker.loc, "swing_hit", 25, 1, -1)
+ playsound(attacker, "swing_hit", 25, 1, -1)
add_attack_logs(attacker,target,"Headbutted using grab")
attacker.drop_from_inventory(src)
@@ -121,7 +121,7 @@
to_chat(attacker, "You require a better grab to do this.")
return
if(target.grab_joint(attacker, target_zone))
- playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
+ playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
/obj/item/weapon/grab/proc/pin_down(mob/target, mob/attacker)
diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm
index d1912c6778..9585be554e 100644
--- a/code/modules/mob/mob_movement.dm
+++ b/code/modules/mob/mob_movement.dm
@@ -407,9 +407,9 @@
//Check to see if we slipped
if(prob(Process_Spaceslipping(5)) && !buckled)
- to_chat(src, "You slipped!")
- src.inertia_dir = src.last_move
- step(src, src.inertia_dir)
+ to_chat(src, "You slipped!")
+ inertia_dir = last_move
+ step(src, src.inertia_dir) // Not using Move for smooth glide here because this is a 'slip' so should be sudden.
return 0
//If not then we can reset inertia and move
inertia_dir = 0
@@ -421,7 +421,7 @@
var/shoegrip
for(var/turf/turf in oview(1,src))
- if(istype(turf,/turf/space))
+ if(isspace(turf))
continue
if(istype(turf,/turf/simulated/floor)) // Floors don't count if they don't have gravity
@@ -471,21 +471,6 @@
/mob/proc/update_gravity()
return
-// Called when a mob successfully moves.
-// Would've been an /atom/movable proc but it caused issues.
-/mob/Moved(atom/oldloc)
- . = ..()
- for(var/obj/O in contents)
- O.on_loc_moved(oldloc)
-
-// Received from Moved(), useful for items that need to know that their loc just moved.
-/obj/proc/on_loc_moved(atom/oldloc)
- return
-
-/obj/item/weapon/storage/on_loc_moved(atom/oldloc)
- for(var/obj/O in contents)
- O.on_loc_moved(oldloc)
-
/client/verb/moveup()
set name = ".moveup"
set instant = 1
diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm
index 886dae69e3..e9a2355d2a 100644
--- a/code/modules/mob/new_player/preferences_setup.dm
+++ b/code/modules/mob/new_player/preferences_setup.dm
@@ -289,3 +289,29 @@
break
return highJob
+
+/datum/preferences/proc/get_valid_hairstyles()
+ var/list/valid_hairstyles = list()
+ for(var/hairstyle in hair_styles_list)
+ var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
+ if(!(species in S.species_allowed))
+ continue
+
+ valid_hairstyles[hairstyle] = hair_styles_list[hairstyle]
+
+ return valid_hairstyles
+
+/datum/preferences/proc/get_valid_facialhairstyles()
+ var/list/valid_facialhairstyles = list()
+ for(var/facialhairstyle in facial_hair_styles_list)
+ var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
+ if(biological_gender == MALE && S.gender == FEMALE)
+ continue
+ if(biological_gender == FEMALE && S.gender == MALE)
+ continue
+ if(!(species in S.species_allowed))
+ continue
+
+ valid_facialhairstyles[facialhairstyle] = facial_hair_styles_list[facialhairstyle]
+
+ return valid_facialhairstyles
diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm
index af6f5b3ca6..40d2ad1343 100644
--- a/code/modules/multiz/movement.dm
+++ b/code/modules/multiz/movement.dm
@@ -441,7 +441,7 @@
visible_message("\The [src] falls from above and slams into \the [landing]!", \
"You fall off and hit \the [landing]!", \
"You hear something slam into \the [landing].")
- playsound(loc, "punch", 25, 1, -1)
+ playsound(src, "punch", 25, 1, -1)
// Because wounds heal rather quickly, 10 (the default for this proc) should be enough to discourage jumping off but not be enough to ruin you, at least for the first time.
// Hits 10 times, because apparently targeting individual limbs lets certain species survive the fall from atmosphere
@@ -538,7 +538,7 @@
visible_message("\The [src] falls from above and slams into \the [landing]!", \
"You fall off and hit \the [landing]!", \
"You hear something slam into \the [landing].")
- playsound(loc, "punch", 25, 1, -1)
+ playsound(src, "punch", 25, 1, -1)
// And now to hurt the mech.
if(!planetary)
diff --git a/code/modules/multiz/pipes.dm b/code/modules/multiz/pipes.dm
index 237e38562e..0bc21f07eb 100644
--- a/code/modules/multiz/pipes.dm
+++ b/code/modules/multiz/pipes.dm
@@ -79,7 +79,7 @@ obj/machinery/atmospherics/pipe/zpipe/check_pressure(pressure)
obj/machinery/atmospherics/pipe/zpipe/proc/burst()
src.visible_message("\The [src] bursts!");
- playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
+ playsound(src, 'sound/effects/bang.ogg', 25, 1)
var/datum/effect/effect/system/smoke_spread/smoke = new
smoke.set_up(1,0, src.loc, 0)
smoke.start()
diff --git a/code/modules/multiz/turf.dm b/code/modules/multiz/turf.dm
index 8b17e46bd1..ced3aaaba5 100644
--- a/code/modules/multiz/turf.dm
+++ b/code/modules/multiz/turf.dm
@@ -34,15 +34,30 @@
..()
update()
+/turf/simulated/open/ChangeTurf()
+ var/turf/T = GetBelow(src)
+ if(T)
+ GLOB.turf_entered_event.unregister(T, src, .proc/BelowOpenUpdated)
+ GLOB.turf_exited_event.unregister(T, src, .proc/BelowOpenUpdated)
+ . = ..()
+
/turf/simulated/open/Initialize()
. = ..()
ASSERT(HasBelow(z))
update()
+ var/turf/T = GetBelow(src)
+ if(T)
+ GLOB.turf_entered_event.register(T, src, .proc/BelowOpenUpdated)
+ GLOB.turf_exited_event.register(T, src, .proc/BelowOpenUpdated)
/turf/simulated/open/Entered(var/atom/movable/mover)
..()
mover.fall()
+/turf/simulated/open/proc/BelowOpenUpdated(turf/T, atom/movable/AM, old_loc)
+ if(isobj(AM) && GLOB.open_space_initialised && !AM.invisibility)
+ SSopen_space.add_turf(src, 1)
+
// Called when thrown object lands on this turf.
/turf/simulated/open/hitby(var/atom/movable/AM, var/speed)
. = ..()
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index cd2f396c4a..883a44a430 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -1039,7 +1039,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(organ_can_feel_pain())
owner.emote("scream")
- playsound(src.loc, "fracture", 10, 1, -2)
+ playsound(src, "fracture", 10, 1, -2)
status |= ORGAN_BROKEN
broken_description = pick("broken","fracture","hairline fracture")
diff --git a/code/modules/overmap/overmap_shuttle.dm b/code/modules/overmap/overmap_shuttle.dm
index b614137db4..6fdb6cbeb1 100644
--- a/code/modules/overmap/overmap_shuttle.dm
+++ b/code/modules/overmap/overmap_shuttle.dm
@@ -160,11 +160,11 @@
if(W.is_crowbar())
if(opened)
to_chat(user, "You tightly shut \the [src] door.")
- playsound(src.loc, 'sound/effects/locker_close.ogg', 25, 0, -3)
+ playsound(src, 'sound/effects/locker_close.ogg', 25, 0, -3)
opened = 0
else
to_chat(user, "You open up \the [src] door.")
- playsound(src.loc, 'sound/effects/locker_open.ogg', 15, 1, -3)
+ playsound(src, 'sound/effects/locker_open.ogg', 15, 1, -3)
opened = 1
else if(istype(W,/obj/item/weapon/tank))
if(!opened)
diff --git a/code/modules/overmap/ships/computers/sensors.dm b/code/modules/overmap/ships/computers/sensors.dm
index 13b8e5806e..0d9d83edd7 100644
--- a/code/modules/overmap/ships/computers/sensors.dm
+++ b/code/modules/overmap/ships/computers/sensors.dm
@@ -98,7 +98,7 @@
if (href_list["scan"])
var/obj/effect/overmap/O = locate(href_list["scan"])
if(istype(O) && !QDELETED(O) && (O in view(7,linked)))
- playsound(loc, "sound/machines/dotprinter.ogg", 30, 1)
+ playsound(src, "sound/machines/dotprinter.ogg", 30, 1)
new/obj/item/weapon/paper/(get_turf(src), O.get_scan_data(user), "paper (Sensor Scan - [O])")
return TOPIC_HANDLED
diff --git a/code/modules/overmap/ships/engines/gas_thruster.dm b/code/modules/overmap/ships/engines/gas_thruster.dm
index 04101984c4..7661122f56 100644
--- a/code/modules/overmap/ships/engines/gas_thruster.dm
+++ b/code/modules/overmap/ships/engines/gas_thruster.dm
@@ -159,7 +159,7 @@
if(!removed)
return 0
. = calculate_thrust(removed)
- playsound(loc, 'sound/machines/thruster.ogg', 100 * thrust_limit, 0, world.view * 4, 0.1)
+ playsound(src, 'sound/machines/thruster.ogg', 100 * thrust_limit, 0, world.view * 4, 0.1)
if(network)
network.update = 1
diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm
index 8ac4c2a087..8b94e3c416 100644
--- a/code/modules/paperwork/faxmachine.dm
+++ b/code/modules/paperwork/faxmachine.dm
@@ -156,7 +156,7 @@ var/list/adminfaxes = list() //cache for faxes that have been sent to admins
return 0 //You can't send faxes to "Unknown"
flick("faxreceive", src)
- playsound(loc, "sound/effects/printer.ogg", 50, 1)
+ playsound(src, "sound/effects/printer.ogg", 50, 1)
// give the sprite some time to flick
diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm
index 374fb647c5..cf1f251307 100644
--- a/code/modules/paperwork/filingcabinet.dm
+++ b/code/modules/paperwork/filingcabinet.dm
@@ -38,19 +38,19 @@
P.loc = src
icon_state = "[initial(icon_state)]-open"
flick("[initial(icon_state)]-open",src)
- playsound(loc, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
+ playsound(src, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
sleep(40)
icon_state = initial(icon_state)
updateUsrDialog()
else if(P.is_wrench())
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
anchored = !anchored
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
else if(P.is_screwdriver())
to_chat(user, "You begin taking the [name] apart.")
playsound(src, P.usesound, 50, 1)
if(do_after(user, 10 * P.toolspeed))
- playsound(loc, P.usesound, 50, 1)
+ playsound(src, P.usesound, 50, 1)
to_chat(user, "You take the [name] apart.")
new /obj/item/stack/material/steel( src.loc, 4 )
for(var/obj/item/I in contents)
@@ -101,7 +101,7 @@
usr.put_in_hands(P)
updateUsrDialog()
flick("[initial(icon_state)]-open",src)
- playsound(loc, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
+ playsound(src, 'sound/bureaucracy/filingcabinet.ogg', 50, 1)
spawn(0)
sleep(20)
icon_state = initial(icon_state)
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index 8e799efb25..8366ed94a7 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -184,7 +184,7 @@
if(rigged && (Holiday == "April Fool's Day"))
if(spam_flag == 0)
spam_flag = 1
- playsound(loc, 'sound/items/bikehorn.ogg', 50, 1)
+ playsound(src, 'sound/items/bikehorn.ogg', 50, 1)
spawn(20)
spam_flag = 0
return
@@ -369,7 +369,7 @@
user.visible_message("[user] holds \the [P] up to \the [src], it looks like [TU.hes] trying to burn it!", \
"You hold \the [P] up to \the [src], burning it slowly.")
- playsound(src.loc, 'sound/bureaucracy/paperburn.ogg', 50, 1)
+ playsound(src, 'sound/bureaucracy/paperburn.ogg', 50, 1)
spawn(20)
if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit)
diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm
index 28979b4154..bbf66d9f9a 100644
--- a/code/modules/paperwork/paper_bundle.dm
+++ b/code/modules/paperwork/paper_bundle.dm
@@ -154,13 +154,13 @@
insert_sheet_at(usr, page+1, in_hand)
else if(page != pages.len)
page++
- playsound(src.loc, "pageturn", 50, 1)
+ playsound(src, "pageturn", 50, 1)
if(href_list["prev_page"])
if(in_hand && (istype(in_hand, /obj/item/weapon/paper) || istype(in_hand, /obj/item/weapon/photo)))
insert_sheet_at(usr, page, in_hand)
else if(page > 1)
page--
- playsound(src.loc, "pageturn", 50, 1)
+ playsound(src, "pageturn", 50, 1)
if(href_list["remove"])
var/obj/item/weapon/W = pages[page]
usr.put_in_hands(W)
diff --git a/code/modules/paperwork/papershredder.dm b/code/modules/paperwork/papershredder.dm
index cbbe7eeb4e..f5fae97d83 100644
--- a/code/modules/paperwork/papershredder.dm
+++ b/code/modules/paperwork/papershredder.dm
@@ -60,7 +60,7 @@
paperamount += paper_result
user.drop_from_inventory(W)
qdel(W)
- playsound(src.loc, 'sound/items/pshred.ogg', 75, 1)
+ playsound(src, 'sound/items/pshred.ogg', 75, 1)
flick(shred_anim, src)
if(paperamount > max_paper)
to_chat(user,"\The [src] was too full, and shredded paper goes everywhere!")
diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm
index af51ebdf1f..e27f8db8b0 100644
--- a/code/modules/paperwork/pen.dm
+++ b/code/modules/paperwork/pen.dm
@@ -30,7 +30,7 @@
return
user.setClickCooldown(1 SECOND)
to_chat(user, "Click.")
- playsound(loc, 'sound/items/penclick.ogg', 50, 1)
+ playsound(src, 'sound/items/penclick.ogg', 50, 1)
/obj/item/weapon/pen/blue
desc = "It's a normal blue ink pen."
@@ -53,7 +53,7 @@
/obj/item/weapon/pen/AltClick(mob/user)
to_chat(user, "Click.")
- playsound(loc, 'sound/items/penclick.ogg', 50, 1)
+ playsound(src, 'sound/items/penclick.ogg', 50, 1)
return
/obj/item/weapon/pen/multi/attack_self(mob/user)
@@ -152,7 +152,7 @@
sharp = 1
edge = 1
w_class = active_w_class
- playsound(user, 'sound/weapons/saberon.ogg', 15, 1)
+ playsound(src, 'sound/weapons/saberon.ogg', 15, 1)
damtype = SEARING
catchable = FALSE
@@ -166,7 +166,7 @@
/obj/item/weapon/pen/blade/proc/deactivate(mob/living/user)
if(!active)
return
- playsound(user, 'sound/weapons/saberoff.ogg', 15, 1)
+ playsound(src, 'sound/weapons/saberoff.ogg', 15, 1)
active = 0
icon_state = default_icon_state
embed_chance = initial(embed_chance)
diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm
index 6b4d96ff31..39f91401d0 100644
--- a/code/modules/paperwork/photocopier.dm
+++ b/code/modules/paperwork/photocopier.dm
@@ -143,7 +143,7 @@
copyitem = O
O.loc = src
to_chat(user, "You insert \the [O] into \the [src].")
- playsound(loc, "sound/machines/click.ogg", 100, 1)
+ playsound(src, "sound/machines/click.ogg", 100, 1)
flick(insert_anim, src)
else
to_chat(user, "There is already something in \the [src].")
@@ -157,7 +157,7 @@
else
to_chat(user, "This cartridge is not yet ready for replacement! Use up the rest of the toner.")
else if(O.is_wrench())
- playsound(loc, O.usesound, 50, 1)
+ playsound(src, O.usesound, 50, 1)
anchored = !anchored
to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].")
else if(default_deconstruction_screwdriver(user, O))
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index d3bae838fc..2e27fa0658 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -97,7 +97,7 @@ var/global/photo_count = 0
var/mob/living/carbon/human/M = usr
if(!( istype(over_object, /obj/screen) ))
return ..()
- playsound(loc, "rustle", 50, 1, -5)
+ playsound(src, "rustle", 50, 1, -5)
if((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if("r_hand")
@@ -242,7 +242,7 @@ var/global/photo_count = 0
if(!on || !pictures_left || ismob(target.loc)) return
captureimage(target, user, flag)
- playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3)
+ playsound(src, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3)
pictures_left--
desc = "A polaroid camera. It has [pictures_left] photos left."
diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm
index 46f05bfd80..93c716b426 100644
--- a/code/modules/power/antimatter/control.dm
+++ b/code/modules/power/antimatter/control.dm
@@ -69,7 +69,7 @@
/obj/machinery/power/am_control_unit/proc/produce_power()
- playsound(src.loc, 'sound/effects/bang.ogg', 25, 1)
+ playsound(src, 'sound/effects/bang.ogg', 25, 1)
var/core_power = reported_core_efficiency//Effectively how much fuel we can safely deal with
if(core_power <= 0) return 0//Something is wrong
var/core_damage = 0
@@ -85,7 +85,7 @@
for(var/obj/machinery/am_shielding/AMS in linked_cores)
AMS.stability -= core_damage
AMS.check_stability(1)
- playsound(src.loc, 'sound/effects/bang.ogg', 50, 1)
+ playsound(src, 'sound/effects/bang.ogg', 50, 1)
return
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index ce532cb575..eba9923c87 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -527,12 +527,12 @@
if (has_electronics==1 && terminal)
has_electronics = 2
stat &= ~MAINT
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
to_chat(user, "You screw the circuit electronics into place.")
else if (has_electronics==2)
has_electronics = 1
stat |= MAINT
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
to_chat(user, "You unfasten the electronics.")
else /* has_electronics==0 */
to_chat(user, "There is nothing to secure.")
@@ -558,7 +558,7 @@
return
user.visible_message("[user.name] adds cables to the APC frame.", \
"You start adding cables to the APC frame...")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20))
if (C.amount >= 10 && !terminal && opened && has_electronics != 2)
var/obj/structure/cable/N = T.get_cable_node()
@@ -581,7 +581,7 @@
return
user.visible_message("[user.name] starts dismantling the [src]'s power terminal.", \
"You begin to cut the cables...")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 50 * W.toolspeed))
if(terminal && opened && has_electronics!=2)
if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal))
@@ -596,7 +596,7 @@
else if (istype(W, /obj/item/weapon/module/power_control) && opened && has_electronics==0 && !((stat & BROKEN)))
user.visible_message("[user.name] inserts the power control board into [src].", \
"You start to insert the power control board into the frame...")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 10))
if(has_electronics==0)
has_electronics = 1
@@ -656,7 +656,7 @@
if(do_after(user, 50))
user.visible_message("[user.name] resets the APC with a beep from their [W.name].",\
"You finish resetting the APC.")
- playsound(src.loc, 'sound/machines/chime.ogg', 25, 1)
+ playsound(src, 'sound/machines/chime.ogg', 25, 1)
reboot()
else
if ((stat & BROKEN) \
@@ -742,7 +742,7 @@
if(H.species.can_shred(H))
user.setClickCooldown(user.get_attack_speed())
user.visible_message("[user.name] slashes at the [src.name]!", "You slash at the [src.name]!")
- playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
+ playsound(src, 'sound/weapons/slash.ogg', 100, 1)
var/allcut = wires.IsAllCut()
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 0b3ed6512b..0fc1695363 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -112,7 +112,7 @@ var/global/list/light_type_cache = list()
new /obj/item/stack/material/steel( get_turf(src.loc), sheets_refunded )
user.visible_message("[user.name] deconstructs [src].", \
"You deconstruct [src].", "You hear a noise.")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 75, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 75, 1)
qdel(src)
if (src.stage == 2)
to_chat(usr, "You have to remove the wires first.")
@@ -129,7 +129,7 @@ var/global/list/light_type_cache = list()
new /obj/item/stack/cable_coil(get_turf(src.loc), 1, "red")
user.visible_message("[user.name] removes the wiring from [src].", \
"You remove the wiring from [src].", "You hear a noise.")
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
return
if(istype(W, /obj/item/stack/cable_coil))
@@ -753,7 +753,7 @@ var/global/list/light_type_cache = list()
if(!skip_sound_and_sparks)
if(status == LIGHT_OK || status == LIGHT_BURNED)
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
if(on)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
@@ -974,7 +974,7 @@ var/global/list/light_type_cache = list()
status = LIGHT_BROKEN
force = 5
sharp = 1
- playsound(src.loc, 'sound/effects/Glasshit.ogg', 75, 1)
+ playsound(src, 'sound/effects/Glasshit.ogg', 75, 1)
update_icon()
//Lamp Shade
diff --git a/code/modules/power/pacman2.dm b/code/modules/power/pacman2.dm
index 26a534e222..81f73be63d 100644
--- a/code/modules/power/pacman2.dm
+++ b/code/modules/power/pacman2.dm
@@ -72,7 +72,7 @@
else if(!active)
if(O.is_wrench())
anchored = !anchored
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(anchored)
to_chat(user, "You secure the generator to the floor.")
else
@@ -80,13 +80,13 @@
SSmachines.makepowernets()
else if(O.is_screwdriver())
open = !open
- playsound(loc, O.usesound, 50, 1)
+ playsound(src, O.usesound, 50, 1)
if(open)
to_chat(user, "You open the access panel.")
else
to_chat(user, "You close the access panel.")
else if(O.is_crowbar() && !open)
- playsound(loc, O.usesound, 50, 1)
+ playsound(src, O.usesound, 50, 1)
var/obj/machinery/constructable_frame/machine_frame/new_frame = new /obj/machinery/constructable_frame/machine_frame(src.loc)
for(var/obj/item/I in component_parts)
I.loc = src.loc
diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm
index d08c5dd559..6a7da80d04 100644
--- a/code/modules/power/port_gen.dm
+++ b/code/modules/power/port_gen.dm
@@ -272,7 +272,7 @@
else
disconnect_from_network()
to_chat(user, "You unsecure the generator from the floor.")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
anchored = !anchored
return
else if(default_deconstruction_screwdriver(user, O))
diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm
index 6478ff999a..996847b13b 100644
--- a/code/modules/power/singularity/containment_field.dm
+++ b/code/modules/power/singularity/containment_field.dm
@@ -10,12 +10,15 @@
unacidable = 1
use_power = USE_POWER_OFF
light_range = 4
- flags = PROXMOVE
var/obj/machinery/field_generator/FG1 = null
var/obj/machinery/field_generator/FG2 = null
var/hasShocked = 0 //Used to add a delay between shocks. In some cases this used to crash servers by spawning hundreds of sparks every second.
+/obj/machinery/containment_field/Initialize()
+ sense_proximity(callback = .HasProximity)
+
/obj/machinery/containment_field/Destroy()
+ unsense_proximity(callback = .HasProximity)
if(FG1 && !FG1.clean_up)
FG1.cleanup()
if(FG2 && !FG2.clean_up)
@@ -33,7 +36,7 @@
/obj/machinery/containment_field/ex_act(severity)
return 0
-/obj/machinery/containment_field/HasProximity(atom/movable/AM as mob|obj)
+/obj/machinery/containment_field/HasProximity(turf/T, atom/movable/AM, old_loc)
if(istype(AM,/mob/living/silicon) && prob(40))
shock(AM)
return 1
@@ -42,8 +45,6 @@
return 1
return 0
-
-
/obj/machinery/containment_field/shock(mob/living/user as mob)
if(hasShocked)
return 0
diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm
index 3b381ff2f0..ea8b5cd230 100644
--- a/code/modules/power/singularity/emitter.dm
+++ b/code/modules/power/singularity/emitter.dm
@@ -134,7 +134,7 @@
var/burst_time = (min_burst_delay + max_burst_delay)/2 + 2*(burst_shots-1)
var/power_per_shot = active_power_usage * (burst_time/10) / burst_shots
- playsound(src.loc, 'sound/weapons/emitter.ogg', 25, 1)
+ playsound(src, 'sound/weapons/emitter.ogg', 25, 1)
if(prob(35))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
@@ -181,7 +181,7 @@
to_chat(user, "\The [src] needs to be wrenched to the floor.")
if(1)
if (WT.remove_fuel(0,user))
- playsound(loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
user.visible_message("[user.name] starts to weld [src] to the floor.", \
"You start to weld [src] to the floor.", \
"You hear welding")
@@ -194,7 +194,7 @@
to_chat(user, "You need more welding fuel to complete this task.")
if(2)
if (WT.remove_fuel(0,user))
- playsound(loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
user.visible_message("[user.name] starts to cut [src] free from the floor.", \
"You start to cut [src] free from the floor.", \
"You hear welding")
diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm
index b02c835785..3917e68793 100644
--- a/code/modules/power/singularity/field_generator.dm
+++ b/code/modules/power/singularity/field_generator.dm
@@ -130,7 +130,7 @@ field_generator power level display
return
if(1)
if (WT.remove_fuel(0,user))
- playsound(loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
user.visible_message("[user.name] starts to weld the [src.name] to the floor.", \
"You start to weld the [src] to the floor.", \
"You hear welding")
@@ -142,7 +142,7 @@ field_generator power level display
return
if(2)
if (WT.remove_fuel(0,user))
- playsound(loc, WT.usesound, 50, 1)
+ playsound(src, WT.usesound, 50, 1)
user.visible_message("[user.name] starts to cut the [src.name] free from the floor.", \
"You start to cut the [src] free from the floor.", \
"You hear welding")
diff --git a/code/modules/power/singularity/generator.dm b/code/modules/power/singularity/generator.dm
index bb470811ba..213b37d01a 100644
--- a/code/modules/power/singularity/generator.dm
+++ b/code/modules/power/singularity/generator.dm
@@ -31,12 +31,12 @@
return
if(W.is_screwdriver())
panel_open = !panel_open
- playsound(loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
visible_message("\The [user] adjusts \the [src]'s mechanisms.")
if(panel_open && do_after(user, 30))
to_chat(user, "\The [src] looks like it could be modified.")
if(panel_open && do_after(user, 80 * W.toolspeed)) // We don't have skills, so a delayed hint for engineers will have to do for now. (Panel open check for sanity)
- playsound(loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
to_chat(user, "\The [src] looks like it could be adapted to forge advanced materials via particle acceleration, somehow..")
else
to_chat(user, "\The [src]'s mechanisms look secure.")
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index 10424cee18..c878de0b41 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -321,7 +321,7 @@
to_chat(user, "You must remove the floor plating first.")
else
to_chat(user, "You begin to cut the cables...")
- playsound(get_turf(src), 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 50 * W.toolspeed))
if (prob(50) && electrocute_mob(usr, term.powernet, term))
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
diff --git a/code/modules/power/smes_construction.dm b/code/modules/power/smes_construction.dm
index a43bf079c8..f8bf16087e 100644
--- a/code/modules/power/smes_construction.dm
+++ b/code/modules/power/smes_construction.dm
@@ -333,7 +333,7 @@
to_chat(user, "You have to disassemble the terminal first!")
return
- playsound(get_turf(src), W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
to_chat(user, "You begin to disassemble the [src]!")
if (do_after(usr, (100 * cur_coils) * W.toolspeed)) // More coils = takes longer to disassemble. It's complex so largest one with 5 coils will take 50s with a normal crowbar
diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm
index 65e618613c..5eadfb7d07 100644
--- a/code/modules/power/solar.dm
+++ b/code/modules/power/solar.dm
@@ -65,14 +65,14 @@ GLOBAL_LIST_EMPTY(solars_list)
/obj/machinery/power/solar/attackby(obj/item/weapon/W, mob/user)
if(W.is_crowbar())
- playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] begins to take the glass off the solar panel.")
if(do_after(user, 50))
var/obj/item/solar_assembly/S = locate() in src
if(S)
S.loc = src.loc
S.give_glass()
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("[user] takes the glass off the solar panel.")
qdel(src)
return
@@ -247,7 +247,7 @@ GLOBAL_LIST_EMPTY(solars_list)
var/obj/item/stack/material/S = W
if(S.use(2))
glass_type = W.type
- playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] places the glass on the solar assembly.")
if(tracker)
new /obj/machinery/power/tracker(get_turf(src), src)
diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm
index ab54a82957..28835d7fdd 100644
--- a/code/modules/power/tesla/coil.dm
+++ b/code/modules/power/tesla/coil.dm
@@ -77,7 +77,7 @@
var/power_produced = powernet ? power / power_loss : power
add_avail(power_produced*input_power_multiplier)
flick("coilhit", src)
- playsound(src.loc, 'sound/effects/lightningshock.ogg', 100, 1, extrarange = 5)
+ playsound(src, 'sound/effects/lightningshock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 5, power_produced)
//addtimer(CALLBACK(src, .proc/reset_shocked), 10)
spawn(10) reset_shocked()
@@ -92,7 +92,7 @@
coeff = max(coeff, 10)
var/power = (powernet.avail/2)
draw_power(power)
- playsound(src.loc, 'sound/effects/lightningshock.ogg', 100, 1, extrarange = 5)
+ playsound(src, 'sound/effects/lightningshock.ogg', 100, 1, extrarange = 5)
tesla_zap(src, 10, power/(coeff/2))
//TFF 3/6/19 - Port Cit RP fix for infinite frames
diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm
index ce09621b7a..2f0418b60d 100644
--- a/code/modules/power/tesla/energy_ball.dm
+++ b/code/modules/power/tesla/energy_ball.dm
@@ -60,7 +60,7 @@
move_the_basket_ball(max(wait - 5, 4 + orbiting_balls.len * 1.5))
- playsound(src.loc, 'sound/effects/lightningbolt.ogg', 100, 1, extrarange = 30)
+ playsound(src, 'sound/effects/lightningbolt.ogg', 100, 1, extrarange = 30)
set_dir(tesla_zap(src.loc, 7, TESLA_DEFAULT_POWER, TRUE))
@@ -101,7 +101,7 @@
energy_to_lower = energy_to_raise - 20
energy_to_raise = energy_to_raise * 1.25
- playsound(src.loc, 'sound/effects/lightning_chargeup.ogg', 100, 1, extrarange = 30)
+ playsound(src, 'sound/effects/lightning_chargeup.ogg', 100, 1, extrarange = 30)
//addtimer(CALLBACK(src, .proc/new_mini_ball), 100)
spawn(100) new_mini_ball()
diff --git a/code/modules/power/tracker.dm b/code/modules/power/tracker.dm
index 673b2ece86..0e2cc7cbf8 100644
--- a/code/modules/power/tracker.dm
+++ b/code/modules/power/tracker.dm
@@ -60,14 +60,14 @@
/obj/machinery/power/tracker/attackby(var/obj/item/weapon/W, var/mob/user)
if(W.is_crowbar())
- playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
+ playsound(src, 'sound/machines/click.ogg', 50, 1)
user.visible_message("[user] begins to take the glass off the solar tracker.")
if(do_after(user, 50))
var/obj/item/solar_assembly/S = locate() in src
if(S)
S.loc = src.loc
S.give_glass()
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
user.visible_message("[user] takes the glass off the tracker.")
qdel(src)
return
diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm
index b07cacd92b..fcd6e6678f 100644
--- a/code/modules/projectiles/ammunition.dm
+++ b/code/modules/projectiles/ammunition.dm
@@ -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, "[src] is already empty!")
return
to_chat(user, "You empty [src].")
- 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))
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index fc1b6c7e22..a21f5358ad 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -493,7 +493,7 @@
user.visible_message("*click click*", "*click*")
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... >.>
diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm
index a12ceb38f5..39d366d8ac 100644
--- a/code/modules/projectiles/guns/energy.dm
+++ b/code/modules/projectiles/guns/energy.dm
@@ -127,7 +127,7 @@
power_supply = P
P.loc = src
user.visible_message("[user] inserts [P] into [src].", "You insert [P] into [src].")
- 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].", "You remove [power_supply] from [src].")
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
diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm
index f47053cba0..e5d43ca526 100644
--- a/code/modules/projectiles/guns/energy/special.dm
+++ b/code/modules/projectiles/guns/energy/special.dm
@@ -150,7 +150,7 @@
user.visible_message("*fizzle*", "*fizzle*")
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"
diff --git a/code/modules/projectiles/guns/launcher/grenade_launcher.dm b/code/modules/projectiles/guns/launcher/grenade_launcher.dm
index 259d5e2e82..5f33557727 100644
--- a/code/modules/projectiles/guns/launcher/grenade_launcher.dm
+++ b/code/modules/projectiles/guns/launcher/grenade_launcher.dm
@@ -61,7 +61,7 @@
grenades.len--
user.put_in_hands(G)
user.visible_message("[user] removes \a [G] from [src].", "You remove \a [G] from [src].")
- playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
+ playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
to_chat(user, "[src] is empty.")
@@ -119,7 +119,7 @@
if(chambered)
user.put_in_hands(chambered)
user.visible_message("[user] removes \a [chambered] from [src].", "You remove \a [chambered] from [src].")
- playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
+ playsound(src, 'sound/weapons/empty.ogg', 50, 1)
chambered = null
else
to_chat(user, "[src] is empty.")
\ No newline at end of file
diff --git a/code/modules/projectiles/guns/launcher/pneumatic.dm b/code/modules/projectiles/guns/launcher/pneumatic.dm
index b8fe6c4e35..6a6bf73cb1 100644
--- a/code/modules/projectiles/guns/launcher/pneumatic.dm
+++ b/code/modules/projectiles/guns/launcher/pneumatic.dm
@@ -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].")
diff --git a/code/modules/projectiles/guns/launcher/syringe_gun.dm b/code/modules/projectiles/guns/launcher/syringe_gun.dm
index 17778ffae4..3d60e22405 100644
--- a/code/modules/projectiles/guns/launcher/syringe_gun.dm
+++ b/code/modules/projectiles/guns/launcher/syringe_gun.dm
@@ -30,7 +30,7 @@
/obj/item/weapon/syringe_cartridge/attack_self(mob/user)
if(syringe)
to_chat(user, "You remove [syringe] from [src].")
- 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].", "You unlatch and carefully relax the bolt on [src], unloading the spring.")
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.", "You draw back the bolt on the [src], loading the spring!")
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].", "You remove \a [C] from [src].")
- playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
+ playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
..()
diff --git a/code/modules/projectiles/guns/magnetic/bore.dm b/code/modules/projectiles/guns/magnetic/bore.dm
index 9d59dbbe1d..0594e2abb3 100644
--- a/code/modules/projectiles/guns/magnetic/bore.dm
+++ b/code/modules/projectiles/guns/magnetic/bore.dm
@@ -58,7 +58,7 @@
removing.forceMove(get_turf(src))
user.put_in_hands(removing)
user.visible_message("\The [user] removes \the [removing] from \the [src].")
- 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("\The [user] slots \the [cell] into \the [src].")
update_icon()
return
@@ -95,7 +95,7 @@
manipulator.forceMove(get_turf(src))
user.put_in_hands(manipulator)
user.visible_message("\The [user] levers \the [manipulator] from \the [src].")
- 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("\The [user] unscrews \the [capacitor] from \the [src].")
- 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("\The [user] slots \the [capacitor] into \the [src].")
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("\The [user] slots \the [manipulator] into \the [src].")
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("\The [user] loads \the [src] with \the [M].")
- playsound(loc, 'sound/weapons/flipblade.ogg', 50, 1)
+ playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
return
. = ..()
diff --git a/code/modules/projectiles/guns/magnetic/magnetic.dm b/code/modules/projectiles/guns/magnetic/magnetic.dm
index fe297d00b3..bbdcc29936 100644
--- a/code/modules/projectiles/guns/magnetic/magnetic.dm
+++ b/code/modules/projectiles/guns/magnetic/magnetic.dm
@@ -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("\The [user] slots \the [cell] into \the [src].")
update_icon()
return
@@ -167,7 +167,7 @@
capacitor.forceMove(get_turf(src))
user.put_in_hands(capacitor)
user.visible_message("\The [user] unscrews \the [capacitor] from \the [src].")
- 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("\The [user] slots \the [capacitor] into \the [src].")
update_icon()
@@ -203,7 +203,7 @@
ammo.use(1)
user.visible_message("\The [user] loads \the [src] with \the [loaded].")
- 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("\The [user] removes \the [removing] from \the [src].")
- 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("\The [src]'s power supply begins to overload as the device crumples!") //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)
diff --git a/code/modules/projectiles/guns/magnetic/magnetic_construction.dm b/code/modules/projectiles/guns/magnetic/magnetic_construction.dm
index 637f2460a6..7745c9c623 100644
--- a/code/modules/projectiles/guns/magnetic/magnetic_construction.dm
+++ b/code/modules/projectiles/guns/magnetic/magnetic_construction.dm
@@ -45,7 +45,7 @@
return
user.visible_message("\The [user] welds the barrel of \the [src] into place.")
- 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("\The [user] secures \the [src] and finishes it off.")
- 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
diff --git a/code/modules/projectiles/guns/modular_guns.dm b/code/modules/projectiles/guns/modular_guns.dm
index 38e2ed1a93..4eb990c0ca 100644
--- a/code/modules/projectiles/guns/modular_guns.dm
+++ b/code/modules/projectiles/guns/modular_guns.dm
@@ -142,7 +142,7 @@
power_supply = P
P.loc = src
user.visible_message("[user] inserts [P] into [src].", "You insert [P] into [src].")
- playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
+ playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
update_icon()
update_held_icon()
return
diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm
index d0d321b299..7f93579230 100644
--- a/code/modules/projectiles/guns/projectile.dm
+++ b/code/modules/projectiles/guns/projectile.dm
@@ -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].", "You insert [AM] into [src].")
- 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, "[src] is full!")
@@ -133,7 +133,7 @@
count++
if(count)
user.visible_message("[user] reloads [src].", "You load [count] round\s into [src].")
- 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].", "You insert \a [C] into [src].")
- 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].", "You remove [ammo_magazine] from [src].")
- 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].", "You remove \a [C] from [src].")
- playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
+ playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
to_chat(user, "[src] is empty.")
update_icon()
@@ -224,7 +224,7 @@
"[ammo_magazine] falls out and clatters on the floor!"
)
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
diff --git a/code/modules/projectiles/guns/projectile/boltaction.dm b/code/modules/projectiles/guns/projectile/boltaction.dm
index 0555fb31de..15571e53c7 100644
--- a/code/modules/projectiles/guns/projectile/boltaction.dm
+++ b/code/modules/projectiles/guns/projectile/boltaction.dm
@@ -30,7 +30,7 @@
to_chat(user, "You begin to shorten the barrel and stock of \the [src].")
if(loaded.len)
afterattack(user, user)
- playsound(user, fire_sound, 50, 1)
+ playsound(src, fire_sound, 50, 1)
user.visible_message("[src] goes off!", "The rifle goes off in your face!")
return
if(do_after(user, 30))
diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm
index e407703498..3b9431c938 100644
--- a/code/modules/projectiles/guns/projectile/revolver.dm
+++ b/code/modules/projectiles/guns/projectile/revolver.dm
@@ -19,7 +19,7 @@
chamber_offset = 0
visible_message("\The [usr] spins the cylinder of \the [src]!", \
"You hear something metallic spin and click.")
- 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("\The [usr] spins the cylinder of \the [src]!", \
"You hear something metallic spin and click.")
- 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)
diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm
index 9862b71b06..e091552859 100644
--- a/code/modules/projectiles/guns/projectile/shotgun.dm
+++ b/code/modules/projectiles/guns/projectile/shotgun.dm
@@ -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
diff --git a/code/modules/projectiles/guns/projectile/sniper.dm b/code/modules/projectiles/guns/projectile/sniper.dm
index 343384f290..074917a5df 100644
--- a/code/modules/projectiles/guns/projectile/sniper.dm
+++ b/code/modules/projectiles/guns/projectile/sniper.dm
@@ -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)
diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm
index 47e9c5f6d6..8a03ec8347 100644
--- a/code/modules/projectiles/projectile.dm
+++ b/code/modules/projectiles/projectile.dm
@@ -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)
diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm
index 3d7dca8d19..71081664f7 100644
--- a/code/modules/projectiles/projectile/energy.dm
+++ b/code/modules/projectiles/projectile/energy.dm
@@ -195,7 +195,7 @@
/obj/item/projectile/energy/plasmastun/proc/bang(var/mob/living/carbon/M)
to_chat(M, "You hear a loud roar.")
- 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)
diff --git a/code/modules/projectiles/projectile/hook.dm b/code/modules/projectiles/projectile/hook.dm
index ad02dee8cf..ee5fd6c471 100644
--- a/code/modules/projectiles/projectile/hook.dm
+++ b/code/modules/projectiles/projectile/hook.dm
@@ -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("\The [src] has pushed [H]!")
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("\The [src] has disarmed [H]!")
- 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("\The [src] [message] [target].")
done_mob_unique = TRUE
success = TRUE
diff --git a/code/modules/projectiles/projectile/magnetic.dm b/code/modules/projectiles/projectile/magnetic.dm
index dc147597b2..c4e0ab5e9d 100644
--- a/code/modules/projectiles/projectile/magnetic.dm
+++ b/code/modules/projectiles/projectile/magnetic.dm
@@ -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("The [src] burns a perfect hole through \the [target] with a blinding flash!")
- 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()
diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm
index ac039460cb..9c06241ecf 100644
--- a/code/modules/projectiles/projectile/special.dm
+++ b/code/modules/projectiles/projectile/special.dm
@@ -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))\
diff --git a/code/modules/projectiles/targeting/targeting_overlay.dm b/code/modules/projectiles/targeting/targeting_overlay.dm
index 9bce28831f..a7d069fad4 100644
--- a/code/modules/projectiles/targeting/targeting_overlay.dm
+++ b/code/modules/projectiles/targeting/targeting_overlay.dm
@@ -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("\The [owner] lowers \the [aiming_with].")
diff --git a/code/modules/random_map/drop/droppod_doors.dm b/code/modules/random_map/drop/droppod_doors.dm
index 7c7075f45f..c472a9f1f9 100644
--- a/code/modules/random_map/drop/droppod_doors.dm
+++ b/code/modules/random_map/drop/droppod_doors.dm
@@ -35,7 +35,7 @@
deployed = 1
visible_message("The explosive bolts on \the [src] detonate, throwing it open!")
- playsound(src.loc, 'sound/effects/bang.ogg', 50, 1, 5)
+ playsound(src, 'sound/effects/bang.ogg', 50, 1, 5)
// This is shit but it will do for the sake of testing.
for(var/obj/structure/droppod_door/D in orange(1,src))
diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm
index 499417244d..02d52626f5 100644
--- a/code/modules/reagents/Chemistry-Machinery.dm
+++ b/code/modules/reagents/Chemistry-Machinery.dm
@@ -542,7 +542,7 @@
if (!beaker || (beaker && beaker.reagents.total_volume >= beaker.reagents.maximum_volume))
return
- playsound(src.loc, 'sound/machines/blender.ogg', 50, 1)
+ playsound(src, 'sound/machines/blender.ogg', 50, 1)
inuse = 1
// Reset the machine.
diff --git a/code/modules/reagents/dispenser/dispenser2.dm b/code/modules/reagents/dispenser/dispenser2.dm
index 69577da357..b859e419bd 100644
--- a/code/modules/reagents/dispenser/dispenser2.dm
+++ b/code/modules/reagents/dispenser/dispenser2.dm
@@ -160,7 +160,7 @@
var/label = href_list["dispense"]
if(cartridges[label] && container && container.is_open_container())
var/obj/item/weapon/reagent_containers/chem_disp_cartridge/C = cartridges[label]
- playsound(src.loc, 'sound/machines/reagent_dispense.ogg', 25, 1)
+ playsound(src, 'sound/machines/reagent_dispense.ogg', 25, 1)
C.reagents.trans_to(container, amount)
else if(href_list["ejectBeaker"])
diff --git a/code/modules/reagents/reagent_containers/borghydro.dm b/code/modules/reagents/reagent_containers/borghydro.dm
index d1a63ac41b..a08ea1b19b 100644
--- a/code/modules/reagents/reagent_containers/borghydro.dm
+++ b/code/modules/reagents/reagent_containers/borghydro.dm
@@ -110,7 +110,7 @@
if(href_list["reagent"])
var/t = reagent_ids.Find(href_list["reagent"])
if(t)
- playsound(loc, 'sound/effects/pop.ogg', 50, 0)
+ playsound(src, 'sound/effects/pop.ogg', 50, 0)
mode = t
var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]]
to_chat(usr, "Synthesizer is now producing '[R.name]'.")
diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm
index fec6f83de5..b57dbd0841 100644
--- a/code/modules/reagents/reagent_containers/glass.dm
+++ b/code/modules/reagents/reagent_containers/glass.dm
@@ -295,7 +295,7 @@
else
reagents.trans_to_obj(D, 5)
to_chat(user, "You wet \the [D] in \the [src].")
- playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
+ playsound(src, 'sound/effects/slosh.ogg', 25, 1)
else
return ..()
@@ -336,7 +336,7 @@ obj/item/weapon/reagent_containers/glass/bucket/wood
else
reagents.trans_to_obj(D, 5)
to_chat(user, "You wet \the [D] in \the [src].")
- playsound(loc, 'sound/effects/slosh.ogg', 25, 1)
+ playsound(src, 'sound/effects/slosh.ogg', 25, 1)
return
else
return ..()
diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm
index d49645d4b3..f18ab442ef 100644
--- a/code/modules/reagents/reagent_containers/hypospray.dm
+++ b/code/modules/reagents/reagent_containers/hypospray.dm
@@ -98,7 +98,7 @@
loaded_vial = null
to_chat(user, "You remove the vial from the [src].")
update_icon()
- playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
+ playsound(src, 'sound/weapons/flipblade.ogg', 50, 1)
return
..()
else
@@ -120,7 +120,7 @@
loaded_vial.reagents.trans_to_holder(reagents,volume)
user.visible_message("[user] has loaded [W] into \the [src].","You have loaded [W] into \the [src].")
update_icon()
- playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
+ playsound(src, 'sound/weapons/empty.ogg', 50, 1)
else
to_chat(user, "\The [src] already has a vial.")
else
diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm
index 1aece5b845..2a89067e8a 100644
--- a/code/modules/reagents/reagent_containers/spray.dm
+++ b/code/modules/reagents/reagent_containers/spray.dm
@@ -55,7 +55,7 @@
return
/obj/item/weapon/reagent_containers/spray/proc/Spray_at(atom/A as mob|obj, mob/user as mob, proximity)
- playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1, -6)
+ playsound(src, 'sound/effects/spray2.ogg', 50, 1, -6)
if (A.density && proximity)
A.visible_message("[usr] sprays [A] with [src].")
reagents.splash(A, amount_per_transfer_from_this)
diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm
index b4b230a8b6..eb792fda70 100644
--- a/code/modules/reagents/reagent_dispenser.dm
+++ b/code/modules/reagents/reagent_dispenser.dm
@@ -253,7 +253,7 @@
if(I.is_wrench())
src.add_fingerprint(user)
if(bottle)
- playsound(loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
if(do_after(user, 20) && bottle)
to_chat(user, "You unfasten the jug.")
var/obj/item/weapon/reagent_containers/glass/cooler_bottle/G = new /obj/item/weapon/reagent_containers/glass/cooler_bottle( src.loc )
@@ -272,12 +272,12 @@
if(!src) return
to_chat(user, "You [anchored? "un" : ""]secured \the [src]!")
anchored = !anchored
- playsound(loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
return
if(I.is_screwdriver())
if(cupholder)
- playsound(loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
to_chat(user, "You take the cup dispenser off.")
new /obj/item/stack/material/plastic( src.loc )
if(cups)
@@ -288,7 +288,7 @@
update_icon()
return
if(!bottle && !cupholder)
- playsound(loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
to_chat(user, "You start taking the water-cooler apart.")
if(do_after(user, 20 * I.toolspeed) && !bottle && !cupholder)
to_chat(user, "You take the water-cooler apart.")
@@ -322,7 +322,7 @@
var/obj/item/stack/material/plastic/P = I
src.add_fingerprint(user)
to_chat(user, "You start to attach a cup dispenser onto the water-cooler.")
- playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
+ playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
if(do_after(user, 20) && !cupholder && anchored)
if (P.use(1))
to_chat(user, "You attach a cup dispenser onto the water-cooler.")
diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm
index e9d4e4227d..656723942f 100644
--- a/code/modules/recycling/disposal-construction.dm
+++ b/code/modules/recycling/disposal-construction.dm
@@ -281,7 +281,7 @@
else
density = 1 // We don't want disposal bins or outlets to go density 0
to_chat(user, "You attach the [nicetype] to the underfloor.")
- playsound(loc, I.usesound, 100, 1)
+ playsound(src, I.usesound, 100, 1)
update()
// weldingtool: convert to real pipe
diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm
index f3dd0fa384..e8eaa809fe 100644
--- a/code/modules/recycling/disposal.dm
+++ b/code/modules/recycling/disposal.dm
@@ -639,7 +639,7 @@
for (var/mob/M in hearers(src.loc.loc))
to_chat(M, "CLONG, clong!")
- playsound(src.loc, 'sound/effects/clang.ogg', 50, 0, 0)
+ playsound(src, 'sound/effects/clang.ogg', 50, 0, 0)
// called to vent all gas in holder to a location
proc/vent_gas(var/atom/location)
@@ -1169,7 +1169,7 @@
if(O.currTag)// Tag set
sort_tag = O.currTag
- playsound(src.loc, 'sound/machines/twobeep.ogg', 100, 1)
+ playsound(src, 'sound/machines/twobeep.ogg', 100, 1)
to_chat(user, "Changed tag to '[sort_tag]'.")
updatename()
updatedesc()
@@ -1237,7 +1237,7 @@
if(O.currTag)// Tag set
sortType = O.currTag
- playsound(src.loc, 'sound/machines/twobeep.ogg', 100, 1)
+ playsound(src, 'sound/machines/twobeep.ogg', 100, 1)
to_chat(user, "Changed filter to '[sortType]'.")
updatename()
updatedesc()
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index 767bf2c8b9..f088621f5e 100755
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -18,7 +18,7 @@
unwrap()
proc/unwrap()
- playsound(loc, 'sound/items/package_unwrap.ogg', 50, 1)
+ playsound(src, 'sound/items/package_unwrap.ogg', 50, 1)
// Destroy will drop our wrapped object on the turf, so let it.
qdel(src)
@@ -33,7 +33,7 @@
update_icon()
else
src.sortTag = O.currTag
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
else
to_chat(user, "The package is already labeled for [O.currTag].")
else
@@ -143,7 +143,7 @@
update_icon()
else
src.sortTag = O.currTag
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
else
to_chat(user, "The package is already labeled for [O.currTag].")
else
@@ -273,7 +273,7 @@
user.visible_message("\The [user] wraps \a [target] with \a [src].",\
"You wrap \the [target], leaving [amount] units of paper on \the [src].",\
"You hear someone taping paper around a small object.")
- playsound(loc, 'sound/items/package_wrap.ogg', 50, 1)
+ playsound(src, 'sound/items/package_wrap.ogg', 50, 1)
else if (istype(target, /obj/structure/closet/crate))
var/obj/structure/closet/crate/O = target
if (src.amount > 3 && !O.opened)
@@ -285,7 +285,7 @@
user.visible_message("\The [user] wraps \a [target] with \a [src].",\
"You wrap \the [target], leaving [amount] units of paper on \the [src].",\
"You hear someone taping paper around a large object.")
- playsound(loc, 'sound/items/package_wrap.ogg', 50, 1)
+ playsound(src, 'sound/items/package_wrap.ogg', 50, 1)
else if(src.amount < 3)
to_chat(user, "You need more paper.")
else if (istype (target, /obj/structure/closet))
@@ -299,7 +299,7 @@
user.visible_message("\The [user] wraps \a [target] with \a [src].",\
"You wrap \the [target], leaving [amount] units of paper on \the [src].",\
"You hear someone taping paper around a large object.")
- playsound(loc, 'sound/items/package_wrap.ogg', 50, 1)
+ playsound(src, 'sound/items/package_wrap.ogg', 50, 1)
else if(src.amount < 3)
to_chat(user, "You need more paper.")
else
@@ -432,18 +432,18 @@
if(I.is_screwdriver())
if(c_mode==0)
c_mode=1
- playsound(src.loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
to_chat(user, "You remove the screws around the power connection.")
return
else if(c_mode==1)
c_mode=0
- playsound(src.loc, I.usesound, 50, 1)
+ playsound(src, I.usesound, 50, 1)
to_chat(user, "You attach the screws around the power connection.")
return
else if(istype(I, /obj/item/weapon/weldingtool) && c_mode==1)
var/obj/item/weapon/weldingtool/W = I
if(W.remove_fuel(0,user))
- playsound(src.loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
to_chat(user, "You start slicing the floorweld off the delivery chute.")
if(do_after(user,20 * W.toolspeed))
if(!src || !W.isOn()) return
diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm
index ebe09e3a98..bbcda60927 100644
--- a/code/modules/research/message_server.dm
+++ b/code/modules/research/message_server.dm
@@ -129,12 +129,12 @@ var/global/list/obj/machinery/message_server/message_servers = list()
switch(priority)
if(2)
if(!Console.silent)
- playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
+ playsound(Console, 'sound/machines/twobeep.ogg', 50, 1)
Console.audible_message(text("[bicon(Console)] *The Requests Console beeps: 'PRIORITY Alert in [sender]'"),,5)
Console.message_log += "High Priority message from [sender]
[authmsg]"
else
if(!Console.silent)
- playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
+ playsound(Console, 'sound/machines/twobeep.ogg', 50, 1)
Console.audible_message(text("[bicon(Console)] *The Requests Console beeps: 'Message from [sender]'"),,4)
Console.message_log += "Message from [sender]
[authmsg]"
Console.set_light(2)
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index db70d08863..41510d0545 100755
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -147,7 +147,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
/obj/machinery/computer/rdconsole/emp_act(var/remaining_charges, var/mob/user)
if(!emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
to_chat(user, "You you disable the security protocols.")
return 1
diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm
index 3227e1528d..1c9a142998 100644
--- a/code/modules/research/server.dm
+++ b/code/modules/research/server.dm
@@ -290,7 +290,7 @@
/obj/machinery/computer/rdservercontrol/emag_act(var/remaining_charges, var/mob/user)
if(!emagged)
- playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1)
+ playsound(src, 'sound/effects/sparks4.ogg', 75, 1)
emagged = 1
to_chat(user, "You you disable the security protocols.")
src.updateUsrDialog()
diff --git a/code/modules/shieldgen/directional_shield.dm b/code/modules/shieldgen/directional_shield.dm
index 818b78a21e..d3d943297a 100644
--- a/code/modules/shieldgen/directional_shield.dm
+++ b/code/modules/shieldgen/directional_shield.dm
@@ -67,7 +67,7 @@
/obj/effect/directional_shield/bullet_act(var/obj/item/projectile/P)
adjust_health(-P.get_structure_damage())
P.on_hit()
- playsound(get_turf(src), 'sound/effects/EMPulse.ogg', 75, 1)
+ playsound(src, 'sound/effects/EMPulse.ogg', 75, 1)
// All the shields tied to their projector are one 'unit', and don't have individualized health values like most other shields.
/obj/effect/directional_shield/proc/adjust_health(amount)
@@ -97,17 +97,22 @@
var/high_color = "#0099FF" // Color the shield will be when at max health. A light blue.
var/low_color = "#FF0000" // Color the shield will drift towards as health is lowered. Deep red.
-/obj/item/shield_projector/New()
+/obj/item/shield_projector/Initialize()
START_PROCESSING(SSobj, src)
if(always_on)
create_shields()
+ GLOB.moved_event.register(src, src, .proc/moved_event)
..()
/obj/item/shield_projector/Destroy()
destroy_shields()
STOP_PROCESSING(SSobj, src)
+ GLOB.moved_event.unregister(src, src, .proc/moved_event)
return ..()
+/obj/item/shield_projector/proc/moved_event()
+ update_shield_positions()
+
/obj/item/shield_projector/proc/create_shield(var/newloc, var/new_dir)
var/obj/effect/directional_shield/S = new(newloc, src)
S.dir = new_dir
@@ -139,12 +144,12 @@
destroy_shields()
var/turf/T = get_turf(src)
T.visible_message("\The [src] overloads and the shield vanishes!")
- playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 75, 0)
+ playsound(src, 'sound/machines/defib_failed.ogg', 75, 0)
else
if(shield_health < max_shield_health / 4) // Play a more urgent sounding beep if it's at 25% health.
- playsound(get_turf(src), 'sound/machines/defib_success.ogg', 75, 0)
+ playsound(src, 'sound/machines/defib_success.ogg', 75, 0)
else
- playsound(get_turf(src), 'sound/machines/defib_SafetyOn.ogg', 75, 0)
+ playsound(src, 'sound/machines/defib_SafetyOn.ogg', 75, 0)
last_damaged_time = world.time
update_shield_colors()
@@ -198,9 +203,9 @@
if(always_on && !active) // Make shields as soon as possible if this is set.
create_shields()
if(shield_health == max_shield_health)
- playsound(get_turf(src), 'sound/machines/defib_ready.ogg', 75, 0)
+ playsound(src, 'sound/machines/defib_ready.ogg', 75, 0)
else
- playsound(get_turf(src), 'sound/machines/defib_safetyOff.ogg', 75, 0)
+ playsound(src, 'sound/machines/defib_safetyOff.ogg', 75, 0)
/obj/item/shield_projector/examine(var/mob/user)
. = ..()
@@ -210,14 +215,6 @@
/obj/item/shield_projector/emp_act(var/severity)
adjust_health(-max_shield_health / severity) // A strong EMP will kill the shield instantly, but weaker ones won't on the first hit.
-/obj/item/shield_projector/Move(var/newloc, var/direct)
- ..(newloc, direct)
- update_shield_positions()
-
-/obj/item/shield_projector/on_loc_moved(atom/oldloc)
- update_shield_positions()
-
-
// Subtypes
/obj/item/shield_projector/rectangle
diff --git a/code/modules/shieldgen/emergency_shield.dm b/code/modules/shieldgen/emergency_shield.dm
index 21e244cc36..4920ffb513 100644
--- a/code/modules/shieldgen/emergency_shield.dm
+++ b/code/modules/shieldgen/emergency_shield.dm
@@ -48,7 +48,7 @@
src.health -= aforce
//Play a fitting sound
- playsound(src.loc, 'sound/effects/EMPulse.ogg', 75, 1)
+ playsound(src, 'sound/effects/EMPulse.ogg', 75, 1)
check_failure()
set_opacity(1)
@@ -105,7 +105,7 @@
src.health -= tforce
//This seemed to be the best sound for hitting a force field.
- playsound(src.loc, 'sound/effects/EMPulse.ogg', 100, 1)
+ playsound(src, 'sound/effects/EMPulse.ogg', 100, 1)
check_failure()
diff --git a/code/modules/shuttles/shuttle_emergency.dm b/code/modules/shuttles/shuttle_emergency.dm
index 3e9d470826..eb6c0a2620 100644
--- a/code/modules/shuttles/shuttle_emergency.dm
+++ b/code/modules/shuttles/shuttle_emergency.dm
@@ -146,16 +146,16 @@
if (dna_hash in authorized)
src.visible_message("\The [src] buzzes. That ID has already been scanned.")
- playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
+ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
return 0
if (!(access_heads in access))
src.visible_message("\The [src] buzzes, rejecting [ident].")
- playsound(src.loc, 'sound/machines/deniedbeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/deniedbeep.ogg', 50, 0)
return 0
src.visible_message("\The [src] beeps as it scans [ident].")
- playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
+ playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
authorized[dna_hash] = auth_name
if (req_authorizations - authorized.len)
to_chat(world, "Alert: [req_authorizations - authorized.len] authorization\s needed to override the shuttle autopilot.") //TODO- Belsima, make this an announcement instead of magic.
diff --git a/code/modules/spells/aoe_turf/conjure/conjure.dm b/code/modules/spells/aoe_turf/conjure/conjure.dm
index 9e02cf9513..e9874ccc12 100644
--- a/code/modules/spells/aoe_turf/conjure/conjure.dm
+++ b/code/modules/spells/aoe_turf/conjure/conjure.dm
@@ -25,7 +25,7 @@ How they spawn stuff is decided by behaviour vars, which are explained below
cast_sound = 'sound/items/welder.ogg'
/spell/aoe_turf/conjure/cast(list/targets, mob/user)
- playsound(get_turf(user), cast_sound, 50, 1)
+ playsound(user, cast_sound, 50, 1)
for(var/i=1,i <= summon_amt,i++)
if(!targets.len)
diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm
index 01b5bb276b..d617cdee61 100644
--- a/code/modules/surgery/implant.dm
+++ b/code/modules/surgery/implant.dm
@@ -239,6 +239,6 @@
if (prob(fail_prob))
var/obj/item/weapon/implant/imp = affected.implants[1]
user.visible_message(" Something beeps inside [target]'s [affected.name]!")
- playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3)
+ playsound(imp, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
imp.activate()
diff --git a/code/modules/tables/interactions.dm b/code/modules/tables/interactions.dm
index 5d6691027f..fee9550cbe 100644
--- a/code/modules/tables/interactions.dm
+++ b/code/modules/tables/interactions.dm
@@ -90,9 +90,9 @@
M.apply_damage(8,def_zone = BP_HEAD)
visible_message("[G.assailant] slams [G.affecting]'s face against \the [src]!")
if(material)
- playsound(loc, material.tableslam_noise, 50, 1)
+ playsound(src, material.tableslam_noise, 50, 1)
else
- playsound(loc, 'sound/weapons/tablehit1.ogg', 50, 1)
+ playsound(src, 'sound/weapons/tablehit1.ogg', 50, 1)
var/list/L = take_damage(rand(1,5))
// Shards. Extra damage, plus potentially the fact YOU LITERALLY HAVE A PIECE OF GLASS/METAL/WHATEVER IN YOUR FACE
for(var/obj/item/weapon/material/shard/S in L)
@@ -123,8 +123,8 @@
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
spark_system.start()
- playsound(src.loc, 'sound/weapons/blade1.ogg', 50, 1)
- playsound(src.loc, "sparks", 50, 1)
+ playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
+ playsound(src, "sparks", 50, 1)
user.visible_message("\The [src] was sliced apart by [user]!")
break_to_parts()
return
diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm
index a8e0939e26..9f08123b35 100644
--- a/code/modules/tables/tables.dm
+++ b/code/modules/tables/tables.dm
@@ -258,7 +258,7 @@
user.visible_message("\The [user] begins removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.",
"You begin removing the [type_holding] holding \the [src]'s [M.display_name] [what] in place.")
if(sound)
- playsound(src.loc, sound, 50, 1)
+ playsound(src, sound, 50, 1)
if(!do_after(user, delay))
manipulating = 0
return M
diff --git a/code/modules/turbolift/turbolift.dm b/code/modules/turbolift/turbolift.dm
index 46f201ab4f..1ca46cb77d 100644
--- a/code/modules/turbolift/turbolift.dm
+++ b/code/modules/turbolift/turbolift.dm
@@ -98,7 +98,7 @@
doors_closing = 0
open_doors()
control_panel_interior.audible_message("\The [current_floor.ext_panel] buzzes loudly.")
- playsound(control_panel_interior.loc, "sound/machines/buzz-two.ogg", 50, 1)
+ playsound(control_panel_interior, "sound/machines/buzz-two.ogg", 50, 1)
return 0
doors_closing = 0 // The doors weren't open, so they are done closing
@@ -107,7 +107,7 @@
if(target_floor == current_floor)
- playsound(control_panel_interior.loc, origin.arrival_sound, 50, 1)
+ playsound(control_panel_interior, origin.arrival_sound, 50, 1)
target_floor.arrived(src)
target_floor = null
diff --git a/code/modules/turbolift/turbolift_console.dm b/code/modules/turbolift/turbolift_console.dm
index 885741d891..0ed4310d95 100644
--- a/code/modules/turbolift/turbolift_console.dm
+++ b/code/modules/turbolift/turbolift_console.dm
@@ -96,7 +96,6 @@
desc = "A control panel for moving the elevator. There's a slot for swiping IDs to enable additional controls."
icon_state = "panel"
-
/obj/structure/lift/panel/attack_ghost(var/mob/user)
return interact(user)
diff --git a/code/modules/vehicles/construction.dm b/code/modules/vehicles/construction.dm
index 49021d5fd0..bb0ca7cb0b 100644
--- a/code/modules/vehicles/construction.dm
+++ b/code/modules/vehicles/construction.dm
@@ -130,10 +130,10 @@
if(7)
if(W.is_wrench() || W.is_screwdriver())
- playsound(loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
to_chat(user, "You begin your finishing touches on \the [src].")
if(do_after(user, 20) && build_stage == 7)
- playsound(loc, W.usesound, 30, 1)
+ playsound(src, W.usesound, 30, 1)
var/obj/vehicle/train/engine/quadbike/built/product = new(src)
to_chat(user, "You finish \the [product]")
product.loc = get_turf(src)
@@ -178,7 +178,7 @@
if(2)
if(W.is_screwdriver())
- playsound(loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
to_chat(user, "You close up \the [src].")
var/obj/vehicle/train/trolley/trailer/product = new(src)
product.loc = get_turf(src)
@@ -259,10 +259,10 @@
if(6)
if(W.is_wrench() || W.is_screwdriver())
- playsound(loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
to_chat(user, "You begin your finishing touches on \the [src].")
if(do_after(user, 20) && build_stage == 6)
- playsound(loc, W.usesound, 30, 1)
+ playsound(src, W.usesound, 30, 1)
var/obj/vehicle/bike/built/product = new(src)
to_chat(user, "You finish \the [product]")
product.loc = get_turf(src)
diff --git a/code/modules/virus2/centrifuge.dm b/code/modules/virus2/centrifuge.dm
index 433a26977b..36ec60e8cb 100644
--- a/code/modules/virus2/centrifuge.dm
+++ b/code/modules/virus2/centrifuge.dm
@@ -138,7 +138,7 @@
delay = delay/2
curing = round(delay)
- playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
+ playsound(src, 'sound/machines/juicer.ogg', 50, 1)
update_icon()
return 1
diff --git a/code/modules/xenoarcheaology/effects/vampire.dm b/code/modules/xenoarcheaology/effects/vampire.dm
index ee75ea5ba1..cf0ae9a246 100644
--- a/code/modules/xenoarcheaology/effects/vampire.dm
+++ b/code/modules/xenoarcheaology/effects/vampire.dm
@@ -12,7 +12,7 @@
/datum/artifact_effect/vampire/proc/bloodcall(var/mob/living/carbon/human/M)
last_bloodcall = world.time
if(istype(M))
- playsound(holder.loc, pick('sound/hallucinations/wail.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/far_noise.ogg'), 50, 1, -3)
+ playsound(holder, pick('sound/hallucinations/wail.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/far_noise.ogg'), 50, 1, -3)
var/target = pick(M.organs_by_name)
M.apply_damage(rand(5, 10), SEARING, target)
@@ -54,7 +54,7 @@
charges += 0.25
else
charges += 1
- playsound(holder.loc, 'sound/effects/splat.ogg', 50, 1, -3)
+ playsound(holder, 'sound/effects/splat.ogg', 50, 1, -3)
qdel(B)
@@ -68,7 +68,7 @@
charges -= 1
var/spawn_type = pick(/mob/living/simple_mob/animal/space/bats, /mob/living/simple_mob/creature, /mob/living/simple_mob/faithless)
new spawn_type(get_turf(pick(view(1,T))))
- playsound(holder.loc, pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 50, 1, -3)
+ playsound(holder, pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 50, 1, -3)
if(charges >= 1 && nearby_mobs.len && prob(15 * nearby_mobs.len))
var/mob/living/L = pick(nearby_mobs)
diff --git a/code/modules/xenoarcheaology/finds/special.dm b/code/modules/xenoarcheaology/finds/special.dm
index 3ed9ce38e8..93bfa10966 100644
--- a/code/modules/xenoarcheaology/finds/special.dm
+++ b/code/modules/xenoarcheaology/finds/special.dm
@@ -77,7 +77,7 @@
charges += 0.25
else
charges += 1
- playsound(src.loc, 'sound/effects/splat.ogg', 50, 1, -3)
+ playsound(src, 'sound/effects/splat.ogg', 50, 1, -3)
//use up stored charges
if(charges >= 10)
@@ -89,12 +89,12 @@
charges -= 1
var/spawn_type = pick(/mob/living/simple_mob/creature)
new spawn_type(pick(view(1,src)))
- playsound(src.loc, pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 50, 1, -3)
+ playsound(src, pick('sound/hallucinations/growl1.ogg','sound/hallucinations/growl2.ogg','sound/hallucinations/growl3.ogg'), 50, 1, -3)
if(charges >= 1)
if(shadow_wights.len < 5 && prob(5))
shadow_wights.Add(new /obj/effect/shadow_wight(src.loc))
- playsound(src.loc, 'sound/effects/ghost.ogg', 50, 1, -3)
+ playsound(src, 'sound/effects/ghost.ogg', 50, 1, -3)
charges -= 0.1
if(charges >= 0.1)
@@ -124,7 +124,7 @@
/obj/item/weapon/vampiric/proc/bloodcall(var/mob/living/carbon/human/M)
last_bloodcall = world.time
if(istype(M))
- playsound(src.loc, pick('sound/hallucinations/wail.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/far_noise.ogg'), 50, 1, -3)
+ playsound(src, pick('sound/hallucinations/wail.ogg','sound/hallucinations/veryfar_noise.ogg','sound/hallucinations/far_noise.ogg'), 50, 1, -3)
nearby_mobs.Add(M)
var/target = pick(M.organs_by_name)
@@ -180,7 +180,7 @@
src.loc = get_turf(pick(orange(1,src)))
var/mob/living/carbon/M = locate() in src.loc
if(M)
- playsound(src.loc, pick('sound/hallucinations/behind_you1.ogg',\
+ playsound(src, pick('sound/hallucinations/behind_you1.ogg',\
'sound/hallucinations/behind_you2.ogg',\
'sound/hallucinations/i_see_you1.ogg',\
'sound/hallucinations/i_see_you2.ogg',\
diff --git a/code/modules/xenoarcheaology/tools/coolant_tank.dm b/code/modules/xenoarcheaology/tools/coolant_tank.dm
index 9f5172b3de..2975cf0749 100644
--- a/code/modules/xenoarcheaology/tools/coolant_tank.dm
+++ b/code/modules/xenoarcheaology/tools/coolant_tank.dm
@@ -21,7 +21,7 @@
var/datum/effect/effect/system/smoke_spread/S = new /datum/effect/effect/system/smoke_spread
S.set_up(5, 0, src.loc)
- playsound(src.loc, 'sound/effects/smoke.ogg', 50, 1, -3)
+ playsound(src, 'sound/effects/smoke.ogg', 50, 1, -3)
spawn(0)
S.start()
diff --git a/code/modules/xenoarcheaology/tools/geosample_scanner.dm b/code/modules/xenoarcheaology/tools/geosample_scanner.dm
index 5cb5d32479..3d15b0583d 100644
--- a/code/modules/xenoarcheaology/tools/geosample_scanner.dm
+++ b/code/modules/xenoarcheaology/tools/geosample_scanner.dm
@@ -244,7 +244,7 @@
scanner_temperature = max(scanner_temperature - 5 - 10 * rand(), 0)
if(prob(0.75))
src.visible_message("[bicon(src)] [pick("plinks","hisses")][pick(" quietly"," softly"," sadly"," plaintively")].", 2)
- playsound(loc, 'sound/effects/ding.ogg', 25)
+ playsound(src, 'sound/effects/ding.ogg', 25)
last_process_worldtime = world.time
/obj/machinery/radiocarbon_spectrometer/proc/stop_scanning()
diff --git a/code/modules/xenoarcheaology/tools/suspension_generator.dm b/code/modules/xenoarcheaology/tools/suspension_generator.dm
index 9ab39467d3..f4a60f1bfd 100644
--- a/code/modules/xenoarcheaology/tools/suspension_generator.dm
+++ b/code/modules/xenoarcheaology/tools/suspension_generator.dm
@@ -133,7 +133,7 @@
anchored = 0
else
anchored = 1
- playsound(loc, W.usesound, 50, 1)
+ playsound(src, W.usesound, 50, 1)
to_chat(user, "You wrench the stabilising legs [anchored ? "into place" : "up against the body"].")
if(anchored)
desc = "It is resting securely on four stubby legs."
diff --git a/code/modules/xenobio/items/extracts.dm b/code/modules/xenobio/items/extracts.dm
index fddbb13a5e..6368f68e15 100644
--- a/code/modules/xenobio/items/extracts.dm
+++ b/code/modules/xenobio/items/extracts.dm
@@ -323,7 +323,7 @@
/datum/chemical_reaction/slime/orange_fire/on_reaction(var/datum/reagents/holder)
log_and_message_admins("Orange extract reaction (fire) has been activated in [get_area(holder.my_atom)]. Last fingerprints: [holder.my_atom.fingerprintslast]")
holder.my_atom.visible_message("\The [src] begins to vibrate violently!")
- playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 75, 1)
+ playsound(holder.my_atom, 'sound/effects/phasein.ogg', 75, 1)
spawn(5 SECONDS)
if(holder && holder.my_atom)
var/turf/simulated/T = get_turf(holder.my_atom)
@@ -360,11 +360,11 @@
/datum/chemical_reaction/slime/yellow_emp/on_reaction(var/datum/reagents/holder)
log_and_message_admins("Yellow extract reaction (emp) has been activated in [get_area(holder.my_atom)]. Last fingerprints: [holder.my_atom.fingerprintslast]")
holder.my_atom.visible_message("\The [src] begins to vibrate violently!")
- playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 75, 1)
+ playsound(holder.my_atom, 'sound/effects/phasein.ogg', 75, 1)
spawn(5 SECONDS)
if(holder && holder.my_atom)
empulse(get_turf(holder.my_atom), 2, 4, 7, 10) // As strong as a normal EMP grenade.
- playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 75, 1)
+ playsound(holder.my_atom, 'sound/effects/phasein.ogg', 75, 1)
..()
@@ -575,7 +575,7 @@
log_and_message_admins("Red extract reaction (enrage) has been activated in [get_area(holder.my_atom)]. Last fingerprints: [holder.my_atom.fingerprintslast]")
- playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 75, 1)
+ playsound(holder.my_atom, 'sound/effects/phasein.ogg', 75, 1)
..()
@@ -696,7 +696,7 @@
power++
E.uses = 0
- playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 75, 1)
+ playsound(holder.my_atom, 'sound/effects/phasein.ogg', 75, 1)
holder.my_atom.visible_message("\The [holder.my_atom] begins to vibrate violently!")
log_and_message_admins("Oil extract reaction (explosion) has been activated in [get_area(holder.my_atom)]. Last fingerprints: [holder.my_atom.fingerprintslast]")
diff --git a/code/modules/xenobio/machinery/processor.dm b/code/modules/xenobio/machinery/processor.dm
index 6d888adb26..216c0cb77b 100644
--- a/code/modules/xenobio/machinery/processor.dm
+++ b/code/modules/xenobio/machinery/processor.dm
@@ -27,7 +27,7 @@
begin_processing()
else
to_chat(user, "The processor is empty.")
- playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
+ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 1)
return
// Verb to remove everything.
@@ -54,7 +54,7 @@
return
if(!can_insert(AM))
to_chat(user, "\The [src] cannot process \the [AM] at this time.")
- playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 1)
+ playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 1)
return
to_be_processed.Add(AM)
AM.forceMove(src)
@@ -64,26 +64,26 @@
if(processing)
return // Already doing it.
processing = TRUE
- playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1)
+ playsound(src, 'sound/machines/juicer.ogg', 50, 1)
for(var/atom/movable/AM in to_be_processed)
extract(AM)
sleep(1 SECONDS)
while(monkeys_recycled >= 4)
new /obj/item/weapon/reagent_containers/food/snacks/monkeycube(get_turf(src))
- playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
+ playsound(src, 'sound/effects/splat.ogg', 50, 1)
monkeys_recycled -= 4
sleep(1 SECOND)
processing = FALSE
- playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)
+ playsound(src, 'sound/machines/ding.ogg', 50, 1)
/obj/machinery/processor/proc/extract(var/atom/movable/AM)
if(istype(AM, /mob/living/simple_mob/slime))
var/mob/living/simple_mob/slime/S = AM
while(S.cores)
new S.coretype(get_turf(src))
- playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
+ playsound(src, 'sound/effects/splat.ogg', 50, 1)
S.cores--
sleep(1 SECOND)
to_be_processed.Remove(S)
@@ -91,7 +91,7 @@
if(istype(AM, /mob/living/carbon/human))
var/mob/living/carbon/human/M = AM
- playsound(src.loc, 'sound/effects/splat.ogg', 50, 1)
+ playsound(src, 'sound/effects/splat.ogg', 50, 1)
to_be_processed.Remove(M)
qdel(M)
monkeys_recycled++
diff --git a/html/changelogs/KasparoVv - PR - 7215.yml b/html/changelogs/KasparoVv - PR - 7215.yml
new file mode 100644
index 0000000000..efd745d1a9
--- /dev/null
+++ b/html/changelogs/KasparoVv - PR - 7215.yml
@@ -0,0 +1,7 @@
+author: KasparoVv
+delete-after: True
+changes:
+ - rscadd: "You can now quickly cycle hrough previous or next hair/facial styles at character creation."
+ - rscadd: "Use the -mv- button to pick a marking and place it above of another on your character. Saves you from pressing up or down a bunch."
+ - tweak: "Ports color_square() from Paradise for colour previews, cleaning up pref. code & correct alignment issue w/ nested tables."
+ - tweak: "Markings are now properly aligned within a table."
\ No newline at end of file
diff --git a/polaris.dme b/polaris.dme
index 37a40cae9d..d713405c72 100644
--- a/polaris.dme
+++ b/polaris.dme
@@ -310,6 +310,7 @@
#include "code\datums\observation\shuttle_moved.dm"
#include "code\datums\observation\stat_set.dm"
#include "code\datums\observation\turf_changed.dm"
+#include "code\datums\observation\turf_enterexit.dm"
#include "code\datums\observation\unequipped.dm"
#include "code\datums\observation\z_moved.dm"
#include "code\datums\observation\~cleanup.dm"