Merge branch 'master' into Arokha/offtherails

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

View File

@@ -380,7 +380,7 @@
to_chat(user, "<span class='notice'>Now welding the vent.</span>")
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("<span class='notice'>\The [user] welds the vent shut.</span>", "<span class='notice'>You weld the vent shut.</span>", "You hear welding.")
welded = 1

View File

@@ -78,7 +78,7 @@
/obj/machinery/atmospherics/pipe/simple/proc/burst()
src.visible_message("<span class='danger'>\The [src] bursts!</span>");
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()

View File

@@ -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("<span class='danger'>\The [src] slams into \a [A]!</span>",1,"<span class='danger'>You hear a loud slam!</span>",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("<span class='danger'>\The [src] slams into \a [A]!</span>",1,"<span class='danger'>You hear a loud slam!</span>",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("<span class='danger'>[src] slams into [A]!</span>",1,"<span class='danger'>You hear a loud slam!</span>",2)
playsound(src.loc, "punch", 25, 1, -1)
playsound(src, "punch", 25, 1, -1)
if (prob(33))
loc:add_blood(src)
bloody_body(src)

View File

@@ -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.

View File

@@ -231,18 +231,8 @@
. = 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.
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))
@@ -252,14 +242,32 @@
// 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

View File

@@ -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()

View File

@@ -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()
. = ..()

View File

@@ -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)

View File

@@ -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))

View File

@@ -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)

View File

@@ -29,7 +29,6 @@
density = 0
unacidable = 1//Just to be sure.
var/def_zone
flags = PROXMOVE
pass_flags = PASSTABLE

View File

@@ -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

View File

@@ -336,7 +336,7 @@ var/list/mob/living/forced_ambiance_list = new
H.AdjustStunned(3)
H.AdjustWeakened(3)
to_chat(mob, "<span class='notice'>The sudden appearance of gravity makes you fall to the floor!</span>")
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()

View File

@@ -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

View File

@@ -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("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
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("<span class='danger'>\The [user] deflects [attack_text] with \the [src]!</span>")
playsound(user.loc, 'sound/weapons/slash.ogg', 50, 1)
playsound(src, 'sound/weapons/slash.ogg', 50, 1)
return 1
return 0

View File

@@ -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

View File

@@ -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

View File

@@ -57,7 +57,7 @@
if(prob(1+ damage * 5))
visible_message("<span class='danger'>[shatter_message]</span>")
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)

View File

@@ -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

View File

@@ -40,7 +40,7 @@
"What do you get from eating tree decorations?\n\n<i>Tinsilitis!</i>",
"What do snowmen wear on their heads?\n\n<i>Ice caps!</i>",
"Why is Christmas just like life on ss13?\n\n<i>You do all the work and the fat guy gets all the credit.</i>",
"Why doesn<EFBFBD>t Santa have any children?\n\n<i>Because he only comes down the chimney.</i>")
"Why doesn't Santa have any children?\n\n<i>Because he only comes down the chimney.</i>")
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 ..()

View File

@@ -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("<span class='notice'>Shuttle Locator active.</span>") //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("<span class='notice'>Authentication Disk Locator active.</span>")
return

View File

@@ -70,7 +70,7 @@
to_chat(user, "<span class='warning'>Your shield has absorbed most of \the [damage_source].</span>")
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)

View File

@@ -81,4 +81,4 @@
lightning.old_style_target(target)
lightning.fire()
visible_message("<span class='danger'>\The [src] strikes \the [target] with lightning!</span>")
playsound(get_turf(src), 'sound/weapons/gauss_shoot.ogg', 75, 1)
playsound(src, 'sound/weapons/gauss_shoot.ogg', 75, 1)

View File

@@ -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))

View File

@@ -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)

View File

@@ -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)

View File

@@ -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

View File

@@ -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!</span>")
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.")

View File

@@ -55,7 +55,7 @@
if(check_shield_arc(user, bad_arc, damage_source, attacker))
user.visible_message("<span class='danger'>\The [user]'s [src] blocks [attack_text]!</span>")
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

View File

@@ -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

View File

@@ -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)

View File

@@ -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()

View File

@@ -213,7 +213,7 @@
return
anchored = !anchored
playsound(src.loc, I.usesound, 50, 1)
playsound(src, I.usesound, 50, 1)
to_chat(user, "<span class='notice'>You [anchored ? "wrench" : "unwrench"] \the [src].</span>")
return

View File

@@ -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"

View File

