Files
Bubberstation/code/modules/surgery/tools.dm
Jesus Hussein Chris 52339906c4 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.
2014-01-28 22:46:41 +13:00

113 lines
3.3 KiB
Plaintext

/obj/item/weapon/retractor
name = "retractor"
desc = "Retracts stuff."
icon = 'icons/obj/surgery.dmi'
icon_state = "retractor"
m_amt = 10000
g_amt = 5000
flags = CONDUCT
w_class = 1.0
origin_tech = "materials=1;biotech=1"
/obj/item/weapon/hemostat
name = "hemostat"
desc = "You think you have seen this before."
icon = 'icons/obj/surgery.dmi'
icon_state = "hemostat"
m_amt = 5000
g_amt = 2500
flags = CONDUCT
w_class = 1.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "pinched")
/obj/item/weapon/cautery
name = "cautery"
desc = "This stops bleeding."
icon = 'icons/obj/surgery.dmi'
icon_state = "cautery"
m_amt = 5000
g_amt = 2500
flags = CONDUCT
w_class = 1.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("burnt")
/obj/item/weapon/surgicaldrill
name = "surgical drill"
desc = "You can drill using this item. You dig?"
icon = 'icons/obj/surgery.dmi'
icon_state = "drill"
hitsound = 'sound/weapons/circsawhit.ogg'
m_amt = 15000
g_amt = 10000
flags = CONDUCT
force = 15.0
w_class = 3.0
origin_tech = "materials=1;biotech=1"
attack_verb = list("drilled")
suicide_act(mob/user)
viewers(user) << pick("<span class='suicide'>[user] is pressing [src] to \his temple and activating it! It looks like \he's trying to commit suicide.</span>", \
"<span class='suicide'>[user] is pressing [src] to \his chest and activating it! It looks like \he's trying to commit suicide.</span>")
return (BRUTELOSS)
/obj/item/weapon/scalpel
name = "scalpel"
desc = "Cut, cut, and once more cut."
icon = 'icons/obj/surgery.dmi'
icon_state = "scalpel"
flags = CONDUCT
force = 10.0
w_class = 1.0
throwforce = 5.0
throw_speed = 3
throw_range = 5
m_amt = 10000
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>", \
"<span class='suicide'>[user] is slitting \his throat with [src]! It looks like \he's trying to commit suicide.</span>", \
"<span class='suicide'>[user] is slitting \his stomach open with [src]! It looks like \he's trying to commit seppuku.</span>")
return (BRUTELOSS)
/obj/item/weapon/circular_saw
name = "circular saw"
desc = "For heavy duty cutting."
icon = 'icons/obj/surgery.dmi'
icon_state = "saw"
hitsound = 'sound/weapons/circsawhit.ogg'
throwhitsound = 'sound/weapons/pierce.ogg'
flags = CONDUCT
force = 15.0
w_class = 3.0
throwforce = 9.0
throw_speed = 3
throw_range = 5
m_amt = 20000
g_amt = 10000
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "sawed", "cut")
/obj/item/weapon/surgical_drapes
name = "surgical drapes"
desc = "Nanotrasen brand surgical drapes provide optimal safety and infection control."
icon = 'icons/obj/surgery.dmi'
icon_state = "surgical_drapes"
w_class = 1.0
origin_tech = "biotech=1"
attack_verb = list("slapped")
/obj/item/weapon/surgical_drapes/attack(mob/living/M, mob/user)
if(!attempt_initiate_surgery(src, M, user))
..()