mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 14:37:27 +01:00
Merge pull request #4526 from Mechoid/Now_Those_Are_Knoifes
Knife refactor and minor changes regarding.
This commit is contained in:
@@ -101,9 +101,8 @@
|
||||
//Step one - dehairing.
|
||||
/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/kitchen/utensil/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")
|
||||
|
||||
@@ -78,16 +78,10 @@
|
||||
/*
|
||||
* Knives
|
||||
*/
|
||||
/obj/item/weapon/material/kitchen/utensil/knife
|
||||
name = "knife"
|
||||
desc = "A knife for eating with. Can cut through any food."
|
||||
icon_state = "knife"
|
||||
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
|
||||
scoop_food = 0
|
||||
|
||||
// Identical to the tactical knife but nowhere near as stabby.
|
||||
// Kind of like the toy esword compared to the real thing.
|
||||
/obj/item/weapon/material/kitchen/utensil/knife/boot
|
||||
/obj/item/weapon/material/knife/boot
|
||||
name = "boot knife"
|
||||
desc = "A small fixed-blade knife for putting inside a boot."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
@@ -95,14 +89,15 @@
|
||||
item_state = "knife"
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob)
|
||||
/* From the time of Clowns. Commented out for posterity, and sanity.
|
||||
/obj/item/weapon/material/knife/attack(target as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
user << "<span class='warning'>You accidentally cut yourself with \the [src].</span>"
|
||||
user.take_organ_damage(20)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/knife/plastic
|
||||
*/
|
||||
/obj/item/weapon/material/knife/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/*
|
||||
|
||||
@@ -87,17 +87,29 @@
|
||||
|
||||
/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/hatchet/tacknife/survival
|
||||
/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."
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "survivalknife"
|
||||
item_state = "knife"
|
||||
applies_material_colour = FALSE
|
||||
should_cleave = FALSE
|
||||
|
||||
@@ -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,23 +42,23 @@
|
||||
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)
|
||||
..()
|
||||
|
||||
// These probably shouldn't inherit from hatchets.
|
||||
/obj/item/weapon/material/hatchet/tacknife
|
||||
/obj/item/weapon/material/knife/tacknife
|
||||
name = "tactical knife"
|
||||
desc = "You'd be killing loads of people if this was Medal of Valor: Heroes of Space."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
@@ -73,9 +66,8 @@
|
||||
item_state = "knife"
|
||||
attack_verb = list("stabbed", "chopped", "cut")
|
||||
applies_material_colour = 1
|
||||
should_cleave = FALSE
|
||||
|
||||
/obj/item/weapon/material/hatchet/tacknife/combatknife
|
||||
/obj/item/weapon/material/knife/tacknife/combatknife
|
||||
name = "combat knife"
|
||||
desc = "If only you had a boot to put it in."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
@@ -85,7 +77,6 @@
|
||||
thrown_force_divisor = 1.75 // 20 with weight 20 (steel)
|
||||
attack_verb = list("sliced", "stabbed", "chopped", "cut")
|
||||
applies_material_colour = 1
|
||||
should_cleave = FALSE
|
||||
|
||||
/obj/item/weapon/material/minihoe // -- Numbers
|
||||
name = "mini hoe"
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -988,9 +988,9 @@
|
||||
/obj/item/weapon/screwdriver,
|
||||
/obj/item/weapon/wrench,
|
||||
/obj/item/weapon/wirecutters,
|
||||
/obj/item/weapon/material/kitchen/utensil/knife,
|
||||
/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
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
prob(6);/obj/item/weapon/material/wirerod,
|
||||
prob(2);/obj/item/weapon/material/butterfly/switchblade,
|
||||
prob(2);/obj/item/weapon/material/knuckledusters,
|
||||
prob(1);/obj/item/weapon/material/hatchet/tacknife,
|
||||
prob(1);/obj/item/weapon/material/knife/tacknife,
|
||||
prob(1);/obj/item/clothing/suit/storage/vest/heavy/merc,
|
||||
prob(1);/obj/item/weapon/beartrap,
|
||||
prob(1);/obj/item/weapon/handcuffs,
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -204,7 +204,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
|
||||
/obj/item/clothing/under/tactical,
|
||||
/obj/item/weapon/beartrap,
|
||||
/obj/item/clothing/suit/storage/vest/press,
|
||||
/obj/item/weapon/material/hatchet/tacknife,
|
||||
/obj/item/weapon/material/knife/tacknife,
|
||||
/obj/item/weapon/material/butterfly/switchblade
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user