Files
VOREStation/code/game/objects/items/weapons/tools/crowbar.dm
2018-08-14 18:14:09 -05:00

77 lines
2.4 KiB
Plaintext

/*
* Crowbar
*/
/obj/item/weapon/tool/crowbar
name = "crowbar"
desc = "Used to remove floors and to pry open doors."
icon = 'icons/obj/tools.dmi'
icon_state = "crowbar"
flags = CONDUCT
slot_flags = SLOT_BELT
force = 6
throwforce = 7
pry = 1
item_state = "crowbar"
w_class = ITEMSIZE_SMALL
origin_tech = list(TECH_ENGINEERING = 1)
matter = list(DEFAULT_WALL_MATERIAL = 50)
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
usesound = 'sound/items/crowbar.ogg'
toolspeed = 1
/obj/item/weapon/tool/crowbar/is_crowbar()
return TRUE
/obj/item/weapon/tool/crowbar/red
icon = 'icons/obj/tools.dmi'
icon_state = "red_crowbar"
item_state = "crowbar_red"
/obj/item/weapon/tool/crowbar/alien
name = "alien crowbar"
desc = "A hard-light crowbar. It appears to pry by itself, without any effort required."
icon = 'icons/obj/abductor.dmi'
usesound = 'sound/weapons/sonic_jackhammer.ogg'
icon_state = "crowbar"
toolspeed = 0.1
origin_tech = list(TECH_COMBAT = 4, TECH_ENGINEERING = 4)
/obj/item/weapon/tool/crowbar/cyborg
name = "hydraulic crowbar"
desc = "A hydraulic prying tool, compact but powerful. Designed to replace crowbars in industrial synthetics."
usesound = 'sound/items/jaws_pry.ogg'
force = 10
toolspeed = 0.5
/obj/item/weapon/tool/crowbar/power
name = "jaws of life"
desc = "A set of jaws of life, compressed through the magic of science. It's fitted with a prying head."
icon_state = "jaws_pry"
item_state = "jawsoflife"
matter = list(MAT_METAL=150, MAT_SILVER=50)
origin_tech = list(TECH_MATERIAL = 2, TECH_ENGINEERING = 2)
usesound = 'sound/items/jaws_pry.ogg'
force = 15
toolspeed = 0.25
var/obj/item/weapon/tool/wirecutters/power/counterpart = null
/obj/item/weapon/tool/crowbar/power/New(newloc, no_counterpart = TRUE)
..(newloc)
if(!counterpart && no_counterpart)
counterpart = new(src, FALSE)
counterpart.counterpart = src
/obj/item/weapon/tool/crowbar/power/Destroy()
if(counterpart)
counterpart.counterpart = null // So it can qdel cleanly.
QDEL_NULL(counterpart)
return ..()
/obj/item/weapon/tool/crowbar/power/attack_self(mob/user)
playsound(get_turf(user), 'sound/items/change_jaws.ogg', 50, 1)
user.drop_item(src)
counterpart.forceMove(get_turf(src))
src.forceMove(counterpart)
user.put_in_active_hand(counterpart)
to_chat(user, "<span class='notice'>You attach the cutting jaws to [src].</span>")