Hatchets - > Machete subtype.

This commit is contained in:
Mechoid
2018-01-12 21:21:18 -08:00
parent 5efc484595
commit ff02218ccb
26 changed files with 44 additions and 38 deletions
@@ -102,7 +102,7 @@
/obj/item/stack/material/animalhide/attackby(obj/item/weapon/W as obj, mob/user as mob)
if( istype(W, /obj/item/weapon/material/knife) || \
istype(W, /obj/item/weapon/material/twohanded/fireaxe) || \
istype(W, /obj/item/weapon/material/hatchet) )
istype(W, /obj/item/weapon/material/knife/machete/hatchet) )
//visible message on mobs is defined as visible_message(var/message, var/self_message, var/blind_message)
usr.visible_message("<span class='notice'>\The [usr] starts cutting hair off \the [src]</span>", "<span class='notice'>You start cutting the hair off \the [src]</span>", "You hear the sound of a knife rubbing against flesh")
@@ -87,12 +87,25 @@
/obj/item/weapon/material/knife/butch
name = "butcher's cleaver"
icon = 'icons/obj/kitchen.dmi'
icon_state = "butch"
desc = "A huge thing used for chopping and chopping up meat. This includes clowns and clown-by-products."
force_divisor = 0.25 // 15 when wielded with hardness 60 (steel)
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
/obj/item/weapon/material/knife/machete
name = "machete"
desc = "A sharp machete often found in survival kits."
icon_state = "machete"
force_divisor = 0.3 // 20 when hardness 60 (steel)
attack_verb = list("slashed", "chopped", "gouged", "ripped", "cut")
var/should_cleave = TRUE //Now hatchets inherit from the machete, and thus knives. Tables turned.
// This cannot go into afterattack since some mobs delete themselves upon dying.
/obj/item/weapon/material/knife/machete/pre_attack(var/mob/living/target, var/mob/living/user)
if(should_cleave && istype(target))
cleave(user, target)
..()
/obj/item/weapon/material/knife/tacknife/survival
name = "survival knife"
desc = "A hunting grade survival knife."
@@ -19,7 +19,7 @@
attack_verb = list("punched", "beaten", "struck")
applies_material_colour = 0
/obj/item/weapon/material/hatchet
/obj/item/weapon/material/knife/machete/hatchet
name = "hatchet"
desc = "A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood."
icon = 'icons/obj/weapons.dmi'
@@ -32,15 +32,8 @@
origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 1)
attack_verb = list("chopped", "torn", "cut")
applies_material_colour = 0
var/should_cleave = TRUE // Because knives inherit from hatchets. For some reason.
// This cannot go into afterattack since some mobs delete themselves upon dying.
/obj/item/weapon/material/hatchet/pre_attack(var/mob/living/target, var/mob/living/user)
if(should_cleave && istype(target))
cleave(user, target)
..()
/obj/item/weapon/material/hatchet/unathiknife
/obj/item/weapon/material/knife/machete/hatchet/unathiknife
name = "duelling knife"
desc = "A length of leather-bound wood studded with razor-sharp teeth. How crude."
icon = 'icons/obj/weapons.dmi'
@@ -49,18 +42,18 @@
should_cleave = FALSE
var hits = 0
/obj/item/weapon/material/hatchet/unathiknife/attack(mob/M as mob, mob/user as mob)
/obj/item/weapon/material/knife/machete/hatchet/unathiknife/attack(mob/M as mob, mob/user as mob)
if(hits > 0)
return
var/obj/item/I = user.get_inactive_hand()
if(istype(I, /obj/item/weapon/material/hatchet/unathiknife))
if(istype(I, /obj/item/weapon/material/knife/machete/hatchet/unathiknife))
hits ++
var/obj/item/weapon/W = I
W.attack(M, user)
W.afterattack(M, user)
..()
/obj/item/weapon/material/hatchet/unathiknife/afterattack(mob/M as mob, mob/user as mob)
/obj/item/weapon/material/knife/machete/hatchet/unathiknife/afterattack(mob/M as mob, mob/user as mob)
hits = initial(hits)
..()
@@ -52,7 +52,7 @@
/obj/item/device/radio/headset,
/obj/item/device/robotanalyzer,
/obj/item/weapon/material/minihoe,
/obj/item/weapon/material/hatchet,
/obj/item/weapon/material/knife/machete/hatchet,
/obj/item/device/analyzer/plant_analyzer,
/obj/item/weapon/extinguisher/mini,
/obj/item/weapon/tape_roll,
+1 -1
View File
@@ -990,7 +990,7 @@
/obj/item/weapon/wirecutters,
/obj/item/weapon/material/knife,
/obj/item/weapon/material/kitchen/utensil/fork,
/obj/item/weapon/material/hatchet
/obj/item/weapon/material/knife/machete/hatchet
)
var/list/tools = list()
var/current_tool = 1
@@ -22,7 +22,7 @@
new /obj/item/device/radio/headset/headset_service(src)
new /obj/item/clothing/head/greenbandana(src)
new /obj/item/weapon/material/minihoe(src)
new /obj/item/weapon/material/hatchet(src)
new /obj/item/weapon/material/knife/machete/hatchet(src)
new /obj/item/weapon/wirecutters/clippers(src)
new /obj/item/weapon/reagent_containers/spray/plantbgone(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/hydro(src)