Attack sounds for all melee weapons

Weapons that do no damage play a tap sound, except for the bike horn and banhammer.

Adds a different attack message for forceless attacks. It says tapped or
patted on instead of attacked in.

Adds force zero check to armour before attempting to block attacks.

Adds hitsounds to the welder, lighter, matches, cigarettes, energy sword and energy axe for when they're on and off.

Adds 5 force to the lighter when it's lit. Same as when you accidentally burn yourself lighting it. Adds a hitsound and the correct damage type to the lighter.

Adds hitsound volume scaling based on the weapon's force and its weight class. Adds tap sound scaling based on a weapon's weight class.

Removes boldness from item attack messages on non-human mobs. The attack is still bolded for the player
controlling the mob.

Adds a force check to blood spurts when attacking non-human mobs. If the weapon doesn't have a force, no blood will come out.

Adds adminhelp.ogg as the banhammer's hitsound with Cheridan's permission.

Adds a much needed period to the catatonic human examine message.

Makes the activation and deactivation sounds of toy swords, energy swords and energy shields quieter. What an earsore.

Makes description, item_state and name of matches that have burned out on their own consistent with those put out by the player. Changes match, cigarette and lighter attack verbs and forces based on whether they're lit or not.

Fixes a bug that allowed players to light cigarettes with burnt matches.

Names lit cigarettes and children of cigarettes lit [name].

Fixes a bug with the energy blade that kept it at weight class 5 after it was deactivated.

Changes the welder out of fuel message slightly to be less fragmented.

Removes dead air from most of the weapon sound effects used in this pull to make them more responsive. In other words, the fire extinguisher sound will play a lot sooner after you click than before. Equalised their peak volumes to all be -0.1dB and in an attempt to make altering volumes based on force more consistent.

Thank you @YotaXP for help with the item_attack.dm attack messages.

Thank you @optimumtact for help with code for testing item_attack volumes.

Thank you @Giacom for help with the code for scaling hitsound and tap sound volume by hitforce.

Thank you @Tastyfish for telling me why my proc wasn't working.

