diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 91dfe014abb..1f916c406a3 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -20,17 +20,21 @@ /obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters) return +obj/item/proc/get_clamped_volume() + if(src.force && src.w_class) + return Clamp((src.force + src.w_class) * 4, 30, 100)// Add the item's force to its weight class and multiply by 4, then clamp the value between 30 and 100 + else if(!src.force && src.w_class) + return Clamp(src.w_class * 6, 10, 100) // Multiply the item's weight class by 6, then clamp the value between 10 and 100 /obj/item/proc/attack(mob/living/M as mob, mob/living/user as mob, def_zone) if (!istype(M)) // not sure if this is the right thing... return - var/messagesource = M - if (istype(M,/mob/living/carbon/brain)) - messagesource = M:container - if (hitsound) - playsound(loc, hitsound, 50, 1, -1) + if (hitsound && force > 0) //If an item's hitsound is defined and the item's force is greater than zero... + playsound(loc, hitsound, get_clamped_volume(), 1, -1) //...play the item's hitsound at get_clamped_volume() with varying frequency and -1 extra range. + else if (force == 0)//Otherwise, if the item's force is zero... + playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), 1, -1)//...play tap.ogg at get_clamped_volume() ///////////////////////// user.lastattacked = M M.lastattacker = user @@ -119,15 +123,19 @@ var/showname = "." if(user) - showname = " by [user]." + showname = " by [user]!" if(!(user in viewers(M, null))) showname = "." - for(var/mob/O in viewers(messagesource, null)) - if(attack_verb.len) - O.show_message("\red [M] has been [pick(attack_verb)] with [src][showname] ", 1) - else - O.show_message("\red [M] has been attacked with [src][showname] ", 1) + if(attack_verb && attack_verb.len) + M.visible_message("[M] has been [pick(attack_verb)] with [src][showname]", + "[M] has been [pick(attack_verb)] with [src][showname]!") + else if(force == 0) + M.visible_message("[M] has been [pick("tapped","patted")] with [src][showname]", + "[M] has been [pick("tapped","patted")] with [src][showname]") + else + M.visible_message("[M] has been attacked with [src][showname]", + "[M] has been attacked with [src][showname]") if(!showname && user) if(user.client) @@ -146,7 +154,7 @@ else M.take_organ_damage(power) - if (prob(33)) // Added blood for whacking non-humans too + if (prob(33) && src.force) // Added blood for whacking non-humans too var/turf/location = M.loc if (istype(location, /turf/simulated)) location.add_blood_floor(M) @@ -156,4 +164,4 @@ M << "Aargh it burns!" M.updatehealth() add_fingerprint(user) - return 1 + return 1 \ No newline at end of file diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index a25d52aca69..38f72ab1255 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -117,14 +117,17 @@ icon = 'icons/obj/items.dmi' icon_state = "bike_horn" item_state = "bike_horn" - hitsound = 'sound/items/bikehorn.ogg' throwforce = 3 + hitsound = null //To prevent tap.ogg playing, as the item lacks of force w_class = 1.0 throw_speed = 3 throw_range = 15 attack_verb = list("HONKED") var/spam_flag = 0 +/obj/item/weapon/bikehorn/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) + playsound(loc, 'sound/items/bikehorn.ogg', 50, 1, -1) //plays instead of tap.ogg! + return ..() /obj/item/weapon/c_tube name = "cardboard tube" @@ -371,10 +374,7 @@ m_amt = 15000 origin_tech = "materials=2;combat=1" attack_verb = list("chopped", "torn", "cut") - -/obj/item/weapon/hatchet/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - return ..() + hitsound = 'sound/weapons/bladeslice.ogg' /obj/item/weapon/scythe icon_state = "scythe0" @@ -389,6 +389,7 @@ slot_flags = SLOT_BACK origin_tech = "materials=2;combat=2" attack_verb = list("chopped", "sliced", "cut", "reaped") + hitsound = 'sound/weapons/bladeslice.ogg' /obj/item/weapon/scythe/afterattack(atom/A, mob/user as mob, proximity) if(!proximity) return diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index bc0ef8bd8ad..63690a30078 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -7,12 +7,12 @@ w_class = 4 force = 30 throwforce = 10 + hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") /obj/item/weapon/melee/cultblade/attack(mob/living/target as mob, mob/living/carbon/human/user as mob) if(iscultist(user)) - playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) return ..() else user.Paralyse(5) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 5199e4212c8..d3c870e3b76 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -13,6 +13,7 @@ throwforce = 10 w_class = 3 var/charged = 1 + hitsound = 'sound/weapons/bladeslice.ogg' /obj/effect/rend name = "tear in the fabric of reality" diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 16e85a4b41b..e6b079517bd 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -399,13 +399,13 @@ force = 30 icon_state = "sword[item_color]" w_class = 4 - playsound(user, 'sound/weapons/saberon.ogg', 50, 1) + playsound(user, 'sound/weapons/saberon.ogg', 20, 1) user << "\blue [src] is now active." else force = 3 icon_state = "sword0" w_class = 2 - playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) + playsound(user, 'sound/weapons/saberoff.ogg', 20, 1) user << "\blue [src] can now be concealed." add_fingerprint(user) return diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index e65456e7e41..329b762056b 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -13,7 +13,6 @@ var/slot_flags = 0 //This is used to determine on which slots an item can fit. pass_flags = PASSTABLE pressure_resistance = 5 -// causeerrorheresoifixthis var/obj/item/master = null var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, CHEST, GROIN, etc. flags. See setup.dm @@ -559,4 +558,4 @@ . = ..() if(.) transfer_blood = 0 - bloody_hands_mob = null + bloody_hands_mob = null diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index cdf7b874461..9542044e77c 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -248,6 +248,7 @@ item_state = "shard-glass" g_amt = 3750 attack_verb = list("stabbed", "slashed", "sliced", "cut") + hitsound = 'sound/weapons/bladeslice.ogg' suicide_act(mob/user) viewers(user) << pick("[user] is slitting \his wrists with the shard of glass! It looks like \he's trying to commit suicide.", \ @@ -268,12 +269,6 @@ pixel_x = rand(-5, 5) pixel_y = rand(-5, 5) - -/obj/item/weapon/shard/attack(mob/M, mob/user) - playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - ..() - - /obj/item/weapon/shard/afterattack(atom/A as mob|obj, mob/user, proximity) if(!proximity || !(src in user)) return if(isturf(A)) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 7a3f1645432..76d5b3fd5a5 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -314,7 +314,7 @@ active = !( active ) if (active) user << "\blue You extend the plastic blade with a quick flick of your wrist." - playsound(user, 'sound/weapons/saberon.ogg', 50, 1) + playsound(user, 'sound/weapons/saberon.ogg', 20, 1) if(hacked) icon_state = "swordrainbow" item_state = "swordrainbow" @@ -324,7 +324,7 @@ w_class = 4 else user << "\blue You push the plastic blade back down into the handle." - playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) + playsound(user, 'sound/weapons/saberoff.ogg', 20, 1) icon_state = "sword0" item_state = "sword0" w_class = 2 @@ -399,6 +399,7 @@ throwforce = 5 w_class = 3 attack_verb = list("attacked", "slashed", "stabbed", "sliced") + hitsound = 'sound/weapons/bladeslice.ogg' /* * Crayons diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index 4d60253787a..14446c051b7 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -24,14 +24,20 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/smoketime = 5 w_class = 1.0 origin_tech = "materials=1" - attack_verb = list("burnt", "singed") + attack_verb = null /obj/item/weapon/match/process() var/turf/location = get_turf(src) smoketime-- if(smoketime < 1) - icon_state = "match_burnt" lit = -1 + damtype = "brute" + force = 0 + icon_state = "match_burnt" + item_state = "cigoff" + name = "burnt match" + desc = "A match. This one has seen better days." + attack_verb = null processing_objects.Remove(src) return if(location) @@ -46,6 +52,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM item_state = "cigoff" name = "burnt match" desc = "A match. This one has seen better days." + attack_verb = null return ..() ////////////////// @@ -59,7 +66,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM item_state = "cigoff" w_class = 1 body_parts_covered = null - attack_verb = list("burnt", "singed") + attack_verb = null var/lit = 0 var/icon_on = "cigon" //Note - these are in masks.dmi not in cigarette.dmi var/icon_off = "cigoff" @@ -96,7 +103,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM else if(istype(W, /obj/item/weapon/match)) var/obj/item/weapon/match/M = W - if(M.lit) + if(M.lit == 1) //checking for lit = 1 instead of just lit prevents cigarettes being lit by used matches light("[user] lights their [name] with [W].") else if(istype(W, /obj/item/weapon/melee/energy/sword)) @@ -134,7 +141,12 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/cigarette/proc/light(var/flavor_text = "[usr] lights the [name].") if(!src.lit) src.lit = 1 - damtype = "fire" + name = "lit [name]" + if(!istype(src, /obj/item/clothing/mask/cigarette/pipe)) //can't burn people with pipes + attack_verb = list("burnt", "singed") + hitsound = 'sound/items/welder.ogg' + damtype = "fire" + force = 4 if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire var/datum/effect/effect/system/reagents_explosion/e = new() e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0) @@ -215,7 +227,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM /obj/item/clothing/mask/cigarette/attack(mob/living/carbon/M, mob/living/carbon/user) if(!istype(M)) return ..() - if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_sel && user.zone_sel.selecting == "mouth" && lit) var/obj/item/clothing/mask/cigarette/cig = M.wear_mask if(M == user) @@ -403,7 +414,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM throwforce = 4 flags = CONDUCT slot_flags = SLOT_BELT - attack_verb = list("burnt", "singed") + attack_verb = null var/lit = 0 /obj/item/weapon/lighter/zippo @@ -427,6 +438,10 @@ CIGARETTE PACKETS ARE IN FANCY.DM lit = 1 icon_state = icon_on item_state = icon_on + force = 5 + damtype = "fire" + hitsound = 'sound/items/welder.ogg' + attack_verb = list("burnt", "singed") if(istype(src, /obj/item/weapon/lighter/zippo) ) user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.") else @@ -443,6 +458,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM lit = 0 icon_state = icon_off item_state = icon_off + hitsound = "swing_hit" + force = 0 + attack_verb = null //human_defense.dm takes care of it if(istype(src, /obj/item/weapon/lighter/zippo) ) user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.") else diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 950938ffe16..85048a01bcb 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -25,6 +25,7 @@ flags = CONDUCT origin_tech = "materials=1" attack_verb = list("attacked", "stabbed", "poked") + hitsound = 'sound/weapons/bladeslice.ogg' /obj/item/weapon/kitchen/utensil/New() if (prob(60)) diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 4cf38f86e70..b866b42e76b 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -1,4 +1,4 @@ -/obj/item/weapon/melee/energy +/obj/item/weapon/melee/energy/ var/active = 0 /obj/item/weapon/melee/energy/suicide_act(mob/user) @@ -15,6 +15,7 @@ icon_state = "axe0" force = 40.0 throwforce = 25.0 + hitsound = 'sound/weapons/bladeslice.ogg' throw_speed = 1 throw_range = 5 w_class = 3.0 @@ -30,18 +31,18 @@ active = !active if(active) user << "[src] is now energised." - force = 150 + force = 150 //these are the drugs, friend + hitsound = 'sound/weapons/blade1.ogg' icon_state = "axe1" w_class = 5 else user << "[src] can now be concealed." force = 40 + hitsound = 'sound/weapons/bladeslice.ogg' icon_state = "axe0" - w_class = 5 + w_class = 3 //it goes back to three you goose add_fingerprint(user) - - /obj/item/weapon/melee/energy/sword color name = "energy sword" @@ -49,12 +50,12 @@ icon_state = "sword0" force = 3.0 throwforce = 5.0 + hitsound = "swing_hit" //it starts deactivated throw_speed = 1 throw_range = 5 w_class = 2.0 flags = NOSHIELD origin_tech = "magnets=3;syndicate=4" - attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") var/hacked = 0 /obj/item/weapon/melee/energy/sword/New() @@ -73,27 +74,30 @@ if (active) force = 30 throwforce = 20 + hitsound = 'sound/weapons/blade1.ogg' + attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") if(istype(src,/obj/item/weapon/melee/energy/sword/pirate)) icon_state = "cutlass1" else icon_state = "sword[item_color]" w_class = 4 - playsound(user, 'sound/weapons/saberon.ogg', 50, 1) + playsound(user, 'sound/weapons/saberon.ogg', 35, 1) //changed it from 50% volume to 35% because deafness user << "[src] is now active." else force = 3 throwforce = 5.0 + hitsound = "swing_hit" + attack_verb = null if(istype(src,/obj/item/weapon/melee/energy/sword/pirate)) icon_state = "cutlass0" else icon_state = "sword0" w_class = 2 - playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) + playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) //changed it from 50% volume to 35% because deafness user << "[src] can now be concealed." add_fingerprint(user) return - /obj/item/weapon/melee/energy/sword/attackby(obj/item/weapon/W, mob/living/user) ..() if(istype(W, /obj/item/weapon/melee/energy/sword)) @@ -160,6 +164,7 @@ desc = "A concentrated beam of energy in the shape of a blade. Very stylish... and lethal." icon_state = "blade" force = 70.0//Normal attacks deal very high damage. + hitsound = 'sound/weapons/blade1.ogg' throwforce = 1//Throwing or dropping the item deletes it. throw_speed = 1 throw_range = 1 diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 2c6de107607..8f0ce5dd728 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -10,6 +10,7 @@ w_class = 3 origin_tech = "combat=4" attack_verb = list("flogged", "whipped", "lashed", "disciplined") + hitsound = 'sound/weapons/slash.ogg' //pls replace /obj/item/weapon/melee/chainofcommand/suicide_act(mob/user) viewers(user) << "[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide." @@ -42,7 +43,6 @@ if(user.a_intent == "harm") if(!..()) return - playsound(loc, "swing_hit", 50, 1, -1) if(M.stuttering < 8 && !(HULK in M.mutations)) M.stuttering = 8 M.Stun(8) diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index 3dbf904cfd6..6a182bd67a4 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -66,14 +66,14 @@ force = 10 icon_state = "eshield[active]" w_class = 4 - playsound(user, 'sound/weapons/saberon.ogg', 50, 1) + playsound(user, 'sound/weapons/saberon.ogg', 35, 1) user << "[src] is now active." reflect_chance = 40 else force = 3 icon_state = "eshield[active]" w_class = 1 - playsound(user, 'sound/weapons/saberoff.ogg', 50, 1) + playsound(user, 'sound/weapons/saberoff.ogg', 35, 1) user << "[src] can now be concealed." reflect_chance = 0 add_fingerprint(user) diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 879622ab01a..0a837ca54ff 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -469,6 +469,13 @@ if(istype(W, /obj/item/weapon/match) && W.lit == 0) W.lit = 1 W.icon_state = "match_lit" + W.damtype = "fire" + W.force = 3 + W.hitsound = 'sound/items/welder.ogg' + W.item_state = "cigon" + W.name = "lit match" + W.desc = "A match. This one is lit." + W.attack_verb = list("burnt","singed") processing_objects.Add(W) W.update_icon() return diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index 09b7476a2e0..956ea6b4d63 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -12,6 +12,7 @@ w_class = 4.0 origin_tech = "combat=1" attack_verb = list("robusted") + hitsound = 'sound/weapons/smash.ogg' New() ..() diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index cf31fa357d4..b5fb3e95a77 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -108,9 +108,8 @@ if(user.a_intent == "harm") ..() - playsound(loc, "swing_hit", 50, 1, -1) - else if(!status) + if(!status) L.visible_message("[L] has been prodded with [src] by [user]. Luckily it was off.") return diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 8c468fe9957..acc493b84dd 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -3,6 +3,7 @@ icon = 'icons/obj/tank.dmi' flags = CONDUCT slot_flags = SLOT_BACK + hitsound = 'sound/weapons/smash.ogg' pressure_resistance = ONE_ATMOSPHERE*5 diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 8b952863b53..ee608e5e7b1 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -47,6 +47,7 @@ g_amt = 0 m_amt = 75 attack_verb = list("stabbed") + hitsound = 'sound/weapons/bladeslice.ogg' suicide_act(mob/user) viewers(user) << pick("[user] is stabbing the [src.name] into \his temple! It looks like \he's trying to commit suicide.", \ @@ -133,6 +134,7 @@ slot_flags = SLOT_BELT force = 3 throwforce = 5 + hitsound = "swing_hit" throw_speed = 1 throw_range = 5 w_class = 2 @@ -292,10 +294,11 @@ user << "You switch [src] on." force = 15 damtype = "fire" + hitsound = 'sound/items/welder.ogg' icon_state = "welder1" processing_objects.Add(src) else - user << "Need more fuel." + user << "You need more fuel." welding = 0 else if(!message) @@ -304,6 +307,7 @@ user << "[src] shuts off!" force = 3 damtype = "brute" + hitsound = "swing_hit" icon_state = "welder" welding = 0 diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 19ad56eb441..094b8ca786a 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -155,6 +155,7 @@ obj/item/weapon/twohanded/ force_unwielded = 5 force_wielded = 24 // Was 18, Buffed - RobRichards/RR attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut") + hitsound = 'sound/weapons/bladeslice.ogg' /obj/item/weapon/twohanded/fireaxe/update_icon() //Currently only here to fuck with the on-mob icons. icon_state = "fireaxe[wielded]" diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index a4ac8a098f6..ad672c49068 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -17,6 +17,7 @@ /obj/item/weapon/banhammer/attack(mob/M, mob/user) M << " You have been banned FOR NO REISIN by [user]" user << " You have BANNED [M]" + playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much /obj/item/weapon/nullrod @@ -56,6 +57,7 @@ desc = "What are you standing around staring at this for? Get to killing!" icon_state = "claymore" item_state = "claymore" + hitsound = 'sound/weapons/bladeslice.ogg' flags = CONDUCT slot_flags = SLOT_BELT force = 40 @@ -70,10 +72,6 @@ viewers(user) << "[user] is falling on the [src.name]! It looks like \he's trying to commit suicide." return(BRUTELOSS) -/obj/item/weapon/claymore/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - return ..() - /obj/item/weapon/katana name = "katana" desc = "Woefully underpowered in D20" diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index 533c752f118..adca34f56e8 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -1,7 +1,15 @@ -/obj/item/weapon +/obj/item/weapon/ name = "weapon" icon = 'icons/obj/weapons.dmi' +/obj/item/weapon/New() + ..() + if(!hitsound) + if(damtype == "fire") + hitsound = 'sound/items/welder.ogg' + if(damtype == "brute") + hitsound = "swing_hit" + /obj/item/weapon/Bump(mob/M as mob) spawn(0) ..() diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index be202d3f237..48b0cf35871 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -64,6 +64,7 @@ w_class = 2.0 m_amt = 50 attack_verb = list("slashed", "sliced", "cut", "clawed") + hitsound = 'sound/weapons/bladeslice.ogg' // ************************************* // Nutrient defines for hydroponics diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 3c2f8f79eee..4ed8d41f3a2 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -268,7 +268,7 @@ if(getorgan(/obj/item/organ/brain)) if(!key) - msg += "[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely\n" + msg += "[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely.\n" else if(!client) msg += "[t_He] [t_has] a vacant, braindead stare...\n" diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index c951aaf0797..c26efde1889 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -127,16 +127,19 @@ emp_act if((user != src) && check_shields(I.force, "the [I.name]")) return 0 - if(I.attack_verb.len) + if(I.attack_verb && I.attack_verb.len) visible_message("[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!", \ "[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!") + else if(I.force == 0) + visible_message("[src] has been [pick("tapped","patted")] on the [hit_area] with [I] by [user]!", \ + "[src] has been [pick("tapped","patted")] on the [hit_area] with [I] by [user]!") else visible_message("[src] has been attacked in the [hit_area] with [I] by [user]!", \ "[src] has been attacked in the [hit_area] with [I] by [user]!") + if(!I.force) return 0 var/armor = run_armor_check(affecting, "melee", "Your armour has protected your [hit_area].", "Your armour has softened a hit to your [hit_area].") if(armor >= 100) return 0 - if(!I.force) return 0 var/Iforce = I.force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords) apply_damage(I.force, I.damtype, affecting, armor , I) diff --git a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm index cadaecc6918..a50c3690d39 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/bottle.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/bottle.dm @@ -122,14 +122,10 @@ throw_speed = 3 throw_range = 5 item_state = "beer" + hitsound = 'sound/weapons/bladeslice.ogg' attack_verb = list("stabbed", "slashed", "attacked") var/icon/broken_outline = icon('icons/obj/drinks.dmi', "broken") -/obj/item/weapon/broken_bottle/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) - return ..() - - /obj/item/weapon/reagent_containers/food/drinks/bottle/gin name = "Griffeater Gin" desc = "A bottle of high quality gin, produced in the New London Space Station." diff --git a/code/modules/surgery/tools.dm b/code/modules/surgery/tools.dm index 91734c1b63e..bdca49bfde9 100644 --- a/code/modules/surgery/tools.dm +++ b/code/modules/surgery/tools.dm @@ -71,6 +71,7 @@ g_amt = 5000 origin_tech = "materials=1;biotech=1" attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") + hitsound = 'sound/weapons/bladeslice.ogg' suicide_act(mob/user) viewers(user) << pick("[user] is slitting \his wrists with [src]! It looks like \he's trying to commit suicide.", \ diff --git a/sound/items/Welder.ogg b/sound/items/Welder.ogg index 9e3339dc1e2..fac0cd93c97 100644 Binary files a/sound/items/Welder.ogg and b/sound/items/Welder.ogg differ diff --git a/sound/weapons/blade1.ogg b/sound/weapons/blade1.ogg index b590ffc9fd1..3ebc4241130 100644 Binary files a/sound/weapons/blade1.ogg and b/sound/weapons/blade1.ogg differ diff --git a/sound/weapons/bladeslice.ogg b/sound/weapons/bladeslice.ogg index 8f72857bd1d..d3cd812f450 100644 Binary files a/sound/weapons/bladeslice.ogg and b/sound/weapons/bladeslice.ogg differ diff --git a/sound/weapons/genhit1.ogg b/sound/weapons/genhit1.ogg index dfb47c88a97..64c727fd4a8 100644 Binary files a/sound/weapons/genhit1.ogg and b/sound/weapons/genhit1.ogg differ diff --git a/sound/weapons/genhit2.ogg b/sound/weapons/genhit2.ogg index e57752aaa67..f275e7d322c 100644 Binary files a/sound/weapons/genhit2.ogg and b/sound/weapons/genhit2.ogg differ diff --git a/sound/weapons/genhit3.ogg b/sound/weapons/genhit3.ogg index 9a8b0b1796d..5093f27c01e 100644 Binary files a/sound/weapons/genhit3.ogg and b/sound/weapons/genhit3.ogg differ diff --git a/sound/weapons/smash.ogg b/sound/weapons/smash.ogg index ba76cf89e6f..ee3d7a25204 100644 Binary files a/sound/weapons/smash.ogg and b/sound/weapons/smash.ogg differ diff --git a/sound/weapons/tap.ogg b/sound/weapons/tap.ogg new file mode 100644 index 00000000000..4cb31e91486 Binary files /dev/null and b/sound/weapons/tap.ogg differ