@@ -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("<span class='info'>\The [src] dings, then spits out \a [O].</span>")
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("<span class='info'>\The [src] dings, then spits out \a [O].</span>")
return O

View File

@@ -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("<span class='warning'>\The [user] slashes at [src]!</span>")
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("<span class='warning'>\The [user] [pick(S.attacktext)] \the [src]!</span>")
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("<span class='warning'>[user] screws the camera's panel [panel_open ? "open" : "closed"]!</span>",
"<span class='notice'>You screw the camera's panel [panel_open ? "open" : "closed"].</span>")
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("<span class='notice'> [user] has deactivated [src]!</span>")
else
visible_message("<span class='notice'> [src] clicks and shuts down. </span>")
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("<span class='notice'> [user] has reactivated [src]!</span>")
else
visible_message("<span class='notice'> [src] clicks and reactivates itself. </span>")
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, "<span class='notice'>You start to weld [src]..</span>")
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))

View File

@@ -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, "<span class='notice'>You start to weld the [src]..</span>")
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))

View File

@@ -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))

View File

@@ -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()

View File

@@ -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

View File

@@ -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, "<span class='notice'>You wrench the frame into place.</span>")
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, "<span class='notice'>You deconstruct the frame.</span>")
@@ -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, "<span class='notice'>You unfasten the frame.</span>")
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, "<span class='notice'>You place the circuit board inside the frame.</span>")
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, "<span class='notice'>You screw the circuit board into place.</span>")
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, "<span class='notice'>You remove the circuit board.</span>")
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, "<span class='notice'>You unfasten the circuit board.</span>")
state = 1
icon_state = "1"
@@ -69,7 +69,7 @@
to_chat(user, "<span class='warning'>You need five coils of wire to add them to the frame.</span>")
return
to_chat(user, "<span class='notice'>You start to add cables to the frame.</span>")
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, "<span class='notice'>You remove the cables.</span>")
state = 2
icon_state = "2"
@@ -94,7 +94,7 @@
to_chat(user, "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>")
return
to_chat(user, "<span class='notice'>You start to put in the glass panel.</span>")
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, "<span class='notice'>You put in the glass panel.</span>")
@@ -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, "<span class='notice'>You remove the brain.</span>")
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, "<span class='notice'>You remove the glass panel.</span>")
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, "<span class='notice'>You connect the monitor.</span>")
if(!brain)
var/open_for_latejoin = alert(user, "Would you like this core to be open for latejoining AIs?", "Latejoin", "Yes", "Yes", "No") == "Yes"

View File

@@ -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, "<span class='notice'>You wrench the frame into place.</span>")
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, "<span class='notice'>You deconstruct the frame.</span>")
@@ -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, "<span class='notice'>You unfasten the frame.</span>")
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, "<span class='notice'>You place the circuit board inside the frame.</span>")
src.icon_state = "1"
src.circuit = P
@@ -49,12 +49,12 @@
else
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
if(P.is_screwdriver() && circuit)
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You screw the circuit board into place.</span>")
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, "<span class='notice'>You remove the circuit board.</span>")
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, "<span class='notice'>You unfasten the circuit board.</span>")
src.state = 1
src.icon_state = "1"
@@ -72,7 +72,7 @@
to_chat(user, "<span class='warning'>You need five coils of wire to add them to the frame.</span>")
return
to_chat(user, "<span class='notice'>You start to add cables to the frame.</span>")
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, "<span class='notice'>You add cables to the frame.</span>")
@@ -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, "<span class='notice'>You remove the cables.</span>")
src.state = 2
src.icon_state = "2"
@@ -92,7 +92,7 @@
if (G.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>")
return
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to put in the glass panel.</span>")
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, "<span class='notice'>You remove the glass panel.</span>")
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, "<span class='notice'>You connect the monitor.</span>")
var/B = new src.circuit.build_path ( src.loc )
src.circuit.construct(B)

View File

@@ -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, "<span class='notice'>The broken glass falls out.</span>")

View File

@@ -33,7 +33,7 @@
if (C.get_amount() < 5)
to_chat(user, "<span class='warning'>You need five lengths of cable to add them to the frame.</span>")
return
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to add cables to the frame.</span>")
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, "<span class='notice'>You add the circuit board to the frame.</span>")
circuit = P
user.drop_item()
@@ -72,7 +72,7 @@
to_chat(user, "<span class='warning'>This frame does not accept circuit boards of this type!</span>")
else
if(P.is_wirecutter())
playsound(src.loc, P.usesound, 50, 1)
playsound(src, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You remove the cables.</span>")
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)

