Refactors sound groups to use decls instead of a massive switch with dozens of global lists. (#9702)

This commit is contained in:
Matt Atlas
2020-08-28 20:47:00 +02:00
committed by GitHub
parent db1b0cece0
commit 0dd08df5b2
125 changed files with 629 additions and 557 deletions
+1 -1
View File
@@ -197,7 +197,7 @@
var/obj/item/material/shard/S = material.place_shard(T)
M.embed(S)
playsound(src.loc, "glass_break", 70, 1)
playsound(src.loc, /decl/sound_category/glass_break_sound, 70, 1)
qdel(src)
/obj/item/clothing/suit/armor/handle_shield(mob/user, var/on_back, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
@@ -331,7 +331,7 @@
punch_force = 5
clipped = 1
drop_sound = 'sound/items/drop/sword.ogg'
pickup_sound = "pickup_sword"
pickup_sound = /decl/sound_category/sword_pickup_sound
/obj/item/clothing/gloves/powerfist
name = "power fist"
+2 -2
View File
@@ -86,11 +86,11 @@ obj/item/clothing/shoes/sandal/clogs
if(running)
if(footstep >= 2)
footstep = 0
playsound(src, "clownstep", 50, 1) // this will get annoying very fast.
playsound(src, /decl/sound_category/clown_sound, 50, 1) // this will get annoying very fast.
else
footstep++
else
playsound(src, "clownstep", 20, 1)
playsound(src, /decl/sound_category/clown_sound, 20, 1)
/obj/item/clothing/shoes/cult
name = "ragged boots"
@@ -94,7 +94,7 @@
if(!M || !T)
return
playsound(T, "sparks", 50, 1)
playsound(T, /decl/sound_category/spark_sound, 50, 1)
anim(T, M, 'icons/mob/mob.dmi', ,"phaseout", ,M.dir)
/obj/item/rig_module/teleporter/engage(atom/target, mob/user, var/notify_ai)
+1 -1
View File
@@ -233,7 +233,7 @@
if(!isturf(picked)) return
spark(user, 5)
playsound(user.loc, "sparks", 50, 1)
playsound(user.loc, /decl/sound_category/spark_sound, 50, 1)
user.forceMove(picked)
return PROJECTILE_FORCE_MISS
+1 -1
View File
@@ -349,7 +349,7 @@ All custom items with worn sprites must follow the contained sprite system: http
user.visible_message("<span class='notice'>[user] starts flipping through \the [src].</span>",
"<span class='notice'>You start looking through \the [src], it appears to be filled with translations of Tau-Ceti basic for tajaran users.</span>",
"<span class='notice'>You hear pages being flipped.</span>")
playsound(src.loc, "pageturn", 50, 1)
playsound(src.loc, /decl/sound_category/page_sound, 50, 1)
/obj/item/clothing/under/fluff/faysal_uniform //Old Tajaran Nobleman Suit - Faysal Al-Shennawi - alberyk
+2 -2
View File
@@ -27,11 +27,11 @@
if (location)
var/obj/effect/visual/sparks/S = new(location, src, 0) //Trigger one on the tile it's on
S.start()
playsound(location, "sparks", 100, 1)
playsound(location, /decl/sound_category/spark_sound, 100, 1)
QUEUE_VISUAL(S) // Queue it.
while (total_sparks <= src.amount)
playsound(location, "sparks", 100, 1)
playsound(location, /decl/sound_category/spark_sound, 100, 1)
var/direction = 0
if (LAZYLEN(src.spread))
+3 -3
View File
@@ -21,17 +21,17 @@
'sound/misc/nymphchirp.ogg',
'sound/machines/twobeep.ogg',
'sound/machines/windowdoor.ogg',
"glass_break",
/decl/sound_category/glass_break_sound,
'sound/weapons/railgun.ogg',
'sound/effects/phasein.ogg',
"sparks",
/decl/sound_category/spark_sound,
'sound/effects/stealthoff.ogg',
'sound/misc/zapsplat/chitter1.ogg',
'sound/misc/zapsplat/chitter2.ogg',
'sound/effects/squelch1.ogg',
'sound/items/wrench.ogg',
'sound/items/welder.ogg',
"crowbar",
/decl/sound_category/crowbar_sound,
'sound/items/screwdriver.ogg',
'sound/items/drill_use.ogg',
'sound/items/air_wrench.ogg')
@@ -429,7 +429,7 @@
return AURA_FALSE|AURA_CANCEL
spark(get_turf(src), 5, global.alldirs)
playsound(get_turf(src), "sparks", 25, TRUE)
playsound(get_turf(src), /decl/sound_category/spark_sound, 25, TRUE)
/obj/aura/mechshield/hitby(atom/movable/M, var/speed)
. = ..()
+10 -10
View File
@@ -18,7 +18,7 @@
icon = 'icons/turf/flooring/carpet.dmi'
icon_state = "carpet"
initial_flooring = /decl/flooring/carpet
footstep_sound = "carpet"
footstep_sound = /decl/sound_category/carpet_footstep
/turf/simulated/floor/holofloor/tiled
name = "floor"
@@ -60,7 +60,7 @@
icon = 'icons/turf/flooring/grass.dmi'
icon_state = "grass0"
initial_flooring = /decl/flooring/grass
footstep_sound = "grassstep"
footstep_sound = /decl/sound_category/grass_footstep
/turf/simulated/floor/holofloor/snow
name = "snow"
@@ -69,14 +69,14 @@
base_icon = 'icons/turf/floors.dmi'
icon_state = "snow"
base_icon_state = "snow"
footstep_sound = "gravelstep"
footstep_sound = /decl/sound_category/snow_footstep
/turf/simulated/floor/holofloor/reinforced
icon = 'icons/turf/flooring/tiles.dmi'
initial_flooring = /decl/flooring/reinforced
name = "reinforced holofloor"
icon_state = "reinforced"
footstep_sound = "concretestep"
footstep_sound = /decl/sound_category/tiles_footstep
/turf/simulated/floor/holofloor/space
icon = 'icons/turf/space.dmi'
@@ -103,7 +103,7 @@
base_icon_state = "sand"
base_icon = 'icons/misc/beach.dmi'
initial_flooring = null
footstep_sound = "sand"
footstep_sound = /decl/sound_category/sand_footstep
/turf/simulated/floor/holofloor/beach/sand
name = "sand"
@@ -113,13 +113,13 @@
icon = 'icons/misc/beach2.dmi'
icon_state = "sandwater"
base_icon_state = "sandwater"
footstep_sound = "water"
footstep_sound = /decl/sound_category/water_footstep
/turf/simulated/floor/holofloor/beach/water
name = "water"
icon_state = "seashallow"
base_icon_state = "seashallow"
footstep_sound = "water"
footstep_sound = /decl/sound_category/water_footstep
/turf/simulated/floor/holofloor/desert
name = "desert sand"
@@ -131,7 +131,7 @@
icon = 'icons/turf/flooring/asteroid.dmi'
base_icon = 'icons/turf/flooring/asteroid.dmi'
initial_flooring = null
footstep_sound = "sand"
footstep_sound = /decl/sound_category/sand_footstep
/turf/simulated/floor/holofloor/desert/Initialize()
. = ..()
@@ -183,7 +183,7 @@
return
/obj/structure/window/reinforced/holowindow/shatter(var/display_message = 1)
playsound(src, "glass_break", 70, 1)
playsound(src, /decl/sound_category/glass_break_sound, 70, 1)
if(display_message)
visible_message("[src] fades away as it shatters!")
qdel(src)
@@ -225,7 +225,7 @@
/obj/machinery/door/window/holowindoor/shatter(var/display_message = 1)
src.density = 0
playsound(src, "glass_break", 70, 1)
playsound(src, /decl/sound_category/glass_break_sound, 70, 1)
if(display_message)
visible_message("[src] fades away as it shatters!")
qdel(src)
@@ -38,7 +38,7 @@
installed_gun = gun
size += gun.w_class
to_chat(user, "<span class='notice'>You slide \the [gun] into the firing mechanism.</span>")
playsound(src.loc, "crowbar", 50, 1)
playsound(src.loc, /decl/sound_category/crowbar_sound, 50, 1)
else
..()
@@ -47,7 +47,7 @@
installed_gun.forceMove(get_turf(src))
to_chat(user, "<span class='notice'>You slide \the [installed_gun] out of the firing mechanism.</span>")
size = initial(size)
playsound(loc, "crowbar", 50, 1)
playsound(loc, /decl/sound_category/crowbar_sound, 50, 1)
installed_gun = null
else
to_chat(user, "<span class='notice'>There's no weapon to remove from the mechanism.</span>")
+4 -4
View File
@@ -26,7 +26,7 @@
if(D.stat || D.weakened)
return 0
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>")
playsound(get_turf(A), "swing_hit", 50, 1, -1)
playsound(get_turf(A), /decl/sound_category/swing_hit_sound, 50, 1, -1)
D.apply_damage(5, BRUTE)
D.Weaken(2)
return 1
@@ -34,7 +34,7 @@
/datum/martial_art/karak_virul/proc/painful_palm(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)//is actually lung punch
A.do_attack_animation(D)
A.visible_message("<span class='warning'>[A] strikes [D] with their open palm!</span>")
playsound(get_turf(A), "punch", 50, 1, -1)
playsound(get_turf(A), /decl/sound_category/punch_sound, 50, 1, -1)
var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
var/armor_block = D.run_armor_check(affecting, "melee")
D.apply_damage(25, PAIN, affecting, armor_block)
@@ -50,10 +50,10 @@
A.visible_message("<span class='warning'>[A] strikes [D]'s [organ.name] with their closed fist!</span>")
D.visible_message("<span class='danger'>[D]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!</span>")
admin_attack_log(A, D, "dislocated [organ.joint].", "had his [organ.joint] dislocated.", "dislocated [organ.joint] of")
playsound(get_turf(A), "punch", 50, 1, -1)
playsound(get_turf(A), /decl/sound_category/punch_sound, 50, 1, -1)
return 1
else
playsound(get_turf(A), "punch", 50, 1, -1)
playsound(get_turf(A), /decl/sound_category/punch_sound, 50, 1, -1)
D.apply_damage(5, BRUTE)
A.visible_message("<span class='warning'>[A] strikes [D] with their closed fist!</span>")
return 1
+5 -5
View File
@@ -26,7 +26,7 @@
if(D.stat || D.weakened)
return 0
A.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>")
playsound(get_turf(A), "swing_hit", 50, 1, -1)
playsound(get_turf(A), /decl/sound_category/swing_hit_sound, 50, 1, -1)
D.apply_damage(5, BRUTE)
D.Weaken(2)
return 1
@@ -43,7 +43,7 @@
/datum/martial_art/sol_combat/proc/neck_chop(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
A.do_attack_animation(D)
A.visible_message("<span class='warning'>[A] karate chops [D]'s neck!</span>")
playsound(get_turf(A), "punch", 50, 1, -1)
playsound(get_turf(A), /decl/sound_category/punch_sound, 50, 1, -1)
D.apply_damage(5, BRUTE)
D.silent += 10
return 1
@@ -66,9 +66,9 @@ datum/martial_art/sol_combat/grab_act(var/mob/living/carbon/human/A, var/mob/liv
picked_hit_type = "stomped on"
D.apply_damage(bonus_damage, BRUTE)
if(picked_hit_type == "kicked" || picked_hit_type == "stomped")
playsound(get_turf(D), "swing_hit", 50, 1, -1)
playsound(get_turf(D), /decl/sound_category/swing_hit_sound, 50, 1, -1)
else
playsound(get_turf(D), "punch", 50, 1, -1)
playsound(get_turf(D), /decl/sound_category/punch_sound, 50, 1, -1)
A.visible_message("<span class='danger'>[A] [picked_hit_type] [D]!</span>")
A.attack_log += text("\[[time_stamp()]\] <font color='red'>["[picked_hit_type]"] [D.name] ([D.ckey])</font>")
@@ -96,7 +96,7 @@ datum/martial_art/sol_combat/grab_act(var/mob/living/carbon/human/A, var/mob/liv
A.put_in_hands(I)
else
A.visible_message("<span class='danger'>[A] attempted to disarm [D]!</span>")
playsound(D, "punchmiss", 25, 1, -1)
playsound(D, /decl/sound_category/punchmiss_sound, 25, 1, -1)
return 1
/datum/martial_art/sol_combat/proc/sol_combat_help()
+2 -2
View File
@@ -55,7 +55,7 @@
return 0
TornadoAnimate(A)
A.visible_message("<span class='warning'>[A] sweeps [D] with their tail!</span>")
playsound(get_turf(A), "swing_hit", 50, 1, -1)
playsound(get_turf(A), /decl/sound_category/swing_hit_sound, 50, 1, -1)
D.apply_damage(5, BRUTE)
D.Weaken(2)
return 1
@@ -77,7 +77,7 @@
playsound(D, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
else
D.visible_message("<span class='danger'>[A] attempted to disarm [D]!</span>")
playsound(D, "punchmiss", 25, 1, -1)
playsound(D, /decl/sound_category/punchmiss_sound, 25, 1, -1)
return 1
/datum/martial_art/kis_khan/proc/hammering_strike(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
+5 -6
View File
@@ -104,9 +104,9 @@
//for use in material weapons. because tiles and stacks sound different. since cardboard baseball bats sound different from wooden ones and et cetera.
var/weapon_drop_sound = 'sound/items/drop/metalweapon.ogg'
var/weapon_pickup_sound = 'sound/items/pickup/metalweapon.ogg'
var/weapon_hitsound = "swing_hit"
var/weapon_hitsound = /decl/sound_category/swing_hit_sound
var/shatter_sound = "glass_break" //sound it makes when it breaks.
var/shatter_sound = /decl/sound_category/glass_break_sound //sound it makes when it breaks.
/material/proc/build_rod_product(var/mob/user, var/obj/item/stack/used_stack, var/obj/item/stack/target_stack)
if(!rod_product)
@@ -701,7 +701,7 @@
dooropen_noise = 'sound/effects/doorcreaky.ogg'
door_icon_base = "wood"
destruction_desc = "splinters"
shatter_sound = "shatter_wood"
shatter_sound = /decl/sound_category/wood_break_sound
sheet_singular_name = "plank"
sheet_plural_name = "planks"
golem = SPECIES_GOLEM_WOOD
@@ -711,7 +711,7 @@
weapon_drop_sound = 'sound/items/drop/woodweapon.ogg'
weapon_pickup_sound = 'sound/items/pickup/woodweapon.ogg'
weapon_hitsound = 'sound/weapons/woodenhit.ogg'
shatter_sound = "wood_break"
shatter_sound = /decl/sound_category/wood_break_sound
/material/wood/log //This is gonna replace wood planks in a way for NBT, leaving it here for now
name = MATERIAL_WOOD_LOG
@@ -777,12 +777,11 @@
stack_origin_tech = list(TECH_MATERIAL = 1)
door_icon_base = "wood"
destruction_desc = "crumples"
shatter_sound = "shatter_cardboard"
shatter_sound = /decl/sound_category/cardboard_break_sound
golem = SPECIES_GOLEM_CARDBOARD
drop_sound = 'sound/items/drop/cardboardbox.ogg'
pickup_sound = 'sound/items/pickup/cardboardbox.ogg'
weapon_hitsound = 'sound/weapons/cardboardhit.ogg'
shatter_sound = "cardboard_break"
/material/cult
name = MATERIAL_CULT
+2 -2
View File
@@ -69,7 +69,7 @@
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINEERING = 1)
attack_verb = list("hit", "pierced", "sliced", "attacked")
hitsound = 'sound/weapons/rapidslice.ogg'
var/drill_sound = "pickaxe"
var/drill_sound = /decl/sound_category/pickaxe_sound
var/drill_verb = "excavating"
var/autodrill = 0 //pickaxes must be manually swung to mine, drills can mine rocks via bump
sharp = TRUE
@@ -78,7 +78,7 @@
var/excavation_amount = 40
var/wielded = FALSE
var/wield_sound = "wield_generic"
var/wield_sound = /decl/sound_category/generic_wield_sound
var/unwield_sound = null
var/force_unwielded = 5.0
var/force_wielded = 15.0
+2 -2
View File
@@ -63,7 +63,7 @@
canSmoothWith = null
openspace_override_type = /turf/simulated/open/chasm/airless
footstep_sound = "asteroid"
footstep_sound = /decl/sound_category/asteroid_footstep
/turf/unsimulated/floor/asteroid/basalt/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
underlay_appearance.icon = icon
@@ -92,7 +92,7 @@
smooth = SMOOTH_MORE | SMOOTH_BORDER | SMOOTH_NO_CLEAR_ICON
base_icon = 'icons/turf/smooth/ash.dmi'
base_icon_state = "ash"
footstep_sound = "sand"
footstep_sound = /decl/sound_category/sand_footstep
does_footprint = TRUE
footprint_color = COLOR_ASH
track_distance = 6
+1 -1
View File
@@ -550,7 +550,7 @@ var/list/mineral_can_smooth_with = list(
var/dug = 0 //Increments by 1 everytime it's dug. 11 is the last integer that should ever be here.
var/digging
has_resources = 1
footstep_sound = "gravelstep"
footstep_sound = /decl/sound_category/asteroid_footstep
roof_type = null
+1 -1
View File
@@ -307,7 +307,7 @@
var/mob/living/simple_animal/S = M
S.adjustBruteLoss(15)
do_attack_animation(M)
playsound(loc, "swing_hit", 50, 1, -1)
playsound(loc, /decl/sound_category/swing_hit_sound, 50, 1, -1)
is_attacking = 1
update_icon()
addtimer(CALLBACK(src, .proc/stop_attacking_cb), 2)
@@ -40,7 +40,7 @@
step_away(src,M,15)
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
playsound(loc, /decl/sound_category/punch_sound, 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("<span class='danger'>[] has punched []!</span>", M, src), 1)
@@ -52,7 +52,7 @@
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, "punchmiss", 25, 1, -1)
playsound(loc, /decl/sound_category/punchmiss_sound, 25, 1, -1)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("<span class='danger'>[] has attempted to punch []!</span>", M, src), 1)
+1 -1
View File
@@ -143,7 +143,7 @@
return 0
src.apply_damage(shock_damage, BURN, def_zone, used_weapon="Electrocution")
playsound(loc, "sparks", 50, 1, -1)
playsound(loc, /decl/sound_category/spark_sound, 50, 1, -1)
if(shock_damage > 15 || tesla_shock)
src.visible_message(
SPAN_WARNING("[src] was shocked by the [source]!"), \
@@ -559,7 +559,7 @@
apply_damage(shock_damage, BURN, area, used_weapon="Electrocution")
shock_damage *= 0.4
playsound(loc, "sparks", 50, 1, -1)
playsound(loc, /decl/sound_category/spark_sound, 50, 1, -1)
if (shock_damage > 15)
visible_message(
@@ -1715,11 +1715,11 @@
if(self)
U.visible_message(SPAN_DANGER("[U] pops their [current_limb.joint] back in!"), \
SPAN_DANGER("You pop your [current_limb.joint] back in!"))
playsound(src.loc, "fracture", 50, 1, -2)
playsound(src.loc, /decl/sound_category/fracture_sound, 50, 1, -2)
else
U.visible_message(SPAN_DANGER("[U] pops [S]'s [current_limb.joint] back in!"), \
SPAN_DANGER("You pop [S]'s [current_limb.joint] back in!"))
playsound(src.loc, "fracture", 50, 1, -2)
playsound(src.loc, /decl/sound_category/fracture_sound, 50, 1, -2)
current_limb.undislocate()
/mob/living/carbon/human/drop_from_inventory(var/obj/item/W, var/atom/target = null)
@@ -80,7 +80,7 @@
H.do_attack_animation(src)
var/damage = rand(0, 9)
if(!damage)
playsound(loc, "punchmiss", 25, 1, -1)
playsound(loc, /decl/sound_category/punchmiss_sound, 25, 1, -1)
visible_message("<span class='danger'>[H] has attempted to punch [src]!</span>")
return 0
var/obj/item/organ/external/affecting = get_organ(ran_zone(H.zone_sel.selecting))
@@ -89,7 +89,7 @@
if(HULK in H.mutations)
damage += 5
playsound(loc, "punch", 25, 1, -1)
playsound(loc, /decl/sound_category/punch_sound, 25, 1, -1)
visible_message("<span class='danger'>[H] has punched [src]!</span>")
@@ -455,7 +455,7 @@
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
return
playsound(loc, "punchmiss", 25, 1, -1)
playsound(loc, /decl/sound_category/punchmiss_sound, 25, 1, -1)
visible_message("<span class='danger'>[M] attempted to disarm [src]!</span>")
return
@@ -19,7 +19,7 @@ emp_act
if(martial_art && martial_art.deflection_chance)
if(prob(martial_art.deflection_chance))
src.visible_message("<span class='danger'>\The [src] deflects \the [P]!</span>")
playsound(src, "bulletflyby_sound", 75, 1)
playsound(src, /decl/sound_category/bulletflyby_sound, 75, 1)
return 0
def_zone = check_zone(def_zone)
@@ -102,7 +102,7 @@
var/list/equipment_overlays = list() // Extra overlays from equipped items
var/is_noisy = FALSE // if TRUE, movement should make sound.
var/bodyfall_sound = "bodyfall"
var/bodyfall_sound = /decl/sound_category/bodyfall_sound
var/last_x = 0
var/last_y = 0
@@ -241,7 +241,7 @@
var/default_accent = ACCENT_CETI
var/zombie_type //What zombie species they become
var/list/character_color_presets
var/bodyfall_sound = "bodyfall" //default, can be used for species specific falling sounds
var/bodyfall_sound = /decl/sound_category/bodyfall_sound //default, can be used for species specific falling sounds
/datum/species/proc/get_eyes(var/mob/living/carbon/human/H)
return
@@ -378,7 +378,7 @@ var/global/list/golem_types = list(SPECIES_GOLEM_COAL,
death_message = "shatters into many shards!"
death_message_range = 7
death_sound = "glass_break"
death_sound = /decl/sound_category/glass_break_sound
heat_level_1 = T0C+350
heat_level_2 = T0C+550
@@ -114,7 +114,7 @@
allowed_citizenships = list(CITIZENSHIP_NONE, CITIZENSHIP_BIESEL, CITIZENSHIP_COALITION, CITIZENSHIP_ERIDANI, CITIZENSHIP_ELYRA, CITIZENSHIP_GOLDEN)
default_citizenship = CITIZENSHIP_NONE
bodyfall_sound = "bodyfall_machine"
bodyfall_sound = /decl/sound_category/bodyfall_machine_sound
allowed_accents = list(ACCENT_CETI, ACCENT_GIBSON, ACCENT_SOL, ACCENT_COC, ACCENT_ERIDANI, ACCENT_ERIDANIDREG, ACCENT_ELYRA, ACCENT_KONYAN, ACCENT_JUPITER, ACCENT_MARTIAN, ACCENT_LUNA,
ACCENT_HIMEO, ACCENT_VENUS, ACCENT_VENUSJIN, ACCENT_PHONG, ACCENT_TTS)
@@ -71,7 +71,7 @@
/mob/living/carbon/human/proc/check_tag,
/mob/living/carbon/human/proc/tie_hair)
bodyfall_sound = "bodyfall"
bodyfall_sound = /decl/sound_category/bodyfall_sound
allowed_accents = list(ACCENT_CETI, ACCENT_GIBSON, ACCENT_SOL, ACCENT_COC, ACCENT_ERIDANI, ACCENT_ERIDANIDREG, ACCENT_ELYRA, ACCENT_KONYAN, ACCENT_JUPITER, ACCENT_MARTIAN, ACCENT_LUNA,
ACCENT_HIMEO, ACCENT_VENUS, ACCENT_VENUSJIN, ACCENT_PHONG, ACCENT_SILVERSUN, ACCENT_TTS)
@@ -5,8 +5,8 @@ var/global/list/sparring_attack_cache = list()
var/attack_verb = list("attack") // Empty hand hurt intent verb.
var/attack_noun = list("fist")
var/damage = 0 // Extra empty hand attack damage.
var/attack_sound = "punch"
var/miss_sound = "punchmiss"
var/attack_sound = /decl/sound_category/punch_sound
var/miss_sound = /decl/sound_category/punchmiss_sound
var/shredding = 0 // Calls the old attack_alien() behavior on objects/mobs when on harm intent.
var/sharp = 0
var/edge = 0
@@ -197,7 +197,7 @@ var/global/list/sparring_attack_cache = list()
/datum/unarmed_attack/kick
attack_verb = list("kicked", "kicked", "kicked", "kneed")
attack_noun = list("kick", "kick", "kick", "knee strike")
attack_sound = "swing_hit"
attack_sound = /decl/sound_category/swing_hit_sound
damage = 0
attack_name = "kick"
@@ -242,7 +242,7 @@ var/global/list/sparring_attack_cache = list()
/datum/unarmed_attack/stomp
attack_verb = null
attack_noun = list("stomp")
attack_sound = "swing_hit"
attack_sound = /decl/sound_category/swing_hit_sound
damage = 0
attack_name = "stomp"
@@ -284,7 +284,7 @@
if(victim == M)
if(prob(60))
visible_message(SPAN_WARNING("[M] attempts to wrestle \the [name] off!"))
playsound(loc, "punchmiss", 25, 1, -1)
playsound(loc, /decl/sound_category/punchmiss_sound, 25, 1, -1)
else
visible_message(SPAN_WARNING("[M] manages to wrestle \the [name] off!"))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
@@ -305,7 +305,7 @@
else
if(prob(30))
visible_message(SPAN_WARNING("[M] attempts to wrestle \the [name] off of [victim]!"))
playsound(loc, "punchmiss", 25, 1, -1)
playsound(loc, /decl/sound_category/punchmiss_sound, 25, 1, -1)
else
visible_message(SPAN_WARNING("[M] manages to wrestle \the [name] off of [victim]!"))
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
@@ -364,14 +364,14 @@
sleep(3)
step_away(src,M,15)
playsound(loc, "punch", 25, 1, -1)
playsound(loc, /decl/sound_category/punch_sound, 25, 1, -1)
visible_message(SPAN_DANGER("[M] has punched [src]!"), \
SPAN_DANGER("[M] has punched [src]!"))
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, "punchmiss", 25, 1, -1)
playsound(loc, /decl/sound_category/punchmiss_sound, 25, 1, -1)
visible_message(SPAN_DANGER("[M] has attempted to punch [src]!"))
return
@@ -695,7 +695,7 @@
update_icon()
if(do_after(src, 32))
src.visible_message(SPAN_WARNING("[src] rips up \the [T]."))
playsound(src.loc, "crowbar", 100, 1)
playsound(src.loc, /decl/sound_category/crowbar_sound, 100, 1)
T.make_plating(1)
busy = 0
update_icon()
@@ -246,7 +246,7 @@ mob/living/simple_animal/hostile/hitby(atom/movable/AM as mob|obj,var/speed = TH
if(casingtype)
new casingtype(get_turf(src))
playsound(src, "casing_drop", 50, 1)
playsound(src, /decl/sound_category/casing_drop_sound, 50, 1)
stance = HOSTILE_STANCE_IDLE
target_mob = null
@@ -82,7 +82,7 @@
melee_damage_lower = 0
melee_damage_upper = 0
attacktext = "barrels into"
attack_sound = "punch"
attack_sound = /decl/sound_category/punch_sound
a_intent = I_HURT
speak_emote = list("chirps","buzzes","whirrs")
emote_hear = list("chirps cheerfully","buzzes","whirrs","hums placidly","chirps","hums")
@@ -694,7 +694,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
//Todo: add snowflakey shit to it.
/mob/living/simple_animal/electrocute_act(var/shock_damage, var/obj/source, var/base_siemens_coeff = 1.0, var/def_zone = null, var/tesla_shock = 0, var/ground_zero)
apply_damage(shock_damage, BURN)
playsound(loc, "sparks", 50, 1, -1)
playsound(loc, /decl/sound_category/spark_sound, 50, 1, -1)
spark(loc, 5, alldirs)
visible_message(SPAN_WARNING("\The [src] was shocked by \the [source]!"), SPAN_WARNING("You are shocked by \the [source]!"), SPAN_WARNING("You hear an electrical crack!"))
+1 -1
View File
@@ -108,7 +108,7 @@
target.apply_effect(20, PARALYZE)
target.visible_message("<span class='danger'>[target] [target.species.knockout_message]</span>")
playsound(attacker.loc, "swing_hit", 25, 1, -1)
playsound(attacker.loc, /decl/sound_category/swing_hit_sound, 25, 1, -1)
attacker.attack_log += text("\[[time_stamp()]\] <font color='red'>Headbutted [target.name] ([target.ckey])</font>")
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Headbutted by [attacker.name] ([attacker.ckey])</font>")
msg_admin_attack("[key_name(attacker)] has headbutted [key_name(target)]",ckey=key_name(attacker),ckey_target=key_name(target))
@@ -47,7 +47,7 @@
check_update_ui_need()
if(working && enabled && world.time > ambience_last_played + 30 SECONDS && prob(3))
playsound(get_turf(src), "computerbeep", 30, 1, 10, required_preferences = SOUND_AMBIENCE)
playsound(get_turf(src), /decl/sound_category/computerbeep_sound, 30, 1, 10, required_preferences = SOUND_AMBIENCE)
ambience_last_played = world.time
/obj/item/modular_computer/proc/get_preset_programs(preset_type)
+3 -3
View File
@@ -468,7 +468,7 @@
if(51 to INFINITY)
playsound(src.loc, "sound/weapons/heavysmash.ogg", 100, 1)
else
playsound(src.loc, "swing_hit", 75, 1)
playsound(src.loc, /decl/sound_category/swing_hit_sound, 75, 1)
else
playsound(src.loc, "sound/weapons/smash.ogg", 75, 1)
@@ -621,11 +621,11 @@
if(-INFINITY to 10)
playsound(src.loc, "sound/weapons/bladeslice.ogg", 50, 1)
if(11 to 50)
playsound(src.loc, "punch", 75, 1)
playsound(src.loc, /decl/sound_category/punch_sound, 75, 1)
if(51 to INFINITY)
playsound(src.loc, "sound/weapons/heavysmash.ogg", 100, 1)
else
playsound(src.loc, "swing_hit", 75, 1)
playsound(src.loc, /decl/sound_category/swing_hit_sound, 75, 1)
else
playsound(src.loc, "sound/weapons/smash.ogg", 75, 1)
+1 -1
View File
@@ -1009,7 +1009,7 @@ Note that amputating the affected organ does in fact remove the infection from t
owner.emote("scream")
owner.flash_strong_pain()
playsound(src.loc, "fracture", 100, 1, -2)
playsound(src.loc, /decl/sound_category/fracture_sound, 100, 1, -2)
status |= ORGAN_BROKEN
broken_description = pick("Broken","Fracture","Hairline fracture")
perma_injury = brute_dam
+2 -2
View File
@@ -156,13 +156,13 @@
insert_sheet_at(usr, page+1, in_hand)
else if(page != pages.len)
page++
playsound(src.loc, "pageturn", 50, 1)
playsound(src.loc, /decl/sound_category/page_sound, 50, 1)
if(href_list["prev_page"])
if(in_hand && (istype(in_hand, /obj/item/paper) || istype(in_hand, /obj/item/photo)))
insert_sheet_at(usr, page, in_hand)
else if(page > 1)
page--
playsound(src.loc, "pageturn", 50, 1)
playsound(src.loc, /decl/sound_category/page_sound, 50, 1)
if(href_list["remove"])
var/obj/item/W = pages[page]
usr.put_in_hands(W)
+1 -1
View File
@@ -106,7 +106,7 @@ VUEUI_MONITOR_VARS(/obj/machinery/photocopier, photocopiermonitor)
if(toner <= 10) //allow replacing when low toner is affecting the print darkness
to_chat(user, SPAN_NOTICE("You insert \the [O] into \the [src]."))
flick("photocopier_toner", src)
playsound(loc, "switchsounds", 50, 1)
playsound(loc, /decl/sound_category/switch_sound, 50, 1)
var/obj/item/device/toner/T = O
toner += T.toner_amount
user.drop_from_inventory(O,get_turf(src))
+1 -1
View File
@@ -96,7 +96,7 @@ var/global/photo_count = 0
var/mob/M = usr
if(!( istype(over_object, /obj/screen) ))
return ..()
playsound(loc, "rustle", 50, 1, -5)
playsound(loc, /decl/sound_category/rustle_sound, 50, 1, -5)
if((!( M.restrained() ) && !( M.stat ) && M.back == src))
switch(over_object.name)
if(BP_R_HAND)
+1 -1
View File
@@ -118,7 +118,7 @@
use_power = 0
req_access = list(access_engine_equip)
gfi_layer_rotation = GFI_ROTATION_DEFDIR
clicksound = "switch"
clicksound = /decl/sound_category/switch_sound
var/area/area
var/areastring = null
var/obj/item/cell/cell
+1 -1
View File
@@ -25,7 +25,7 @@
density = 1
anchored = 1
use_power = 0
clicksound = "switch"
clicksound = /decl/sound_category/switch_sound
var/capacity = 5e6 // maximum charge
var/charge = 1e6 // actual charge
+2 -2
View File
@@ -16,7 +16,7 @@
var/obj/item/projectile/BB = null //The loaded bullet - make it so that the projectiles are created only when needed?
var/spent_icon = "s-casing-spent"
drop_sound = "casing_drop"
drop_sound = /decl/sound_category/casing_drop_sound
pickup_sound = 'sound/items/pickup/ring.ogg'
var/reload_sound = 'sound/weapons/reload_bullet.ogg' //sound that plays when inserted into gun.
@@ -147,7 +147,7 @@
to_chat(user, "<span class='notice'>You empty [src].</span>")
for(var/obj/item/ammo_casing/C in stored_ammo)
C.forceMove(user.loc)
playsound(C, "casing_drop", 50, FALSE)
playsound(C, /decl/sound_category/casing_drop_sound, 50, FALSE)
C.set_dir(pick(alldirs))
stored_ammo.Cut()
update_icon()
+1 -1
View File
@@ -104,7 +104,7 @@
var/wielded = 0
var/needspin = TRUE
var/is_wieldable = FALSE
var/wield_sound = "wield_generic"
var/wield_sound = /decl/sound_category/generic_wield_sound
var/unwield_sound = null
//aiming system stuff
@@ -11,7 +11,7 @@
sharp = 1
edge = 0
drop_sound = 'sound/items/drop/sword.ogg'
pickup_sound = "pickup_sword"
pickup_sound = /decl/sound_category/sword_pickup_sound
/obj/item/arrow/proc/removed() //Helper for metal rods falling apart.
return
@@ -27,7 +27,7 @@
icon_state = "metal-rod"
item_state = "bolt"
drop_sound = 'sound/items/drop/sword.ogg'
pickup_sound = "pickup_sword"
pickup_sound = /decl/sound_category/sword_pickup_sound
/obj/item/arrow/quill
name = "vox quill"
+2 -2
View File
@@ -106,7 +106,7 @@
if(EJECT_CASINGS) //eject casing onto ground.
chambered.forceMove(get_turf(src))
chambered.throw_at(get_ranged_target_turf(get_turf(src),turn(loc.dir,270),1), rand(0,1), 5)
playsound(chambered, "casing_drop", 50, FALSE)
playsound(chambered, /decl/sound_category/casing_drop_sound, 50, FALSE)
if(CYCLE_CASINGS) //cycle the casing back to the end.
if(ammo_magazine)
ammo_magazine.stored_ammo += chambered
@@ -188,7 +188,7 @@
if(T)
for(var/obj/item/ammo_casing/C in loaded)
C.forceMove(T)
playsound(C, "casing_drop", 50, FALSE)
playsound(C, /decl/sound_category/casing_drop_sound, 50, FALSE)
count++
loaded.Cut()
if(count)
@@ -236,7 +236,7 @@
item_state = "gauss_thumper"
caliber = "gauss"
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2)
fire_sound = "gauss_fire"
fire_sound = /decl/sound_category/gauss_fire_sound
load_method = MAGAZINE
handle_casings = DELETE_CASINGS
@@ -265,7 +265,7 @@
desc = "An outdated and power hungry gauss cannon, modified to deliver high explosive rounds at high velocities."
icon = 'icons/obj/guns/gauss_thumper.dmi'
icon_state = "gauss_thumper"
fire_sound = "gauss_fire"
fire_sound = /decl/sound_category/gauss_fire_sound
fire_delay = 30
charge_meter = 0
max_shots = 3
+1 -1
View File
@@ -182,7 +182,7 @@
if(result == PROJECTILE_FORCE_MISS && (can_miss == 0)) //if you're shooting at point blank you can't miss.
if(!silenced)
target_mob.visible_message("<span class='notice'>\The [src] misses [target_mob] narrowly!</span>")
playsound(target_mob, "bulletflyby", rand(10, 50), 1)
playsound(target_mob, /decl/sound_category/bulletflyby_sound, 50, 1)
return FALSE
//hit messages
@@ -267,7 +267,7 @@
/obj/item/projectile/magic/teleport/on_hit(var/atom/hit_atom)
var/turf/T = get_turf(hit_atom)
single_spark(T)
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, /decl/sound_category/spark_sound, 50, 1)
if(isliving(hit_atom))
blink_mob(hit_atom)
return ..()
@@ -107,7 +107,7 @@
if(istype(target,/obj/item/clothing/mask/smokable/cigarette))
var/obj/item/clothing/mask/smokable/cigarette/S = target
S.light(SPAN_NOTICE("\The [user] snaps [user.get_pronoun("his")] fingers and \the [S] lights up."))
playsound(S.loc, "sparks", 50, 1)
playsound(S.loc, /decl/sound_category/spark_sound, 50, 1)
else
var/datum/effect_system/sparks/spark_system
spark_system = bind_spark(src, 3)
+1 -1
View File
@@ -14,7 +14,7 @@
use_power = 1
idle_power_usage = 20
layer = 2.9
clicksound = "button"
clicksound = /decl/sound_category/button_sound
var/beaker = null
var/obj/item/storage/pill_bottle/loaded_pill_bottle = null
@@ -3,7 +3,7 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "dispenser"
var/icon_state_active = "dispenser_active"
clicksound = "button"
clicksound = /decl/sound_category/button_sound
var/list/spawn_cartridges = null // Set to a list of types to spawn one of each on New()
@@ -11,7 +11,7 @@
volume = 100
item_state = "broken_beer" //Generic held-item sprite until unique ones are made.
force = 5
hitsound = "bottlehit_intact"
hitsound = /decl/sound_category/bottle_hit_intact_sound
var/smash_duration = 5 //Directly relates to the 'weaken' duration. Lowered by armor (i.e. helmets)
matter = list(MATERIAL_GLASS = 800)
@@ -69,7 +69,7 @@
var/mob/living/L = against
L.IgniteMob()
playsound(src, 'sound/weapons/bottle_break.ogg', 70, FALSE)
playsound(src, /decl/sound_category/glass_break_sound, 70, 1)
src.transfer_fingerprints_to(B)
qdel(src)
@@ -178,7 +178,7 @@
attack_verb = list("stabbed", "slashed", "attacked")
sharp = TRUE
edge = FALSE
hitsound = "bottlehit_broken"
hitsound = /decl/sound_category/bottle_hit_broken
var/icon/broken_outline = icon('icons/obj/drinks.dmi', "broken")
w_class = 2
@@ -73,7 +73,7 @@
if(reagents.total_volume)
reagents.splash(src.loc, reagents.total_volume) // splashes the mob holding it or the turf it's on
audible_message(SPAN_WARNING("\The [src] shatters with a resounding crash!"), SPAN_WARNING("\The [src] breaks."))
playsound(src, "glass_break", 70, 1)
playsound(src, /decl/sound_category/glass_break_sound, 70, 1)
new /obj/item/material/shard(loc, "glass")
qdel(src)
@@ -139,7 +139,7 @@
force = 10.0
desc = "A smaller, more precise version of the pickaxe (30 centimetre excavation depth)."
excavation_amount = 15
drill_sound = "pickaxe"
drill_sound = /decl/sound_category/pickaxe_sound
drill_verb = "clearing"
w_class = 3
can_wield = 0
@@ -69,7 +69,7 @@
H.confused += 10
H.stuttering += 5
to_chat(H, "<span class='danger'>You suddenly feel as if your head was hit by something!</span>")
playsound(get_turf(H), "punch", 50, 1, -1)
playsound(get_turf(H), /decl/sound_category/punch_sound, 50, 1, -1)
cooldown = world.time + cooldown_time
+1 -1
View File
@@ -189,7 +189,7 @@
var/obj/item/melee/energy/blade/blade = W
blade.spark_system.queue()
playsound(src.loc, 'sound/weapons/blade.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, /decl/sound_category/spark_sound, 50, 1)
user.visible_message("<span class='danger'>\The [src] was sliced apart by [user]!</span>")
break_to_parts()
return
+2 -2
View File
@@ -20,7 +20,7 @@
/obj/item/bluespace_crystal/attack_self(mob/user)
user.visible_message("<span class='warning'>[user] crushes [src]!</span>", "<span class='danger'>You crush [src]!</span>")
single_spark(loc)
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, /decl/sound_category/spark_sound, 50, 1)
blink_mob(user)
user.unEquip(src)
qdel(src)
@@ -33,7 +33,7 @@
visible_message("<span class='notice'>[src] fizzles and disappears upon impact!</span>")
var/turf/T = get_turf(hit_atom)
single_spark(T)
playsound(src.loc, "sparks", 50, 1)
playsound(src.loc, /decl/sound_category/spark_sound, 50, 1)
if(isliving(hit_atom))
blink_mob(hit_atom)
qdel(src)