Thank you to anyone else on #coderbus who helped me who I've forgotten to mention.
This commit is contained in:
Jesus Hussein Chris
2014-01-28 22:46:41 +13:00
committed by Tenebrosity
parent bd85a001fc
commit 52339906c4
34 changed files with 115 additions and 66 deletions
+21 -13
View File
@@ -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 <B>[M] has been [pick(attack_verb)] with [src][showname] </B>", 1)
else
O.show_message("\red <B>[M] has been attacked with [src][showname] </B>", 1)
if(attack_verb && attack_verb.len)
M.visible_message("<span class='danger'>[M] has been [pick(attack_verb)] with [src][showname]</span>",
"<span class='userdanger'>[M] has been [pick(attack_verb)] with [src][showname]!</span>")
else if(force == 0)
M.visible_message("<span class='danger'>[M] has been [pick("tapped","patted")] with [src][showname]</span>",
"<span class='userdanger'>[M] has been [pick("tapped","patted")] with [src][showname]</span>")
else
M.visible_message("<span class='danger'>[M] has been attacked with [src][showname]</span>",
"<span class='userdanger'>[M] has been attacked with [src][showname]</span>")
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
+6 -5
View File
@@ -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
+1 -1
View File
@@ -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)
+1
View File
@@ -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"
@@ -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
+1 -2
View File
@@ -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
@@ -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("<span class='suicide'>[user] is slitting \his wrists with the shard of glass! It looks like \he's trying to commit suicide.</span>", \
@@ -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))
+3 -2
View File
@@ -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
@@ -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("<span class='notice'>[user] lights their [name] with [W].</span>")
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("<span class='rose'>Without even breaking stride, [user] flips open and lights [src] in one smooth movement.</span>")
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("<span class='rose'>You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.")
else
@@ -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))
@@ -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 << "<span class='notice'>[src] is now energised.</span>"
force = 150
force = 150 //these are the drugs, friend
hitsound = 'sound/weapons/blade1.ogg'
icon_state = "axe1"
w_class = 5
else
user << "<span class='notice'>[src] can now be concealed.</span>"
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 << "<span class='notice'>[src] is now active.</span>"
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 << "<span class='notice'>[src] can now be concealed.</span>"
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
@@ -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) << "<span class='suicide'>[user] is strangling \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>"
@@ -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)
+2 -2
View File
@@ -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 << "<span class='notice'>[src] is now active.</span>"
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 << "<span class='notice'>[src] can now be concealed.</span>"
reflect_chance = 0
add_fingerprint(user)
@@ -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
@@ -12,6 +12,7 @@
w_class = 4.0
origin_tech = "combat=1"
attack_verb = list("robusted")
hitsound = 'sound/weapons/smash.ogg'
New()
..()
+1 -2
View File
@@ -108,9 +108,8 @@
if(user.a_intent == "harm")
..()
playsound(loc, "swing_hit", 50, 1, -1)
else if(!status)
if(!status)
L.visible_message("<span class='warning'>[L] has been prodded with [src] by [user]. Luckily it was off.</span>")
return
@@ -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
+5 -1
View File
@@ -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("<span class='suicide'>[user] is stabbing the [src.name] into \his temple! It looks like \he's trying to commit suicide.</span>", \
@@ -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 << "<span class='notice'>You switch [src] on.</span>"
force = 15
damtype = "fire"
hitsound = 'sound/items/welder.ogg'
icon_state = "welder1"
processing_objects.Add(src)
else
user << "<span class='notice'>Need more fuel.</span>"
user << "<span class='notice'>You need more fuel.</span>"
welding = 0
else
if(!message)
@@ -304,6 +307,7 @@
user << "<span class='notice'>[src] shuts off!</span>"
force = 3
damtype = "brute"
hitsound = "swing_hit"
icon_state = "welder"
welding = 0
@@ -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]"
+2 -4
View File
@@ -17,6 +17,7 @@
/obj/item/weapon/banhammer/attack(mob/M, mob/user)
M << "<font color='red'><b> You have been banned FOR NO REISIN by [user]<b></font>"
user << "<font color='red'> You have <b>BANNED</b> [M]</font>"
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) << "<span class='suicide'>[user] is falling on the [src.name]! It looks like \he's trying to commit suicide.</span>"
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"
+9 -1
View File
@@ -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)
..()
@@ -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
@@ -268,7 +268,7 @@
if(getorgan(/obj/item/organ/brain))
if(!key)
msg += "<span class='deadsay'>[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</span>\n"
msg += "<span class='deadsay'>[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.</span>\n"
else if(!client)
msg += "[t_He] [t_has] a vacant, braindead stare...\n"
@@ -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("<span class='danger'>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!</span>", \
"<span class='userdanger'>[src] has been [pick(I.attack_verb)] in the [hit_area] with [I] by [user]!</span>")
else if(I.force == 0)
visible_message("<span class='danger'>[src] has been [pick("tapped","patted")] on the [hit_area] with [I] by [user]!</span>", \
"<span class='userdanger'>[src] has been [pick("tapped","patted")] on the [hit_area] with [I] by [user]!</span>")
else
visible_message("<span class='danger'>[src] has been attacked in the [hit_area] with [I] by [user]!</span>", \
"<span class='userdanger'>[src] has been attacked in the [hit_area] with [I] by [user]!</span>")
if(!I.force) return 0
var/armor = run_armor_check(affecting, "melee", "<span class='warning'>Your armour has protected your [hit_area].</span>", "<span class='warning'>Your armour has softened a hit to your [hit_area].</span>")
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)
@@ -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."
+1
View File
@@ -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("<span class='suicide'>[user] is slitting \his wrists with [src]! It looks like \he's trying to commit suicide.</span>", \
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.