View File

@@ -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("<span class='danger'>[user] [attack_verb] the [src]!</span>")
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)

View File

@@ -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)

View File

@@ -73,7 +73,7 @@
if(do_after(user,5 SECONDS,src))
visible_message("<span class='danger'>\The [user] forces \the [src] open, sparks flying from its electronics!</span>")
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("<span class='alium'>\The [user] begins forcing \the [src] open!</span>")
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("<span class='danger'>\The [user] forces \the [src] open!</span>")
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)

View File

@@ -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("<span class='danger'>\The [user] hits \the [src] with \the [W] with no visible effect.</span>")
else
user.visible_message("<span class='danger'>\The [user] forcefully strikes \the [src] with \the [W]!</span>")
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("<span class='danger'>\The [user] hits \the [src] with \the [W] with no visible effect.</span>")
else
user.visible_message("<span class='danger'>\The [user] forcefully strikes \the [src] with \the [W]!</span>")
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("<span class='alium'>\The [user] begins forcing \the [src] open!</span>")
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("<span class='danger'>\The [user] forces \the [src] open!</span>")
force_open(1)
else
visible_message("<span class='alium'>\The [user] begins forcing \the [src] closed!</span>")
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("<span class='danger'>\The [user] forces \the [src] closed!</span>")
force_close(1)
else

View File

@@ -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("<span class='danger'>\The [user] hits \the [src] with \the [W] with no visible effect.</span>")
else
user.visible_message("<span class='danger'>\The [user] forcefully strikes \the [src] with \the [W]!</span>")
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

View File

@@ -200,14 +200,14 @@
if(src.blocked)
visible_message("<span class='alium'>\The [user] begins digging into \the [src] internals!</span>")
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("<span class='alium'>\The [user] begins forcing \the [src] open!</span>")
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("<span class='danger'>\The [user] forces \the [src] open!</span>")
open(1)
else

View File

@@ -32,7 +32,7 @@ obj/structure/firedoor_assembly/attackby(obj/item/C, mob/user as mob)
to_chat(user, "<span class='notice'>You wire \the [src].</span>")
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("<span class='warning'>[user] has inserted a circuit into \the [src]!</span>",
"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, "<span class='warning'>You must secure \the [src] first!</span>")
else if(C.is_wrench())
anchored = !anchored
playsound(src.loc, C.usesound, 50, 1)
playsound(src, C.usesound, 50, 1)
user.visible_message("<span class='warning'>[user] has [anchored ? "" : "un" ]secured \the [src]!</span>",
"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("<span class='info'>[user] adds [S.name] to \the [src].</span>",
"<span class='notice'>You start to install [S.name] into \the [src].</span>")
if(do_after(user, 40, src) && !glass && S.use(1))

View File

@@ -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("<span class='danger'>[user] smashes against the [src.name].</span>", 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("<span class='warning'>The glass door was sliced open by [user]!</span>")
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("<span class='danger'>[src] was hit by [I].</span>")
if(I.damtype == BRUTE || I.damtype == BURN)
take_damage(aforce)

View File

@@ -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)

View File

@@ -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("<span class='warning'>[src] can now be moved.</span>"))
overlays.Cut()
cut_overlays()
unsense_proximity(callback = .HasProximity)
else if(anchored)
user.show_message(text("<span class='warning'>[src] is now secured.</span>"))
overlays += "[base_state]-s"
add_overlay("[base_state]-s")
sense_proximity(callback = .HasProximity)
/obj/machinery/button/flasher
name = "flasher button"

View File

@@ -31,7 +31,7 @@ var/list/floor_light_cache = list()
if(!WT.remove_fuel(0, user))
to_chat(user, "<span class='warning'>\The [src] must be on to complete this task.</span>")
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("<span class='danger'>\The [user] attacks \the [src]!</span>")
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

View File

@@ -274,7 +274,7 @@
if(P.is_wrench())
if(state == FRAME_PLACED && !anchored)
to_chat(user, "<span class='notice'>You start to wrench the frame into place.</span>")
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, "<span class='notice'>You deconstruct the frame.</span>")
@@ -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, "<span class='notice'>You place the circuit board inside the frame.</span>")
circuit = P
user.drop_item()
@@ -464,7 +464,7 @@
to_chat(user, "<span class='warning'>You need five coils of wire to add them to the frame.</span>")
return
to_chat(user, "<span class='notice'>You start to add cables to the frame.</span>")
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, "<span class='notice'>You add cables to the frame.</span>")
@@ -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, "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>")
return
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to put in the glass panel.</span>")
if(do_after(user, 20) && state == FRAME_WIRED)
if(G.use(2))
@@ -536,7 +536,7 @@
if(G.get_amount() < 2)
to_chat(user, "<span class='warning'>You need two sheets of glass to put in the glass panel.</span>")
return
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
playsound(src, 'sound/items/Deconstruct.ogg', 50, 1)
to_chat(user, "<span class='notice'>You start to put in the glass panel.</span>")
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)

