52339906c4
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.
129 lines
4.2 KiB
Plaintext
129 lines
4.2 KiB
Plaintext
/obj/item/weapon/banhammer
|
|
desc = "A banhammer"
|
|
name = "banhammer"
|
|
icon = 'icons/obj/items.dmi'
|
|
icon_state = "toyhammer"
|
|
slot_flags = SLOT_BELT
|
|
throwforce = 0
|
|
w_class = 1.0
|
|
throw_speed = 7
|
|
throw_range = 15
|
|
attack_verb = list("banned")
|
|
|
|
/obj/item/weapon/banhammer/suicide_act(mob/user)
|
|
viewers(user) << "<span class='suicide'>[user] is hitting \himself with the [src.name]! It looks like \he's trying to ban \himself from life.</span>"
|
|
return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)
|
|
|
|
/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
|
|
name = "null rod"
|
|
desc = "A rod of pure obsidian, its very presence disrupts and dampens the powers of Nar-Sie's followers."
|
|
icon_state = "nullrod"
|
|
item_state = "nullrod"
|
|
slot_flags = SLOT_BELT
|
|
force = 15
|
|
throw_speed = 1
|
|
throw_range = 4
|
|
throwforce = 10
|
|
w_class = 1
|
|
|
|
suicide_act(mob/user)
|
|
viewers(user) << "<span class='suicide'>[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>"
|
|
return (BRUTELOSS|FIRELOSS)
|
|
|
|
/obj/item/weapon/sord
|
|
name = "\improper SORD"
|
|
desc = "This thing is so unspeakably shitty you are having a hard time even holding it."
|
|
icon_state = "sord"
|
|
item_state = "sord"
|
|
slot_flags = SLOT_BELT
|
|
force = 2
|
|
throwforce = 1
|
|
w_class = 3
|
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
|
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
|
|
|
suicide_act(mob/user)
|
|
viewers(user) << "<span class='suicide'>[user] is impaling \himself with the [src.name]! It looks like \he's trying to commit suicide.</span>"
|
|
return(BRUTELOSS)
|
|
|
|
/obj/item/weapon/claymore
|
|
name = "claymore"
|
|
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
|
|
throwforce = 10
|
|
w_class = 3
|
|
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
|
|
|
IsShield()
|
|
return 1
|
|
|
|
suicide_act(mob/user)
|
|
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/katana
|
|
name = "katana"
|
|
desc = "Woefully underpowered in D20"
|
|
icon_state = "katana"
|
|
item_state = "katana"
|
|
flags = CONDUCT
|
|
slot_flags = SLOT_BELT | SLOT_BACK
|
|
force = 40
|
|
throwforce = 10
|
|
w_class = 3
|
|
hitsound = 'sound/weapons/bladeslice.ogg'
|
|
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
|
|
|
suicide_act(mob/user)
|
|
viewers(user) << "<span class='suicide'>[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.</span>"
|
|
return(BRUTELOSS)
|
|
|
|
/obj/item/weapon/katana/IsShield()
|
|
return 1
|
|
|
|
obj/item/weapon/wirerod
|
|
name = "wired rod"
|
|
desc = "A rod with some wire wrapped around the top. It'd be easy to attach something to the top bit."
|
|
icon_state = "wiredrod"
|
|
item_state = "rods"
|
|
flags = CONDUCT
|
|
force = 9
|
|
throwforce = 10
|
|
w_class = 3
|
|
m_amt = 1875
|
|
attack_verb = list("hit", "bludgeoned", "whacked", "bonked")
|
|
|
|
obj/item/weapon/wirerod/attackby(var/obj/item/I, mob/user as mob)
|
|
..()
|
|
if(istype(I, /obj/item/weapon/shard))
|
|
var/obj/item/weapon/twohanded/spear/S = new /obj/item/weapon/twohanded/spear
|
|
|
|
user.before_take_item(I)
|
|
user.before_take_item(src)
|
|
|
|
user.put_in_hands(S)
|
|
user << "<span class='notice'>You fasten the glass shard to the top of the rod with the cable.</span>"
|
|
del(I)
|
|
del(src)
|
|
|
|
else if(istype(I, /obj/item/weapon/wirecutters))
|
|
var/obj/item/weapon/melee/baton/cattleprod/P = new /obj/item/weapon/melee/baton/cattleprod
|
|
|
|
user.before_take_item(I)
|
|
user.before_take_item(src)
|
|
|
|
user.put_in_hands(P)
|
|
user << "<span class='notice'>You fasten the wirecutters to the top of the rod with the cable, prongs outward.</span>"
|
|
del(I)
|
|
del(src) |