Adds a pry var to objects, which checks if the obj can open doors

This commit is contained in:
Anewbe
2016-07-09 00:24:12 -05:00
parent 42a0e259a4
commit f27fa6cc2b
7 changed files with 23 additions and 4 deletions
@@ -93,6 +93,22 @@
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
applies_material_colour = 0
/obj/item/weapon/material/twohanded/fireaxe/update_held_icon()
var/mob/living/M = loc
if(istype(M) && !issmall(M) && M.item_is_in_hands(src) && !M.hands_are_full())
wielded = 1
pry = 1
force = force_wielded
name = "[base_name] (wielded)"
update_icon()
else
wielded = 0
pry = 0
force = force_unwielded
name = "[base_name]"
update_icon()
..()
/obj/item/weapon/material/twohanded/fireaxe/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
if(!proximity) return
..()
+1
View File
@@ -413,6 +413,7 @@
slot_flags = SLOT_BELT
force = 5.0
throwforce = 7.0
pry = 1
item_state = "crowbar"
w_class = 2.0
origin_tech = list(TECH_ENGINEERING = 1)
+1
View File
@@ -7,6 +7,7 @@
var/throwforce = 1
var/sharp = 0 // whether this object cuts
var/edge = 0 // whether this object is more likely to dismember
var/pry = 0 //Used in attackby() to open doors
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
var/damtype = "brute"
var/armor_penetration = 0