View File

@@ -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

View File

@@ -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("<span class='warning'>[user] has cut the wires inside \the [src]!</span>", "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

View File

@@ -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("<span class='newscaster'><EM>[name]</EM> beeps, \"Attention! Wanted issue distributed!\"</span>",2)
playsound(src.loc, 'sound/machines/warning-buzzer.ogg', 75, 1)
playsound(src, 'sound/machines/warning-buzzer.ogg', 75, 1)
return

View File

@@ -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, "<span class='notice'>You secure the exterior bolts on the turret.</span>")
else if(anchored)
playsound(loc, I.usesound, 100, 1)
playsound(src, I.usesound, 100, 1)
anchored = FALSE
to_chat(user, "<span class='notice'>You unsecure the exterior bolts on the turret.</span>")
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, "<span class='notice'>You secure the external bolts.</span>")
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, "<span class='notice'>You dismantle the turret construction.</span>")
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, "<span class='notice'>You unfasten the external bolts.</span>")
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, "<span class='notice'>You bolt the metal armor into place.</span>")
build_step = 3
return
@@ -1012,7 +1012,7 @@
to_chat(user, "<span class='notice'>You need more fuel to complete this task.</span>")
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, "<span class='notice'>You remove the turret's metal armor bolts.</span>")
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, "<span class='notice'>You close the internal access hatch.</span>")
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, "<span class='notice'>You open the internal access hatch.</span>")
return
@@ -1088,7 +1088,7 @@
if(WT.get_fuel() < 5)
to_chat(user, "<span class='notice'>You need more fuel to complete this task.</span>")
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, "<span class='notice'>You pry off the turret's exterior armor.</span>")
new /obj/item/stack/material/steel(loc, 2)
build_step = 6

View File

@@ -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))

View File

@@ -206,7 +206,7 @@
protected = 1
if(!protected)
playsound(src.loc, "sparks", 75, 1, -1)
playsound(src, "sparks", 75, 1, -1)
to_chat(user, "<font color='red'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</font>")
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, "<font color='red'>You try to touch the controls but you get zapped. There must be a short circuit somewhere.</font>")
return*/
else

View File

@@ -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, "<span class='notice'>You you disable the security protocols</span>")
src.updateUsrDialog()

View File

@@ -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, "<span class='notice'>You you disable the security protocols</span>")
src.updateUsrDialog()

View File

@@ -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, "<span class='notice'>You you disable the security protocols</span>")
src.updateUsrDialog()

View File

@@ -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)

View File

@@ -253,7 +253,7 @@
*/
/obj/machinery/vending/proc/pay_with_ewallet(var/obj/item/weapon/spacecash/ewallet/wallet)
visible_message("<span class='info'>\The [usr] swipes \the [wallet] through \the [src].</span>")
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("<span class='info'>\The [usr] swipes \the [I] through \the [src].</span>")
else
visible_message("<span class='info'>\The [usr] swipes \the [ID_container] through \the [src].</span>")
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, "<span class='warning'>Access denied.</span>") //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, "<span class='warning'>Access denied.</span>") //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("<span class='notice'>\The [src] clunks as it vends an additional item.</span>")
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,

View File

@@ -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()
. = ..()

View File

@@ -179,7 +179,7 @@
src.occupant_message("<font color='[src.zoom?"blue":"red"]'>Zoom mode [zoom?"en":"dis"]abled.</font>")
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

View File

@@ -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

View File

@@ -33,7 +33,7 @@
if(FD.blocked)
FD.visible_message("<span class='danger'>\The [chassis] begins prying on \the [FD]!</span>")
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("<span class='warning'>\The [chassis] begins forcing \the [FD] open!</span>")
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("<span class='danger'>\The [chassis] forces \the [FD] open!</span>")
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("<span class='danger'>\The [chassis] tears \the [AD] open!</span>")
if(!AD.welded)
if(density)
@@ -100,15 +100,15 @@
M.adjustOxyLoss(round(dam_force/2))
M.updatehealth()
occupant_message("<span class='warning'>You squeeze [target] with [src.name]. Something cracks.</span>")
playsound(src.loc, "fracture", 5, 1, -2) //CRACK
playsound(src, "fracture", 5, 1, -2) //CRACK
chassis.visible_message("<span class='warning'>[chassis] squeezes [target].</span>")
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("<span class='warning'>You slam [target] with [src.name]. Something cracks.</span>")
playsound(src.loc, "fracture", 3, 1, -2) //CRACK 2
playsound(src, "fracture", 3, 1, -2) //CRACK 2
chassis.visible_message("<span class='warning'>[chassis] slams [target].</span>")
M.throw_at(get_step(M,get_dir(src, M)), 14, 1.5, chassis)
else

View File

@@ -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)

View File

@@ -25,14 +25,14 @@
var/obj/o = target
var/amount = o.reagents.trans_to_obj(src, 200)
occupant_message("<span class='notice'>[amount] units transferred into internal tank.</span>")
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("<span class='warning'>\The [src] is empty.</span>")
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)

View File

@@ -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

View File

@@ -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("<span class='warning'>You emit a high-pitched noise from the mech.</span>")
for(var/mob/living/carbon/M in ohearers(6, chassis))
if(istype(M, /mob/living/carbon/human))

View File

@@ -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.

View File

@@ -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, "<span class='danger'>You slash at the armored suit!</span>")
visible_message("<span class='danger'>\The [user] slashes at [src.name]'s armor!</span>")
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, "<span class='danger'>Your claws had no effect!</span>")
src.occupant_message("<span class='notice'>\The [user]'s claws are stopped by the armor.</span>")
visible_message("<span class='warning'>\The [user] rebounds off [src.name]'s armor!</span>")
@@ -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, "<span class='danger'>You smash at the armored suit!</span>")
for (var/mob/V in viewers(src))
if(V.client && !(V.blinded))
V.show_message("<span class='danger'>\The [user] smashes against [src.name]'s armor!</span>", 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, "<span class='warning'>Your attack had no effect!</span>")
src.occupant_message("<span class='warning'>\The [user]'s attack is stopped by the armor.</span>")
for (var/mob/V in viewers(src))
@@ -2003,7 +2003,7 @@
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")
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("<span class='notice'>\The [user]'s attack is stopped by the armor.</span>")
visible_message("<span class='notice'>\The [user] rebounds off [src.name]'s armor!</span>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>attacked [src.name]</font>")

View File

@@ -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(\

View File

@@ -66,7 +66,7 @@
/obj/effect/alien/resin/attack_generic(var/mob/user, var/damage, var/attack_verb)
visible_message("<span class='danger'>[user] [attack_verb] the [src]!</span>")
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()
@@ -548,15 +547,3 @@
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)
*/

View File

@@ -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, "<span class='notice'>You remove the remnants of the poster.</span>")
qdel(src)
@@ -166,7 +166,7 @@
return
visible_message("<span class='warning'>[user] rips [src] in a single, decisive motion!</span>" )
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"

View File

@@ -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)

View File

@@ -61,7 +61,7 @@
panel_open = !panel_open
user.visible_message("<span class='warning'>[user] very carefully screws the mine's panel [panel_open ? "open" : "closed"].</span>",
"<span class='notice'>You very carefully screw the mine's panel [panel_open ? "open" : "closed"].</span>")
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]!")

View File

@@ -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("<span class='danger'>[U] attempts to stab [M] in the eyes, but misses!</span>")
for(var/mob/V in viewers(M))
V.show_message("<span class='danger'>[U] attempts to stab [M] in the eyes, but misses!</span>")
@@ -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

View File

@@ -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,"<span class='notice'>You hammer [src] rudely!</span>")
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,"<span class='notice'>You gracefully ring [src].</span>")
/obj/item/weapon/deskbell/proc/check_ability(mob/user)

View File

@@ -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, "<span class='notice'>You remove the ID from the [name].</span>")
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)] <b>Sent message to [P.owner] ([P.ownjob]), </b>\"[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, "<span class='notice'>You remove \the [cartridge] from the [name].</span>")
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.

View File

@@ -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, "<span class='notice'>Scanned [target].</span>")
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, "<span class='notice'>You deactivate the [src].</span>")
@@ -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)

View File

@@ -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*"))

View File

@@ -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*"))

View File

@@ -391,12 +391,12 @@
if(!do_after(user, 30, H))
return
user.visible_message("<span class='notice'>\The [user] places [src] on [H]'s chest.</span>", "<span class='warning'>You place [src] on [H]'s chest.</span>")
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("<span class='warning'>\The [H]'s body convulses a bit.</span>")
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, "<span class='warning'>You can't do that while the safety is enabled.</span>")
return
playsound(get_turf(src), 'sound/machines/defib_charge.ogg', 50, 0)
playsound(src, 'sound/machines/defib_charge.ogg', 50, 0)
audible_message("<span class='warning'>\The [src] lets out a steadily rising hum...</span>")
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("<span class='danger'><i>\The [user] shocks [H] with \the [src]!</i></span>", "<span class='warning'>You shock [H] with \the [src]!</span>")
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()
..()

View File

@@ -48,7 +48,7 @@
user.visible_message("<span class='notice'>\The [user] successfully repairs \the [src]!</span>")
broken = FALSE
update_icon()
playsound(src.loc, W.usesound, 50, 1)
playsound(src, W.usesound, 50, 1)
else
user.visible_message("<span class='notice'>\The [user] fails to repair \the [src].</span>")
repairing = FALSE
@@ -138,7 +138,7 @@
if(user)
update_icon()
to_chat(user, "<span class='warning'><i>click</i></span>")
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)

View File

@@ -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
..()

View File

@@ -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, "<span class='notice'>\The [src] has fabricated a new bulb from the broken bulbs it has stored. It now has [uses] uses.</span>")
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

View File

@@ -134,7 +134,7 @@
user.audible_message("<B>[user.GetVoice()]</B>[user.GetAltName()] broadcasts, <FONT size=[broadcast_size] face='[broadcast_font]' color='[broadcast_color]'>\"[pick(insultmsg)]\"</FONT>")
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

View File

@@ -47,7 +47,7 @@
to_chat(user, "<span class='warning'>[O] must be safely placed on the ground for modification.</span>")
return
playsound(src.loc, O.usesound, 100, 1)
playsound(src, O.usesound, 100, 1)
user.visible_message("<span class='notice'>\The [user] opens \the [src] and modifies \the [O].</span>","<span class='notice'>You open \the [src] and modify \the [O].</span>")

View File

@@ -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, "<span class='notice'>You trigger [src].</span>")
times_used += 1
if(times_used >= max_uses)

View File

@@ -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)

View File

@@ -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("<span class='warning'>[user]'s [name] rasps, \"[use_message]\"</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
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("<span class='warning'>[user]'s [name] gurgles something indecipherable and deeply offensive.</span>", "<span class='warning'>\The [user] holds up \the [name].</span>")
insults--

View File

@@ -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)

View File

@@ -58,7 +58,7 @@ var/list/marker_beacon_colors = list(
return
if(use(1))
to_chat(user, "<span class='notice'>You activate and anchor [amount ? "a":"the"] [singular_name] in place.</span>")
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)

View File

@@ -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("<span class='danger'>\The [] casually lines up a shot with []'s head and pulls the trigger!</span>", user, M), 1, "<span class='warning'>You hear the sound of foam against skull</span>", 2)
O.show_message(text("<span class='warning'>\The [] was hit in the head by the foam dart!</span>", 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, "<span class='notice'>You extend the plastic blade with a quick flick of your wrist.</span>")
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, "<span class='notice'>You push the plastic blade back down into the handle.</span>")
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, "<span class='notice'>You blow on [src], creating an ear-splitting noise!</span>")
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, "<span class='notice'>You play with [src].</span>")
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, "<span class='notice'>You play with [src].</span>")
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("<span class='notice'>The [src] says \"[toysay]\".</span>")
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, "<span class='notice'>You press the button on [src].</span>")
playsound(user, 'sound/machines/click.ogg', 20, 1)
playsound(src, 'sound/machines/click.ogg', 20, 1)
visible_message("<span class='danger'>[message]</span>")
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, "<span class='notice'>You pull the string on the [src].</span>")
//playsound(user, 'sound/misc/hoot.ogg', 25, 1)
//playsound(src, 'sound/misc/hoot.ogg', 25, 1)
visible_message("<span class='danger'>[message]</span>")
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, "<span class='notice'>You pull the string on the [src].</span>")
//playsound(user, 'sound/misc/caw.ogg', 25, 1)
//playsound(src, 'sound/misc/caw.ogg', 25, 1)
visible_message("<span class='danger'>[message]</span>")
cooldown = 1
spawn(30) cooldown = 0

Some files were not shown because too many files have changed in this diff Show More