mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
Whitespace Standardization [MDB IGNORE] (#15748)
* Update settings * Whitespace changes * Comment out merger hooks in gitattributes Corrupt maps would have to be resolved in repo before hooks could be updated * Revert "Whitespace changes" This reverts commitafbdd1d844. * Whitespace again minus example * Gitignore example changelog * Restore changelog merge setting * Keep older dmi hook attribute until hooks can be updated * update vscode settings too * Renormalize remaining * Revert "Gitignore example changelog" This reverts commitde22ad375d. * Attempt to normalize example.yml (and another file I guess) * Try again
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
/obj/item/weapon/material/twohanded/baseballbat
|
||||
name = "bat"
|
||||
desc = "HOME RUN!"
|
||||
icon_state = "metalbat0"
|
||||
base_icon = "metalbat"
|
||||
throwforce = 7
|
||||
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
|
||||
hitsound = 'sound/weapons/genhit3.ogg'
|
||||
default_material = "wood"
|
||||
force_divisor = 1.1 // 22 when wielded with weight 20 (steel)
|
||||
unwielded_force_divisor = 0.7 // 15 when unwielded based on above.
|
||||
dulled_divisor = 0.75 // A "dull" bat is still gonna hurt
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
//Predefined materials go here.
|
||||
/obj/item/weapon/material/twohanded/baseballbat/metal/New(var/newloc)
|
||||
..(newloc,"steel")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/uranium/New(var/newloc)
|
||||
..(newloc,"uranium")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/gold/New(var/newloc)
|
||||
..(newloc,"gold")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/platinum/New(var/newloc)
|
||||
..(newloc,"platinum")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/diamond/New(var/newloc)
|
||||
/obj/item/weapon/material/twohanded/baseballbat
|
||||
name = "bat"
|
||||
desc = "HOME RUN!"
|
||||
icon_state = "metalbat0"
|
||||
base_icon = "metalbat"
|
||||
throwforce = 7
|
||||
attack_verb = list("smashed", "beaten", "slammed", "smacked", "struck", "battered", "bonked")
|
||||
hitsound = 'sound/weapons/genhit3.ogg'
|
||||
default_material = "wood"
|
||||
force_divisor = 1.1 // 22 when wielded with weight 20 (steel)
|
||||
unwielded_force_divisor = 0.7 // 15 when unwielded based on above.
|
||||
dulled_divisor = 0.75 // A "dull" bat is still gonna hurt
|
||||
slot_flags = SLOT_BACK
|
||||
|
||||
//Predefined materials go here.
|
||||
/obj/item/weapon/material/twohanded/baseballbat/metal/New(var/newloc)
|
||||
..(newloc,"steel")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/uranium/New(var/newloc)
|
||||
..(newloc,"uranium")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/gold/New(var/newloc)
|
||||
..(newloc,"gold")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/platinum/New(var/newloc)
|
||||
..(newloc,"platinum")
|
||||
|
||||
/obj/item/weapon/material/twohanded/baseballbat/diamond/New(var/newloc)
|
||||
..(newloc,"diamond")
|
||||
@@ -1,217 +1,217 @@
|
||||
/obj/item/weapon/material/kitchen
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
|
||||
/*
|
||||
* Utensils
|
||||
*/
|
||||
/obj/item/weapon/material/kitchen/utensil
|
||||
drop_sound = 'sound/items/drop/knife.ogg'
|
||||
pickup_sound = 'sound/items/pickup/knife.ogg'
|
||||
w_class = ITEMSIZE_TINY
|
||||
thrown_force_divisor = 1
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
|
||||
var/scoop_volume = 5
|
||||
var/loaded // Name for currently loaded food object.
|
||||
var/loaded_color // Color for currently loaded food object.
|
||||
|
||||
var/list/food_inserted_micros
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/Initialize()
|
||||
. = ..()
|
||||
if (prob(60))
|
||||
src.pixel_y = rand(0, 4)
|
||||
create_reagents(scoop_volume)
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/Destroy()
|
||||
if(food_inserted_micros)
|
||||
for(var/mob/M in food_inserted_micros)
|
||||
M.dropInto(loc)
|
||||
food_inserted_micros -= M
|
||||
. = ..()
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/update_icon()
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
if(loaded)
|
||||
var/image/I = new(icon, "loadedfood")
|
||||
I.color = loaded_color
|
||||
add_overlay(I)
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/proc/load_food(var/mob/user, var/obj/item/weapon/reagent_containers/food/snacks/loading)
|
||||
if (reagents.total_volume > 0)
|
||||
to_chat(user, SPAN_DANGER("There is already something on \the [src]."))
|
||||
return
|
||||
if (!loading?.reagents?.total_volume)
|
||||
to_chat(user, SPAN_NOTICE("Nothing to scoop up in \the [loading]!"))
|
||||
|
||||
|
||||
loaded = "\the [loading]"
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> scoops up some of [loaded] with \the [src]!",
|
||||
SPAN_NOTICE("You scoop up some of [loaded] with \the [src]!")
|
||||
)
|
||||
loading.bitecount++
|
||||
loading.reagents.trans_to_obj(src, min(loading.reagents.total_volume, scoop_volume))
|
||||
loaded_color = loading.filling_color
|
||||
|
||||
if(loading.food_inserted_micros && loading.food_inserted_micros.len)
|
||||
if(!food_inserted_micros)
|
||||
food_inserted_micros = list()
|
||||
|
||||
for(var/mob/living/F in loading.food_inserted_micros)
|
||||
var/do_transfer = FALSE
|
||||
|
||||
if(!loading.reagents.total_volume)
|
||||
do_transfer = TRUE
|
||||
else
|
||||
var/transfer_chance = (loading.bitecount/(loading.bitecount + (loading.bitesize / loading.reagents.total_volume) + 1))*100
|
||||
if(prob(transfer_chance))
|
||||
do_transfer = TRUE
|
||||
|
||||
if(do_transfer)
|
||||
F.forceMove(src)
|
||||
loading.food_inserted_micros -= F
|
||||
src.food_inserted_micros += F
|
||||
|
||||
if (loading.reagents.total_volume <= 0)
|
||||
qdel(loading)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(user.a_intent != I_HELP)
|
||||
if(user.zone_sel.selecting == BP_HEAD || user.zone_sel.selecting == O_EYES)
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
if (loaded && reagents.total_volume > 0)
|
||||
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
||||
if(food_inserted_micros && food_inserted_micros.len)
|
||||
for(var/mob/living/F in food_inserted_micros)
|
||||
food_inserted_micros -= F
|
||||
if(!F.can_be_drop_prey || !F.food_vore)
|
||||
F.forceMove(get_turf(src))
|
||||
else
|
||||
F.forceMove(M.vore_selected)
|
||||
if(M == user)
|
||||
if(!M.can_eat(loaded))
|
||||
return
|
||||
M.visible_message("<b>\The [user]</b> eats some of [loaded] with \the [src].")
|
||||
else
|
||||
user.visible_message(SPAN_WARNING("\The [user] begins to feed \the [M]!"))
|
||||
if(!(M.can_force_feed(user, loaded) && do_mob(user, M, 5 SECONDS)))
|
||||
return
|
||||
M.visible_message("<b>\The [user]</b> feeds some of [loaded] to \the [M] with \the [src].")
|
||||
playsound(src,'sound/items/eatfood.ogg', rand(10,40), 1)
|
||||
loaded = null
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You don't have anything on \the [src].")) //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/on_rag_wipe()
|
||||
. = ..()
|
||||
if(reagents.total_volume > 0)
|
||||
reagents.clear_reagents()
|
||||
cut_overlays()
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/container_resist(mob/living/M)
|
||||
if(food_inserted_micros)
|
||||
food_inserted_micros -= M
|
||||
M.forceMove(get_turf(src))
|
||||
to_chat(M, "<span class='warning'>You climb off of \the [src].</span>")
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/fork
|
||||
name = "fork"
|
||||
desc = "It's a fork. Sure is pointy."
|
||||
icon_state = "fork"
|
||||
sharp = TRUE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/fork/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/foon
|
||||
name = "foon"
|
||||
desc = "It's a foon. The forgotten cousin of the spork."
|
||||
icon_state = "foon"
|
||||
sharp = TRUE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/foon/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spork
|
||||
name = "spork"
|
||||
desc = "It's a spork. The (un)holy merger of a spoon and fork."
|
||||
icon_state = "spork"
|
||||
sharp = TRUE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spork/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spoon
|
||||
name = "spoon"
|
||||
desc = "It's a spoon. You can see your own upside-down face in it."
|
||||
icon_state = "spoon"
|
||||
attack_verb = list("attacked", "poked")
|
||||
edge = FALSE
|
||||
sharp = FALSE
|
||||
force_divisor = 0.1 //2 when wielded with weight 20 (steel)
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spoon/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/*
|
||||
* Knives
|
||||
*/
|
||||
|
||||
/* 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))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with \the [src].</span>")
|
||||
user.take_organ_damage(20)
|
||||
return
|
||||
return ..()
|
||||
*/
|
||||
/obj/item/weapon/material/knife/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/*
|
||||
* Rolling Pins
|
||||
*/
|
||||
|
||||
/obj/item/weapon/material/kitchen/rollingpin
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
default_material = "wood"
|
||||
force_divisor = 0.7 // 10 when wielded with weight 15 (wood)
|
||||
dulled_divisor = 0.75 // Still a club
|
||||
thrown_force_divisor = 1 // as above
|
||||
drop_sound = 'sound/items/drop/wooden.ogg'
|
||||
pickup_sound = 'sound/items/pickup/wooden.ogg'
|
||||
|
||||
/obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "<span class='warning'>\The [src] slips out of your hand and hits your head.</span>")
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(2)
|
||||
return
|
||||
return ..()
|
||||
/obj/item/weapon/material/kitchen
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
|
||||
/*
|
||||
* Utensils
|
||||
*/
|
||||
/obj/item/weapon/material/kitchen/utensil
|
||||
drop_sound = 'sound/items/drop/knife.ogg'
|
||||
pickup_sound = 'sound/items/pickup/knife.ogg'
|
||||
w_class = ITEMSIZE_TINY
|
||||
thrown_force_divisor = 1
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
attack_verb = list("attacked", "stabbed", "poked")
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
|
||||
var/scoop_volume = 5
|
||||
var/loaded // Name for currently loaded food object.
|
||||
var/loaded_color // Color for currently loaded food object.
|
||||
|
||||
var/list/food_inserted_micros
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/Initialize()
|
||||
. = ..()
|
||||
if (prob(60))
|
||||
src.pixel_y = rand(0, 4)
|
||||
create_reagents(scoop_volume)
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/Destroy()
|
||||
if(food_inserted_micros)
|
||||
for(var/mob/M in food_inserted_micros)
|
||||
M.dropInto(loc)
|
||||
food_inserted_micros -= M
|
||||
. = ..()
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/update_icon()
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
if(loaded)
|
||||
var/image/I = new(icon, "loadedfood")
|
||||
I.color = loaded_color
|
||||
add_overlay(I)
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/proc/load_food(var/mob/user, var/obj/item/weapon/reagent_containers/food/snacks/loading)
|
||||
if (reagents.total_volume > 0)
|
||||
to_chat(user, SPAN_DANGER("There is already something on \the [src]."))
|
||||
return
|
||||
if (!loading?.reagents?.total_volume)
|
||||
to_chat(user, SPAN_NOTICE("Nothing to scoop up in \the [loading]!"))
|
||||
|
||||
|
||||
loaded = "\the [loading]"
|
||||
user.visible_message( \
|
||||
"<b>\The [user]</b> scoops up some of [loaded] with \the [src]!",
|
||||
SPAN_NOTICE("You scoop up some of [loaded] with \the [src]!")
|
||||
)
|
||||
loading.bitecount++
|
||||
loading.reagents.trans_to_obj(src, min(loading.reagents.total_volume, scoop_volume))
|
||||
loaded_color = loading.filling_color
|
||||
|
||||
if(loading.food_inserted_micros && loading.food_inserted_micros.len)
|
||||
if(!food_inserted_micros)
|
||||
food_inserted_micros = list()
|
||||
|
||||
for(var/mob/living/F in loading.food_inserted_micros)
|
||||
var/do_transfer = FALSE
|
||||
|
||||
if(!loading.reagents.total_volume)
|
||||
do_transfer = TRUE
|
||||
else
|
||||
var/transfer_chance = (loading.bitecount/(loading.bitecount + (loading.bitesize / loading.reagents.total_volume) + 1))*100
|
||||
if(prob(transfer_chance))
|
||||
do_transfer = TRUE
|
||||
|
||||
if(do_transfer)
|
||||
F.forceMove(src)
|
||||
loading.food_inserted_micros -= F
|
||||
src.food_inserted_micros += F
|
||||
|
||||
if (loading.reagents.total_volume <= 0)
|
||||
qdel(loading)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(user.a_intent != I_HELP)
|
||||
if(user.zone_sel.selecting == BP_HEAD || user.zone_sel.selecting == O_EYES)
|
||||
if((CLUMSY in user.mutations) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
if (loaded && reagents.total_volume > 0)
|
||||
reagents.trans_to_mob(M, reagents.total_volume, CHEM_INGEST)
|
||||
if(food_inserted_micros && food_inserted_micros.len)
|
||||
for(var/mob/living/F in food_inserted_micros)
|
||||
food_inserted_micros -= F
|
||||
if(!F.can_be_drop_prey || !F.food_vore)
|
||||
F.forceMove(get_turf(src))
|
||||
else
|
||||
F.forceMove(M.vore_selected)
|
||||
if(M == user)
|
||||
if(!M.can_eat(loaded))
|
||||
return
|
||||
M.visible_message("<b>\The [user]</b> eats some of [loaded] with \the [src].")
|
||||
else
|
||||
user.visible_message(SPAN_WARNING("\The [user] begins to feed \the [M]!"))
|
||||
if(!(M.can_force_feed(user, loaded) && do_mob(user, M, 5 SECONDS)))
|
||||
return
|
||||
M.visible_message("<b>\The [user]</b> feeds some of [loaded] to \the [M] with \the [src].")
|
||||
playsound(src,'sound/items/eatfood.ogg', rand(10,40), 1)
|
||||
loaded = null
|
||||
update_icon()
|
||||
return
|
||||
else
|
||||
to_chat(user, SPAN_WARNING("You don't have anything on \the [src].")) //if we have help intent and no food scooped up DON'T STAB OURSELVES WITH THE FORK
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/on_rag_wipe()
|
||||
. = ..()
|
||||
if(reagents.total_volume > 0)
|
||||
reagents.clear_reagents()
|
||||
cut_overlays()
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/container_resist(mob/living/M)
|
||||
if(food_inserted_micros)
|
||||
food_inserted_micros -= M
|
||||
M.forceMove(get_turf(src))
|
||||
to_chat(M, "<span class='warning'>You climb off of \the [src].</span>")
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/fork
|
||||
name = "fork"
|
||||
desc = "It's a fork. Sure is pointy."
|
||||
icon_state = "fork"
|
||||
sharp = TRUE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/fork/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/foon
|
||||
name = "foon"
|
||||
desc = "It's a foon. The forgotten cousin of the spork."
|
||||
icon_state = "foon"
|
||||
sharp = TRUE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/foon/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spork
|
||||
name = "spork"
|
||||
desc = "It's a spork. The (un)holy merger of a spoon and fork."
|
||||
icon_state = "spork"
|
||||
sharp = TRUE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spork/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spoon
|
||||
name = "spoon"
|
||||
desc = "It's a spoon. You can see your own upside-down face in it."
|
||||
icon_state = "spoon"
|
||||
attack_verb = list("attacked", "poked")
|
||||
edge = FALSE
|
||||
sharp = FALSE
|
||||
force_divisor = 0.1 //2 when wielded with weight 20 (steel)
|
||||
|
||||
/obj/item/weapon/material/kitchen/utensil/spoon/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/*
|
||||
* Knives
|
||||
*/
|
||||
|
||||
/* 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))
|
||||
to_chat(user, "<span class='warning'>You accidentally cut yourself with \the [src].</span>")
|
||||
user.take_organ_damage(20)
|
||||
return
|
||||
return ..()
|
||||
*/
|
||||
/obj/item/weapon/material/knife/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/*
|
||||
* Rolling Pins
|
||||
*/
|
||||
|
||||
/obj/item/weapon/material/kitchen/rollingpin
|
||||
name = "rolling pin"
|
||||
desc = "Used to knock out the Bartender."
|
||||
icon_state = "rolling_pin"
|
||||
attack_verb = list("bashed", "battered", "bludgeoned", "thrashed", "whacked")
|
||||
default_material = "wood"
|
||||
force_divisor = 0.7 // 10 when wielded with weight 15 (wood)
|
||||
dulled_divisor = 0.75 // Still a club
|
||||
thrown_force_divisor = 1 // as above
|
||||
drop_sound = 'sound/items/drop/wooden.ogg'
|
||||
pickup_sound = 'sound/items/pickup/wooden.ogg'
|
||||
|
||||
/obj/item/weapon/material/kitchen/rollingpin/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if ((CLUMSY in user.mutations) && prob(50))
|
||||
to_chat(user, "<span class='warning'>\The [src] slips out of your hand and hits your head.</span>")
|
||||
user.take_organ_damage(10)
|
||||
user.Paralyse(2)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -1,187 +1,187 @@
|
||||
/obj/item/weapon/material/butterfly
|
||||
name = "butterfly knife"
|
||||
desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket."
|
||||
description_fluff = "This could be used to engrave messages on suitable surfaces if you really put your mind to it! Alt-click a floor or wall to engrave with it." //This way it's not a completely hidden, arcane art to engrave.
|
||||
icon_state = "butterflyknife"
|
||||
item_state = null
|
||||
hitsound = null
|
||||
var/active = 0
|
||||
w_class = ITEMSIZE_SMALL
|
||||
attack_verb = list("patted", "tapped")
|
||||
force_divisor = 0.25 // 15 when wielded with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
|
||||
drop_sound = 'sound/items/drop/knife.ogg'
|
||||
pickup_sound = 'sound/items/pickup/knife.ogg'
|
||||
|
||||
/obj/item/weapon/material/butterfly/update_force()
|
||||
if(active)
|
||||
edge = TRUE
|
||||
sharp = TRUE
|
||||
..() //Updates force.
|
||||
throwforce = max(3,force-3)
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
icon_state += "_open"
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
else
|
||||
force = 3
|
||||
edge = FALSE
|
||||
sharp = FALSE
|
||||
hitsound = initial(hitsound)
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
attack_verb = initial(attack_verb)
|
||||
|
||||
/obj/item/weapon/material/butterfly/switchblade
|
||||
name = "switchblade"
|
||||
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
|
||||
icon_state = "switchblade"
|
||||
|
||||
/obj/item/weapon/material/butterfly/boxcutter
|
||||
name = "box cutter"
|
||||
desc = "A thin, inexpensive razor-blade knife designed to open cardboard boxes."
|
||||
icon_state = "boxcutter"
|
||||
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.2 // 4 when thrown with weight 20 (steel)
|
||||
|
||||
/obj/item/weapon/material/butterfly/attack_self(mob/user)
|
||||
active = !active
|
||||
update_force()
|
||||
|
||||
if(user)
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>You flip out \the [src].</span>")
|
||||
playsound(src, 'sound/weapons/flipblade.ogg', 15, 1)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src] can now be concealed.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/*
|
||||
* Kitchen knives
|
||||
*/
|
||||
/obj/item/weapon/material/knife
|
||||
name = "kitchen knife"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "knife"
|
||||
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
|
||||
description_fluff = "This could be used to engrave messages on suitable surfaces if you really put your mind to it! Alt-click a floor or wall to engrave with it." //This way it's not a completely hidden, arcane art to engrave.
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
force_divisor = 0.15 // 9 when wielded with hardness 60 (steel)
|
||||
matter = list(MAT_STEEL = 12000)
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
drop_sound = 'sound/items/drop/knife.ogg'
|
||||
|
||||
// These no longer inherit from hatchets.
|
||||
/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'
|
||||
icon_state = "tacknife"
|
||||
item_state = "knife"
|
||||
force_divisor = 0.25 //15 when hardness 60 (steel)
|
||||
attack_verb = list("stabbed", "chopped", "cut")
|
||||
applies_material_colour = 1
|
||||
|
||||
/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'
|
||||
icon_state = "tacknife2"
|
||||
item_state = "knife"
|
||||
force_divisor = 0.34 // 20 with hardness 60 (steel)
|
||||
thrown_force_divisor = 1.75 // 20 with weight 20 (steel)
|
||||
attack_verb = list("sliced", "stabbed", "chopped", "cut")
|
||||
applies_material_colour = 1
|
||||
|
||||
// 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/knife/tacknife/boot
|
||||
name = "boot knife"
|
||||
desc = "A small fixed-blade knife for putting inside a boot."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "tacknife3"
|
||||
item_state = "knife"
|
||||
force_divisor = 0.15
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/material/knife/hook
|
||||
name = "meat hook"
|
||||
desc = "A sharp, metal hook what sticks into things."
|
||||
icon_state = "hook_knife"
|
||||
|
||||
/obj/item/weapon/material/knife/ritual
|
||||
name = "ritual knife"
|
||||
desc = "The unearthly energies that once powered this blade are now dormant."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/material/knife/table
|
||||
name = "table knife"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "knife_table"
|
||||
sharp = FALSE // blunted tip
|
||||
force_divisor = 0.1
|
||||
|
||||
/obj/item/weapon/material/knife/table/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/obj/item/weapon/material/knife/butch
|
||||
name = "butcher's cleaver"
|
||||
icon_state = "cleaver"
|
||||
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 // 18 when hardness 60 (steel)
|
||||
attack_verb = list("slashed", "chopped", "gouged", "ripped", "cut")
|
||||
can_cleave = TRUE //Now hatchets inherit from the machete, and thus knives. Tables turned.
|
||||
slot_flags = SLOT_BELT
|
||||
default_material = "plasteel" //VOREStation Edit
|
||||
|
||||
/obj/item/weapon/material/knife/machete/cyborg
|
||||
name = "integrated machete"
|
||||
desc = "A sharp machete often found attached to robots."
|
||||
unbreakable = TRUE
|
||||
|
||||
/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
|
||||
default_material = "plasteel" //VOREStation Edit
|
||||
toolspeed = 2 // Use a real axe if you want to chop logs.
|
||||
|
||||
/obj/item/weapon/material/knife/stone
|
||||
name = "stone blade"
|
||||
desc = "A crude blade made by chipping away at a piece of flint."
|
||||
icon = 'icons/obj/weapons_vr.dmi'
|
||||
icon_state = "stone_blade"
|
||||
applies_material_colour = FALSE
|
||||
fragile = TRUE
|
||||
dulled = TRUE
|
||||
edge = TRUE
|
||||
sharp = TRUE
|
||||
default_material = MAT_FLINT
|
||||
|
||||
/obj/item/weapon/material/knife/stone/wood
|
||||
name = "stone knife"
|
||||
desc = "A crude blade of flint with a wooden handle, secured with plant fibers twined into sturdy ropes. Useful for cutting, stabbing, slicing, and even shearing."
|
||||
icon_state = "stone_wood_knife"
|
||||
dulled = FALSE
|
||||
fragile = FALSE
|
||||
|
||||
/obj/item/weapon/material/knife/stone/bone
|
||||
name = "stone knife"
|
||||
desc = "A crude blade of flint with a bone handle, secured with plant fibers twined into sturdy ropes. Useful for cutting, stabbing, slicing, and even shearing."
|
||||
icon_state = "stone_bone_knife"
|
||||
dulled = FALSE
|
||||
fragile = FALSE
|
||||
/obj/item/weapon/material/butterfly
|
||||
name = "butterfly knife"
|
||||
desc = "A basic metal blade concealed in a lightweight plasteel grip. Small enough when folded to fit in a pocket."
|
||||
description_fluff = "This could be used to engrave messages on suitable surfaces if you really put your mind to it! Alt-click a floor or wall to engrave with it." //This way it's not a completely hidden, arcane art to engrave.
|
||||
icon_state = "butterflyknife"
|
||||
item_state = null
|
||||
hitsound = null
|
||||
var/active = 0
|
||||
w_class = ITEMSIZE_SMALL
|
||||
attack_verb = list("patted", "tapped")
|
||||
force_divisor = 0.25 // 15 when wielded with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.25 // 5 when thrown with weight 20 (steel)
|
||||
drop_sound = 'sound/items/drop/knife.ogg'
|
||||
pickup_sound = 'sound/items/pickup/knife.ogg'
|
||||
|
||||
/obj/item/weapon/material/butterfly/update_force()
|
||||
if(active)
|
||||
edge = TRUE
|
||||
sharp = TRUE
|
||||
..() //Updates force.
|
||||
throwforce = max(3,force-3)
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
icon_state += "_open"
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
else
|
||||
force = 3
|
||||
edge = FALSE
|
||||
sharp = FALSE
|
||||
hitsound = initial(hitsound)
|
||||
icon_state = initial(icon_state)
|
||||
w_class = initial(w_class)
|
||||
attack_verb = initial(attack_verb)
|
||||
|
||||
/obj/item/weapon/material/butterfly/switchblade
|
||||
name = "switchblade"
|
||||
desc = "A classic switchblade with gold engraving. Just holding it makes you feel like a gangster."
|
||||
icon_state = "switchblade"
|
||||
|
||||
/obj/item/weapon/material/butterfly/boxcutter
|
||||
name = "box cutter"
|
||||
desc = "A thin, inexpensive razor-blade knife designed to open cardboard boxes."
|
||||
icon_state = "boxcutter"
|
||||
force_divisor = 0.1 // 6 when wielded with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.2 // 4 when thrown with weight 20 (steel)
|
||||
|
||||
/obj/item/weapon/material/butterfly/attack_self(mob/user)
|
||||
active = !active
|
||||
update_force()
|
||||
|
||||
if(user)
|
||||
if(active)
|
||||
to_chat(user, "<span class='notice'>You flip out \the [src].</span>")
|
||||
playsound(src, 'sound/weapons/flipblade.ogg', 15, 1)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>\The [src] can now be concealed.</span>")
|
||||
add_fingerprint(user)
|
||||
|
||||
/*
|
||||
* Kitchen knives
|
||||
*/
|
||||
/obj/item/weapon/material/knife
|
||||
name = "kitchen knife"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "knife"
|
||||
desc = "A general purpose Chef's Knife made by SpaceCook Incorporated. Guaranteed to stay sharp for years to come."
|
||||
description_fluff = "This could be used to engrave messages on suitable surfaces if you really put your mind to it! Alt-click a floor or wall to engrave with it." //This way it's not a completely hidden, arcane art to engrave.
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
force_divisor = 0.15 // 9 when wielded with hardness 60 (steel)
|
||||
matter = list(MAT_STEEL = 12000)
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
drop_sound = 'sound/items/drop/knife.ogg'
|
||||
|
||||
// These no longer inherit from hatchets.
|
||||
/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'
|
||||
icon_state = "tacknife"
|
||||
item_state = "knife"
|
||||
force_divisor = 0.25 //15 when hardness 60 (steel)
|
||||
attack_verb = list("stabbed", "chopped", "cut")
|
||||
applies_material_colour = 1
|
||||
|
||||
/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'
|
||||
icon_state = "tacknife2"
|
||||
item_state = "knife"
|
||||
force_divisor = 0.34 // 20 with hardness 60 (steel)
|
||||
thrown_force_divisor = 1.75 // 20 with weight 20 (steel)
|
||||
attack_verb = list("sliced", "stabbed", "chopped", "cut")
|
||||
applies_material_colour = 1
|
||||
|
||||
// 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/knife/tacknife/boot
|
||||
name = "boot knife"
|
||||
desc = "A small fixed-blade knife for putting inside a boot."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "tacknife3"
|
||||
item_state = "knife"
|
||||
force_divisor = 0.15
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/material/knife/hook
|
||||
name = "meat hook"
|
||||
desc = "A sharp, metal hook what sticks into things."
|
||||
icon_state = "hook_knife"
|
||||
|
||||
/obj/item/weapon/material/knife/ritual
|
||||
name = "ritual knife"
|
||||
desc = "The unearthly energies that once powered this blade are now dormant."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "render"
|
||||
applies_material_colour = 0
|
||||
|
||||
/obj/item/weapon/material/knife/table
|
||||
name = "table knife"
|
||||
icon = 'icons/obj/kitchen.dmi'
|
||||
icon_state = "knife_table"
|
||||
sharp = FALSE // blunted tip
|
||||
force_divisor = 0.1
|
||||
|
||||
/obj/item/weapon/material/knife/table/plastic
|
||||
default_material = "plastic"
|
||||
|
||||
/obj/item/weapon/material/knife/butch
|
||||
name = "butcher's cleaver"
|
||||
icon_state = "cleaver"
|
||||
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 // 18 when hardness 60 (steel)
|
||||
attack_verb = list("slashed", "chopped", "gouged", "ripped", "cut")
|
||||
can_cleave = TRUE //Now hatchets inherit from the machete, and thus knives. Tables turned.
|
||||
slot_flags = SLOT_BELT
|
||||
default_material = "plasteel" //VOREStation Edit
|
||||
|
||||
/obj/item/weapon/material/knife/machete/cyborg
|
||||
name = "integrated machete"
|
||||
desc = "A sharp machete often found attached to robots."
|
||||
unbreakable = TRUE
|
||||
|
||||
/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
|
||||
default_material = "plasteel" //VOREStation Edit
|
||||
toolspeed = 2 // Use a real axe if you want to chop logs.
|
||||
|
||||
/obj/item/weapon/material/knife/stone
|
||||
name = "stone blade"
|
||||
desc = "A crude blade made by chipping away at a piece of flint."
|
||||
icon = 'icons/obj/weapons_vr.dmi'
|
||||
icon_state = "stone_blade"
|
||||
applies_material_colour = FALSE
|
||||
fragile = TRUE
|
||||
dulled = TRUE
|
||||
edge = TRUE
|
||||
sharp = TRUE
|
||||
default_material = MAT_FLINT
|
||||
|
||||
/obj/item/weapon/material/knife/stone/wood
|
||||
name = "stone knife"
|
||||
desc = "A crude blade of flint with a wooden handle, secured with plant fibers twined into sturdy ropes. Useful for cutting, stabbing, slicing, and even shearing."
|
||||
icon_state = "stone_wood_knife"
|
||||
dulled = FALSE
|
||||
fragile = FALSE
|
||||
|
||||
/obj/item/weapon/material/knife/stone/bone
|
||||
name = "stone knife"
|
||||
desc = "A crude blade of flint with a bone handle, secured with plant fibers twined into sturdy ropes. Useful for cutting, stabbing, slicing, and even shearing."
|
||||
icon_state = "stone_bone_knife"
|
||||
dulled = FALSE
|
||||
fragile = FALSE
|
||||
|
||||
@@ -1,182 +1,182 @@
|
||||
// SEE code/modules/materials/materials.dm FOR DETAILS ON INHERITED DATUM.
|
||||
// This class of weapons takes force and appearance data from a material datum.
|
||||
// They are also fragile based on material data and many can break/smash apart.
|
||||
/obj/item/weapon/material
|
||||
health = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
gender = NEUTER
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
sharp = FALSE
|
||||
edge = FALSE
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_material.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_material.dmi',
|
||||
)
|
||||
|
||||
var/applies_material_colour = 1
|
||||
var/unbreakable = 0 //Doesn't lose health
|
||||
var/fragile = 0 //Shatters when it dies
|
||||
var/dulled = 0 //Has gone dull
|
||||
var/can_dull = 1 //Can it go dull?
|
||||
var/force_divisor = 0.5
|
||||
var/thrown_force_divisor = 0.5
|
||||
var/dulled_divisor = 0.5 //Just drops the damage by half
|
||||
var/default_material = MAT_STEEL
|
||||
var/datum/material/material
|
||||
var/drops_debris = 1
|
||||
|
||||
/obj/item/weapon/material/New(var/newloc, var/material_key)
|
||||
..(newloc)
|
||||
if(!material_key)
|
||||
material_key = default_material
|
||||
set_material(material_key)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
matter = material.get_matter()
|
||||
if(matter.len)
|
||||
for(var/material_type in matter)
|
||||
if(!isnull(matter[material_type]))
|
||||
matter[material_type] *= force_divisor // May require a new var instead.
|
||||
|
||||
if(!(material.conductive))
|
||||
src.flags |= NOCONDUCT
|
||||
|
||||
/obj/item/weapon/material/get_material()
|
||||
return material
|
||||
|
||||
/obj/item/weapon/material/proc/update_force()
|
||||
if(edge || sharp)
|
||||
force = material.get_edge_damage()
|
||||
else
|
||||
force = material.get_blunt_damage()
|
||||
force = round(force*force_divisor)
|
||||
if(dulled)
|
||||
force = round(force*dulled_divisor)
|
||||
throwforce = round(material.get_blunt_damage()*thrown_force_divisor)
|
||||
//spawn(1)
|
||||
// to_world("[src] has force [force] and throwforce [throwforce] when made from default material [material.name]")
|
||||
|
||||
/obj/item/weapon/material/proc/set_material(var/new_material)
|
||||
material = get_material_by_name(new_material)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
else
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
health = round(material.integrity/10)
|
||||
if(applies_material_colour)
|
||||
color = material.icon_colour
|
||||
if(material.products_need_process())
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_force()
|
||||
|
||||
/obj/item/weapon/material/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/material/apply_hit_effect()
|
||||
..()
|
||||
if(!unbreakable)
|
||||
if(material.is_brittle())
|
||||
health = 0
|
||||
else if(!prob(material.hardness))
|
||||
health--
|
||||
check_health()
|
||||
|
||||
/obj/item/weapon/material/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/whetstone))
|
||||
var/obj/item/weapon/whetstone/whet = W
|
||||
repair(whet.repair_amount, whet.repair_time, user)
|
||||
if(istype(W, /obj/item/weapon/material/sharpeningkit))
|
||||
var/obj/item/weapon/material/sharpeningkit/SK = W
|
||||
repair(SK.repair_amount, SK.repair_time, user)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/proc/check_health(var/consumed)
|
||||
if(health<=0)
|
||||
health = 0
|
||||
|
||||
if(fragile)
|
||||
shatter(consumed)
|
||||
else if(!dulled && can_dull)
|
||||
dull()
|
||||
|
||||
/obj/item/weapon/material/proc/shatter(var/consumed)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
|
||||
if(istype(loc, /mob/living))
|
||||
var/mob/living/M = loc
|
||||
M.drop_from_inventory(src)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
if(!consumed && drops_debris) material.place_shard(T)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/material/proc/dull()
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] goes dull!</span>")
|
||||
playsound(src, "shatter", 70, 1)
|
||||
dulled = 1
|
||||
if(is_sharp() || has_edge())
|
||||
sharp = FALSE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/weapon/material/proc/repair(var/repair_amount, var/repair_time, mob/living/user)
|
||||
if(!fragile)
|
||||
if(health < initial(health))
|
||||
user.visible_message("[user] begins repairing \the [src].", "You begin repairing \the [src].")
|
||||
if(do_after(user, repair_time))
|
||||
user.visible_message("[user] has finished repairing \the [src]", "You finish repairing \the [src].")
|
||||
health = min(health + repair_amount, initial(health))
|
||||
dulled = 0
|
||||
sharp = initial(sharp)
|
||||
edge = initial(edge)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] doesn't need repairs.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't repair \the [src].</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/proc/sharpen(var/material, var/sharpen_time, var/kit, mob/living/M)
|
||||
if(!fragile && src.material.can_sharpen)
|
||||
if(health < initial(health))
|
||||
to_chat(M, "You should repair [src] first. Try using [kit] on it.")
|
||||
return FALSE
|
||||
M.visible_message("[M] begins to replace parts of [src] with [kit].", "You begin to replace parts of [src] with [kit].")
|
||||
if(do_after(usr, sharpen_time))
|
||||
M.visible_message("[M] has finished replacing parts of [src].", "You finish replacing parts of [src].")
|
||||
src.set_material(material)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(M, "<span class = 'warning'>You can't sharpen and re-edge [src].</span>")
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
Commenting this out pending rebalancing of radiation based on small objects.
|
||||
/obj/item/weapon/material/process()
|
||||
if(!material.radioactivity)
|
||||
return
|
||||
for(var/mob/living/L in range(1,src))
|
||||
L.apply_effect(round(material.radioactivity/30),IRRADIATE,0)
|
||||
*/
|
||||
|
||||
/*
|
||||
// Commenting this out while fires are so spectacularly lethal, as I can't seem to get this balanced appropriately.
|
||||
/obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
// This might need adjustment. Will work that out later.
|
||||
/obj/item/weapon/material/proc/TemperatureAct(temperature)
|
||||
health -= material.combustion_effect(get_turf(src), temperature, 0.1)
|
||||
check_health(1)
|
||||
|
||||
/obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(material.ignition_point && WT.remove_fuel(0, user))
|
||||
TemperatureAct(150)
|
||||
else
|
||||
return ..()
|
||||
*/
|
||||
// SEE code/modules/materials/materials.dm FOR DETAILS ON INHERITED DATUM.
|
||||
// This class of weapons takes force and appearance data from a material datum.
|
||||
// They are also fragile based on material data and many can break/smash apart.
|
||||
/obj/item/weapon/material
|
||||
health = 10
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
gender = NEUTER
|
||||
throw_speed = 3
|
||||
throw_range = 7
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
sharp = FALSE
|
||||
edge = FALSE
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_material.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_material.dmi',
|
||||
)
|
||||
|
||||
var/applies_material_colour = 1
|
||||
var/unbreakable = 0 //Doesn't lose health
|
||||
var/fragile = 0 //Shatters when it dies
|
||||
var/dulled = 0 //Has gone dull
|
||||
var/can_dull = 1 //Can it go dull?
|
||||
var/force_divisor = 0.5
|
||||
var/thrown_force_divisor = 0.5
|
||||
var/dulled_divisor = 0.5 //Just drops the damage by half
|
||||
var/default_material = MAT_STEEL
|
||||
var/datum/material/material
|
||||
var/drops_debris = 1
|
||||
|
||||
/obj/item/weapon/material/New(var/newloc, var/material_key)
|
||||
..(newloc)
|
||||
if(!material_key)
|
||||
material_key = default_material
|
||||
set_material(material_key)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
matter = material.get_matter()
|
||||
if(matter.len)
|
||||
for(var/material_type in matter)
|
||||
if(!isnull(matter[material_type]))
|
||||
matter[material_type] *= force_divisor // May require a new var instead.
|
||||
|
||||
if(!(material.conductive))
|
||||
src.flags |= NOCONDUCT
|
||||
|
||||
/obj/item/weapon/material/get_material()
|
||||
return material
|
||||
|
||||
/obj/item/weapon/material/proc/update_force()
|
||||
if(edge || sharp)
|
||||
force = material.get_edge_damage()
|
||||
else
|
||||
force = material.get_blunt_damage()
|
||||
force = round(force*force_divisor)
|
||||
if(dulled)
|
||||
force = round(force*dulled_divisor)
|
||||
throwforce = round(material.get_blunt_damage()*thrown_force_divisor)
|
||||
//spawn(1)
|
||||
// to_world("[src] has force [force] and throwforce [throwforce] when made from default material [material.name]")
|
||||
|
||||
/obj/item/weapon/material/proc/set_material(var/new_material)
|
||||
material = get_material_by_name(new_material)
|
||||
if(!material)
|
||||
qdel(src)
|
||||
else
|
||||
name = "[material.display_name] [initial(name)]"
|
||||
health = round(material.integrity/10)
|
||||
if(applies_material_colour)
|
||||
color = material.icon_colour
|
||||
if(material.products_need_process())
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_force()
|
||||
|
||||
/obj/item/weapon/material/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/material/apply_hit_effect()
|
||||
..()
|
||||
if(!unbreakable)
|
||||
if(material.is_brittle())
|
||||
health = 0
|
||||
else if(!prob(material.hardness))
|
||||
health--
|
||||
check_health()
|
||||
|
||||
/obj/item/weapon/material/attackby(obj/item/weapon/W, mob/user)
|
||||
if(istype(W, /obj/item/weapon/whetstone))
|
||||
var/obj/item/weapon/whetstone/whet = W
|
||||
repair(whet.repair_amount, whet.repair_time, user)
|
||||
if(istype(W, /obj/item/weapon/material/sharpeningkit))
|
||||
var/obj/item/weapon/material/sharpeningkit/SK = W
|
||||
repair(SK.repair_amount, SK.repair_time, user)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/proc/check_health(var/consumed)
|
||||
if(health<=0)
|
||||
health = 0
|
||||
|
||||
if(fragile)
|
||||
shatter(consumed)
|
||||
else if(!dulled && can_dull)
|
||||
dull()
|
||||
|
||||
/obj/item/weapon/material/proc/shatter(var/consumed)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] [material.destruction_desc]!</span>")
|
||||
if(istype(loc, /mob/living))
|
||||
var/mob/living/M = loc
|
||||
M.drop_from_inventory(src)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
if(!consumed && drops_debris) material.place_shard(T)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/material/proc/dull()
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message("<span class='danger'>\The [src] goes dull!</span>")
|
||||
playsound(src, "shatter", 70, 1)
|
||||
dulled = 1
|
||||
if(is_sharp() || has_edge())
|
||||
sharp = FALSE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/weapon/material/proc/repair(var/repair_amount, var/repair_time, mob/living/user)
|
||||
if(!fragile)
|
||||
if(health < initial(health))
|
||||
user.visible_message("[user] begins repairing \the [src].", "You begin repairing \the [src].")
|
||||
if(do_after(user, repair_time))
|
||||
user.visible_message("[user] has finished repairing \the [src]", "You finish repairing \the [src].")
|
||||
health = min(health + repair_amount, initial(health))
|
||||
dulled = 0
|
||||
sharp = initial(sharp)
|
||||
edge = initial(edge)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] doesn't need repairs.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't repair \the [src].</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/proc/sharpen(var/material, var/sharpen_time, var/kit, mob/living/M)
|
||||
if(!fragile && src.material.can_sharpen)
|
||||
if(health < initial(health))
|
||||
to_chat(M, "You should repair [src] first. Try using [kit] on it.")
|
||||
return FALSE
|
||||
M.visible_message("[M] begins to replace parts of [src] with [kit].", "You begin to replace parts of [src] with [kit].")
|
||||
if(do_after(usr, sharpen_time))
|
||||
M.visible_message("[M] has finished replacing parts of [src].", "You finish replacing parts of [src].")
|
||||
src.set_material(material)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(M, "<span class = 'warning'>You can't sharpen and re-edge [src].</span>")
|
||||
return FALSE
|
||||
|
||||
/*
|
||||
Commenting this out pending rebalancing of radiation based on small objects.
|
||||
/obj/item/weapon/material/process()
|
||||
if(!material.radioactivity)
|
||||
return
|
||||
for(var/mob/living/L in range(1,src))
|
||||
L.apply_effect(round(material.radioactivity/30),IRRADIATE,0)
|
||||
*/
|
||||
|
||||
/*
|
||||
// Commenting this out while fires are so spectacularly lethal, as I can't seem to get this balanced appropriately.
|
||||
/obj/item/weapon/material/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
// This might need adjustment. Will work that out later.
|
||||
/obj/item/weapon/material/proc/TemperatureAct(temperature)
|
||||
health -= material.combustion_effect(get_turf(src), temperature, 0.1)
|
||||
check_health(1)
|
||||
|
||||
/obj/item/weapon/material/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(material.ignition_point && WT.remove_fuel(0, user))
|
||||
TemperatureAct(150)
|
||||
else
|
||||
return ..()
|
||||
*/
|
||||
|
||||
@@ -1,228 +1,228 @@
|
||||
/obj/item/weapon/material/harpoon
|
||||
name = "harpoon"
|
||||
sharp = TRUE
|
||||
edge = FALSE
|
||||
desc = "Tharr she blows!"
|
||||
icon_state = "harpoon"
|
||||
item_state = "harpoon"
|
||||
force_divisor = 0.3 // 18 with hardness 60 (steel)
|
||||
attack_verb = list("jabbed","stabbed","ripped")
|
||||
|
||||
/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'
|
||||
icon_state = "hatchet"
|
||||
force_divisor = 0.2 // 12 with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.75 // 15 with weight 20 (steel)
|
||||
w_class = ITEMSIZE_SMALL
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 1)
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
applies_material_colour = 0
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
/* VOREStation Removal - We have one already
|
||||
/obj/item/weapon/material/knife/machete/hatchet/stone
|
||||
name = "sharp rock"
|
||||
desc = "The secret is to bang the rocks together, guys."
|
||||
force_divisor = 0.2
|
||||
icon_state = "rock"
|
||||
item_state = "rock"
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/material/knife/machete/hatchet/stone/set_material(var/new_material)
|
||||
var/old_name = name
|
||||
. = ..()
|
||||
name = old_name
|
||||
*/
|
||||
/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'
|
||||
icon_state = "unathiknife"
|
||||
attack_verb = list("ripped", "torn", "cut")
|
||||
can_cleave = FALSE
|
||||
var/hits = 0
|
||||
|
||||
/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/knife/machete/hatchet/unathiknife))
|
||||
hits ++
|
||||
var/obj/item/weapon/W = I
|
||||
W.attack(M, user)
|
||||
W.afterattack(M, user)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/knife/machete/hatchet/unathiknife/afterattack(mob/M as mob, mob/user as mob)
|
||||
hits = initial(hits)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/minihoe // -- Numbers
|
||||
name = "mini hoe"
|
||||
desc = "It's used for removing weeds or scratching your back."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "hoe"
|
||||
force_divisor = 0.25 // 5 with weight 20 (steel)
|
||||
thrown_force_divisor = 0.25 // as above
|
||||
dulled_divisor = 0.75 //Still metal on a long pole
|
||||
w_class = ITEMSIZE_SMALL
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
|
||||
/obj/item/weapon/material/snow/snowball
|
||||
name = "loose packed snowball"
|
||||
desc = "A fun snowball. Throw it at your friends!"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "snowball"
|
||||
default_material = MAT_SNOW
|
||||
health = 1
|
||||
fragile = 1
|
||||
force_divisor = 0.01
|
||||
thrown_force_divisor = 0.10
|
||||
w_class = ITEMSIZE_SMALL
|
||||
attack_verb = list("mushed", "splatted", "splooshed", "splushed") // Words that totally exist.
|
||||
|
||||
/obj/item/weapon/material/snow/snowball/attack_self(mob/user as mob)
|
||||
if(user.a_intent == I_HURT)
|
||||
to_chat(user, SPAN_NOTICE("You smash the snowball in your hand."))
|
||||
var/atom/S = new /obj/item/stack/material/snow(user.loc)
|
||||
qdel(src)
|
||||
user.put_in_hands(S)
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("You start compacting the snowball."))
|
||||
if(do_after(user, 2 SECONDS))
|
||||
var/atom/S = new /obj/item/weapon/material/snow/snowball/reinforced(user.loc)
|
||||
qdel(src)
|
||||
user.put_in_hands(S)
|
||||
|
||||
/obj/item/weapon/material/snow/snowball/reinforced
|
||||
name = "snowball"
|
||||
desc = "A well-formed and fun snowball. It looks kind of dangerous."
|
||||
//icon_state = "reinf-snowball"
|
||||
force_divisor = 0.20
|
||||
thrown_force_divisor = 0.25
|
||||
|
||||
/obj/item/weapon/material/whip
|
||||
name = "whip"
|
||||
desc = "A tool used to discipline animals, or look cool. Mostly the latter."
|
||||
description_info = "Help - Standard attack, no modifiers.<br>\
|
||||
Disarm - Disarming strike. Attempts to disarm the target at range, similar to an unarmed disarm. Additionally, will force the target (if possible) to move away from you.<br>\
|
||||
Grab - Grappling strike. Attempts to pull the target toward you. This can also move objects.<br>\
|
||||
Harm - A standard strike with a small chance to disarm."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "whip"
|
||||
item_state = "chain"
|
||||
default_material = MAT_LEATHER
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
origin_tech = list(TECH_COMBAT = 2)
|
||||
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
|
||||
force_divisor = 0.15
|
||||
thrown_force_divisor = 0.25
|
||||
reach = 2
|
||||
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_melee.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_melee.dmi',
|
||||
)
|
||||
|
||||
/obj/item/weapon/material/whip/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
|
||||
..()
|
||||
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(istype(A, /atom/movable))
|
||||
var/atom/movable/AM = A
|
||||
if(AM.anchored)
|
||||
to_chat(user, "<span class='notice'>\The [AM] won't budge.</span>")
|
||||
return
|
||||
|
||||
else
|
||||
if(!istype(AM, /obj/item))
|
||||
user.visible_message("<span class='warning'>\The [AM] is pulled along by \the [src]!</span>")
|
||||
AM.Move(get_step(AM, get_dir(AM, src)))
|
||||
return
|
||||
|
||||
else
|
||||
user.visible_message("<span class='warning'>\The [AM] is snatched by \the [src]!</span>")
|
||||
AM.throw_at(user, reach, 0.1, user)
|
||||
|
||||
/obj/item/weapon/material/whip/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
if(user.a_intent)
|
||||
switch(user.a_intent)
|
||||
if(I_HURT)
|
||||
if(prob(10) && istype(target, /mob/living/carbon/human) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND)))
|
||||
to_chat(target, "<span class='warning'>\The [src] rips at your hands!</span>")
|
||||
ranged_disarm(target)
|
||||
if(I_DISARM)
|
||||
if(prob(min(90, force * 3)) && istype(target, /mob/living/carbon/human) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND)))
|
||||
ranged_disarm(target)
|
||||
else
|
||||
target.visible_message("<span class='danger'>\The [src] sends \the [target] stumbling away.</span>")
|
||||
target.Move(get_step(target,get_dir(user,target)))
|
||||
if(I_GRAB)
|
||||
var/turf/STurf = get_turf(target)
|
||||
spawn(2)
|
||||
playsound(STurf, 'sound/effects/snap.ogg', 60, 1)
|
||||
target.visible_message("<span class='critical'>\The [src] yanks \the [target] towards \the [user]!</span>")
|
||||
target.throw_at(get_turf(get_step(user,get_dir(user,target))), 2, 1, src)
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/whip/proc/ranged_disarm(var/mob/living/carbon/human/H, var/mob/living/user)
|
||||
if(istype(H))
|
||||
var/list/holding = list(H.get_active_hand() = 40, H.get_inactive_hand() = 20)
|
||||
|
||||
if(user.zone_sel in list(BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND))
|
||||
for(var/obj/item/weapon/gun/W in holding)
|
||||
if(W && prob(holding[W]))
|
||||
var/list/turfs = list()
|
||||
for(var/turf/T in view())
|
||||
turfs += T
|
||||
if(turfs.len)
|
||||
var/turf/target = pick(turfs)
|
||||
visible_message("<span class='danger'>[H]'s [W] goes off due to \the [src]!</span>")
|
||||
return W.afterattack(target,H)
|
||||
|
||||
if(!(H.species.flags & NO_SLIP) && prob(10) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)))
|
||||
var/armor_check = H.run_armor_check(user.zone_sel, "melee")
|
||||
H.apply_effect(3, WEAKEN, armor_check)
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
if(armor_check < 60)
|
||||
visible_message("<span class='danger'>\The [src] has tripped [H]!</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>\The [src] attempted to trip [H]!</span>")
|
||||
return
|
||||
|
||||
else
|
||||
if(H.break_all_grabs(user))
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
if(user.zone_sel in list(BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND))
|
||||
for(var/obj/item/I in holding)
|
||||
if(I && prob(holding[I]))
|
||||
H.drop_from_inventory(I)
|
||||
visible_message("<span class='danger'>\The [src] has disarmed [H]!</span>")
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/whip/attack_self(mob/user)
|
||||
user.visible_message("<span class='warning'>\The [user] cracks \the [src]!</span>")
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/material/knife/machete/hatchet/stone
|
||||
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_vr.dmi'
|
||||
icon_state = "stone_wood_axe"
|
||||
default_material = MAT_FLINT
|
||||
origin_tech = list()
|
||||
applies_material_colour = FALSE
|
||||
|
||||
/obj/item/weapon/material/knife/machete/hatchet/stone/bone
|
||||
icon_state = "stone_bone_axe"
|
||||
/obj/item/weapon/material/harpoon
|
||||
name = "harpoon"
|
||||
sharp = TRUE
|
||||
edge = FALSE
|
||||
desc = "Tharr she blows!"
|
||||
icon_state = "harpoon"
|
||||
item_state = "harpoon"
|
||||
force_divisor = 0.3 // 18 with hardness 60 (steel)
|
||||
attack_verb = list("jabbed","stabbed","ripped")
|
||||
|
||||
/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'
|
||||
icon_state = "hatchet"
|
||||
force_divisor = 0.2 // 12 with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.75 // 15 with weight 20 (steel)
|
||||
w_class = ITEMSIZE_SMALL
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 1)
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
applies_material_colour = 0
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
/* VOREStation Removal - We have one already
|
||||
/obj/item/weapon/material/knife/machete/hatchet/stone
|
||||
name = "sharp rock"
|
||||
desc = "The secret is to bang the rocks together, guys."
|
||||
force_divisor = 0.2
|
||||
icon_state = "rock"
|
||||
item_state = "rock"
|
||||
attack_verb = list("chopped", "torn", "cut")
|
||||
|
||||
/obj/item/weapon/material/knife/machete/hatchet/stone/set_material(var/new_material)
|
||||
var/old_name = name
|
||||
. = ..()
|
||||
name = old_name
|
||||
*/
|
||||
/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'
|
||||
icon_state = "unathiknife"
|
||||
attack_verb = list("ripped", "torn", "cut")
|
||||
can_cleave = FALSE
|
||||
var/hits = 0
|
||||
|
||||
/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/knife/machete/hatchet/unathiknife))
|
||||
hits ++
|
||||
var/obj/item/weapon/W = I
|
||||
W.attack(M, user)
|
||||
W.afterattack(M, user)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/knife/machete/hatchet/unathiknife/afterattack(mob/M as mob, mob/user as mob)
|
||||
hits = initial(hits)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/minihoe // -- Numbers
|
||||
name = "mini hoe"
|
||||
desc = "It's used for removing weeds or scratching your back."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "hoe"
|
||||
force_divisor = 0.25 // 5 with weight 20 (steel)
|
||||
thrown_force_divisor = 0.25 // as above
|
||||
dulled_divisor = 0.75 //Still metal on a long pole
|
||||
w_class = ITEMSIZE_SMALL
|
||||
attack_verb = list("slashed", "sliced", "cut", "clawed")
|
||||
|
||||
/obj/item/weapon/material/snow/snowball
|
||||
name = "loose packed snowball"
|
||||
desc = "A fun snowball. Throw it at your friends!"
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "snowball"
|
||||
default_material = MAT_SNOW
|
||||
health = 1
|
||||
fragile = 1
|
||||
force_divisor = 0.01
|
||||
thrown_force_divisor = 0.10
|
||||
w_class = ITEMSIZE_SMALL
|
||||
attack_verb = list("mushed", "splatted", "splooshed", "splushed") // Words that totally exist.
|
||||
|
||||
/obj/item/weapon/material/snow/snowball/attack_self(mob/user as mob)
|
||||
if(user.a_intent == I_HURT)
|
||||
to_chat(user, SPAN_NOTICE("You smash the snowball in your hand."))
|
||||
var/atom/S = new /obj/item/stack/material/snow(user.loc)
|
||||
qdel(src)
|
||||
user.put_in_hands(S)
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("You start compacting the snowball."))
|
||||
if(do_after(user, 2 SECONDS))
|
||||
var/atom/S = new /obj/item/weapon/material/snow/snowball/reinforced(user.loc)
|
||||
qdel(src)
|
||||
user.put_in_hands(S)
|
||||
|
||||
/obj/item/weapon/material/snow/snowball/reinforced
|
||||
name = "snowball"
|
||||
desc = "A well-formed and fun snowball. It looks kind of dangerous."
|
||||
//icon_state = "reinf-snowball"
|
||||
force_divisor = 0.20
|
||||
thrown_force_divisor = 0.25
|
||||
|
||||
/obj/item/weapon/material/whip
|
||||
name = "whip"
|
||||
desc = "A tool used to discipline animals, or look cool. Mostly the latter."
|
||||
description_info = "Help - Standard attack, no modifiers.<br>\
|
||||
Disarm - Disarming strike. Attempts to disarm the target at range, similar to an unarmed disarm. Additionally, will force the target (if possible) to move away from you.<br>\
|
||||
Grab - Grappling strike. Attempts to pull the target toward you. This can also move objects.<br>\
|
||||
Harm - A standard strike with a small chance to disarm."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "whip"
|
||||
item_state = "chain"
|
||||
default_material = MAT_LEATHER
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
origin_tech = list(TECH_COMBAT = 2)
|
||||
attack_verb = list("flogged", "whipped", "lashed", "disciplined")
|
||||
force_divisor = 0.15
|
||||
thrown_force_divisor = 0.25
|
||||
reach = 2
|
||||
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/items/lefthand_melee.dmi',
|
||||
slot_r_hand_str = 'icons/mob/items/righthand_melee.dmi',
|
||||
)
|
||||
|
||||
/obj/item/weapon/material/whip/afterattack(atom/A as mob|obj|turf|area, mob/user as mob, proximity)
|
||||
..()
|
||||
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if(istype(A, /atom/movable))
|
||||
var/atom/movable/AM = A
|
||||
if(AM.anchored)
|
||||
to_chat(user, "<span class='notice'>\The [AM] won't budge.</span>")
|
||||
return
|
||||
|
||||
else
|
||||
if(!istype(AM, /obj/item))
|
||||
user.visible_message("<span class='warning'>\The [AM] is pulled along by \the [src]!</span>")
|
||||
AM.Move(get_step(AM, get_dir(AM, src)))
|
||||
return
|
||||
|
||||
else
|
||||
user.visible_message("<span class='warning'>\The [AM] is snatched by \the [src]!</span>")
|
||||
AM.throw_at(user, reach, 0.1, user)
|
||||
|
||||
/obj/item/weapon/material/whip/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||
if(user.a_intent)
|
||||
switch(user.a_intent)
|
||||
if(I_HURT)
|
||||
if(prob(10) && istype(target, /mob/living/carbon/human) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND)))
|
||||
to_chat(target, "<span class='warning'>\The [src] rips at your hands!</span>")
|
||||
ranged_disarm(target)
|
||||
if(I_DISARM)
|
||||
if(prob(min(90, force * 3)) && istype(target, /mob/living/carbon/human) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND)))
|
||||
ranged_disarm(target)
|
||||
else
|
||||
target.visible_message("<span class='danger'>\The [src] sends \the [target] stumbling away.</span>")
|
||||
target.Move(get_step(target,get_dir(user,target)))
|
||||
if(I_GRAB)
|
||||
var/turf/STurf = get_turf(target)
|
||||
spawn(2)
|
||||
playsound(STurf, 'sound/effects/snap.ogg', 60, 1)
|
||||
target.visible_message("<span class='critical'>\The [src] yanks \the [target] towards \the [user]!</span>")
|
||||
target.throw_at(get_turf(get_step(user,get_dir(user,target))), 2, 1, src)
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/whip/proc/ranged_disarm(var/mob/living/carbon/human/H, var/mob/living/user)
|
||||
if(istype(H))
|
||||
var/list/holding = list(H.get_active_hand() = 40, H.get_inactive_hand() = 20)
|
||||
|
||||
if(user.zone_sel in list(BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND))
|
||||
for(var/obj/item/weapon/gun/W in holding)
|
||||
if(W && prob(holding[W]))
|
||||
var/list/turfs = list()
|
||||
for(var/turf/T in view())
|
||||
turfs += T
|
||||
if(turfs.len)
|
||||
var/turf/target = pick(turfs)
|
||||
visible_message("<span class='danger'>[H]'s [W] goes off due to \the [src]!</span>")
|
||||
return W.afterattack(target,H)
|
||||
|
||||
if(!(H.species.flags & NO_SLIP) && prob(10) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)))
|
||||
var/armor_check = H.run_armor_check(user.zone_sel, "melee")
|
||||
H.apply_effect(3, WEAKEN, armor_check)
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
if(armor_check < 60)
|
||||
visible_message("<span class='danger'>\The [src] has tripped [H]!</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>\The [src] attempted to trip [H]!</span>")
|
||||
return
|
||||
|
||||
else
|
||||
if(H.break_all_grabs(user))
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
if(user.zone_sel in list(BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND))
|
||||
for(var/obj/item/I in holding)
|
||||
if(I && prob(holding[I]))
|
||||
H.drop_from_inventory(I)
|
||||
visible_message("<span class='danger'>\The [src] has disarmed [H]!</span>")
|
||||
playsound(src, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/whip/attack_self(mob/user)
|
||||
user.visible_message("<span class='warning'>\The [user] cracks \the [src]!</span>")
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, 1)
|
||||
|
||||
/obj/item/weapon/material/knife/machete/hatchet/stone
|
||||
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_vr.dmi'
|
||||
icon_state = "stone_wood_axe"
|
||||
default_material = MAT_FLINT
|
||||
origin_tech = list()
|
||||
applies_material_colour = FALSE
|
||||
|
||||
/obj/item/weapon/material/knife/machete/hatchet/stone/bone
|
||||
icon_state = "stone_bone_axe"
|
||||
|
||||
@@ -1,151 +1,151 @@
|
||||
// Glass shards
|
||||
|
||||
/obj/item/weapon/material/shard
|
||||
name = "shard"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
desc = "Made of nothing. How does this even exist?" // set based on material, if this desc is visible it's a bug (shards default to being made of glass)
|
||||
icon_state = "large"
|
||||
randpixel = 8
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
w_class = ITEMSIZE_SMALL
|
||||
force_divisor = 0.25 // 7.5 with hardness 30 (glass)
|
||||
thrown_force_divisor = 0.5
|
||||
item_state = "shard-glass"
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
default_material = "glass"
|
||||
unbreakable = 1 //It's already broken.
|
||||
drops_debris = 0
|
||||
|
||||
/obj/item/weapon/material/shard/set_material(var/new_material)
|
||||
..(new_material)
|
||||
if(!istype(material))
|
||||
return
|
||||
|
||||
icon_state = "[material.shard_icon][pick("large", "medium", "small")]"
|
||||
randpixel_xy()
|
||||
update_icon()
|
||||
|
||||
if(material.shard_type)
|
||||
name = "[material.display_name] [material.shard_type]"
|
||||
desc = "A small piece of [material.display_name]. It looks sharp, you wouldn't want to step on it barefoot. Could probably be used as ... a throwing weapon?"
|
||||
switch(material.shard_type)
|
||||
if(SHARD_SPLINTER, SHARD_SHRAPNEL)
|
||||
gender = PLURAL
|
||||
else
|
||||
gender = NEUTER
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/material/shard/update_icon()
|
||||
if(material)
|
||||
color = material.icon_colour
|
||||
// 1-(1-x)^2, so that glass shards with 0.3 opacity end up somewhat visible at 0.51 opacity
|
||||
alpha = 255 * (1 - (1 - material.opacity)*(1 - material.opacity))
|
||||
else
|
||||
color = "#ffffff"
|
||||
alpha = 255
|
||||
|
||||
/obj/item/weapon/material/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.has_tool_quality(TOOL_WELDER) && material.shard_can_repair)
|
||||
var/obj/item/weapon/weldingtool/WT = W.get_welder()
|
||||
if(WT.remove_fuel(0, user))
|
||||
material.place_sheet(loc, 1)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/material/shard/afterattack(var/atom/target, mob/living/carbon/human/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
var/active_hand //hand the shard is in
|
||||
var/will_break = FALSE
|
||||
var/protected_hands = FALSE //this is a fucking mess
|
||||
var/break_damage = 4
|
||||
var/light_glove_d = rand(2, 4)
|
||||
var/no_glove_d = rand(4, 6)
|
||||
var/list/forbidden_gloves = list(
|
||||
/obj/item/clothing/gloves/sterile,
|
||||
/obj/item/clothing/gloves/knuckledusters
|
||||
)
|
||||
|
||||
if(src == user.l_hand)
|
||||
active_hand = BP_L_HAND
|
||||
else if(src == user.r_hand)
|
||||
active_hand = BP_R_HAND
|
||||
else
|
||||
return // If it's not actually in our hands anymore, we were probably gentle with it
|
||||
|
||||
active_hand = (src == user.l_hand) ? BP_L_HAND : BP_R_HAND // May not actually be faster than an if-else block, but a little bit cleaner -Ater
|
||||
|
||||
if(prob(75))
|
||||
will_break = TRUE
|
||||
|
||||
if(user.gloves && (user.gloves.body_parts_covered & HANDS) && istype(user.gloves, /obj/item/clothing/gloves)) // Not-gloves aren't gloves, and therefore don't protect us
|
||||
protected_hands = TRUE // If we're wearing gloves we can probably handle it just fine
|
||||
for(var/I in forbidden_gloves)
|
||||
if(istype(user.gloves, I)) // forbidden_gloves is a blacklist, so if we match anything in there, our hands are not protected
|
||||
protected_hands = FALSE
|
||||
break
|
||||
|
||||
if(user.gloves && !protected_hands)
|
||||
to_chat(user, "<span class='warning'>\The [src] partially cuts into your hand through your gloves as you hit \the [target]!</span>")
|
||||
user.apply_damage(light_glove_d + will_break ? break_damage : 0, BRUTE, active_hand, 0, 0, src, src.sharp, src.edge) // Ternary to include break damage
|
||||
|
||||
else if(!user.gloves)
|
||||
to_chat(user, "<span class='warning'>\The [src] cuts into your hand as you hit \the [target]!</span>")
|
||||
user.apply_damage(no_glove_d + will_break ? break_damage : 0, BRUTE, active_hand, 0, 0, src, src.sharp, src.edge)
|
||||
|
||||
if(will_break && src.loc == user) // If it's not in our hand anymore
|
||||
user.visible_message("<span class='danger'>[user] hit \the [target] with \the [src], shattering it!</span>", "<span class='warning'>You shatter \the [src] in your hand!</span>")
|
||||
playsound(src, pick('sound/effects/Glassbr1.ogg', 'sound/effects/Glassbr2.ogg', 'sound/effects/Glassbr3.ogg'), 30, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/shard/Crossed(atom/movable/AM as mob|obj)
|
||||
..()
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
if(isliving(AM))
|
||||
var/mob/M = AM
|
||||
|
||||
if(M.buckled) //wheelchairs, office chairs, rollerbeds
|
||||
return
|
||||
|
||||
playsound(src, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.species.siemens_coefficient<0.5) //Thick skin.
|
||||
return
|
||||
|
||||
if( H.shoes || ( H.wear_suit && (H.wear_suit.body_parts_covered & FEET) ) )
|
||||
return
|
||||
|
||||
if(H.species.flags & NO_MINOR_CUT)
|
||||
return
|
||||
|
||||
to_chat(H, "<span class='danger'>You step on \the [src]!</span>")
|
||||
|
||||
var/list/check = list("l_foot", "r_foot")
|
||||
while(check.len)
|
||||
var/picked = pick(check)
|
||||
var/obj/item/organ/external/affecting = H.get_organ(picked)
|
||||
if(affecting)
|
||||
if(affecting.robotic >= ORGAN_ROBOT)
|
||||
return
|
||||
if(affecting.take_damage(force, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
if(affecting.organ_can_feel_pain())
|
||||
H.Weaken(3)
|
||||
return
|
||||
check -= picked
|
||||
return
|
||||
|
||||
// Preset types - left here for the code that uses them
|
||||
/obj/item/weapon/material/shard/shrapnel/New(loc)
|
||||
..(loc, "steel")
|
||||
|
||||
/obj/item/weapon/material/shard/phoron/New(loc)
|
||||
..(loc, "borosilicate glass")
|
||||
// Glass shards
|
||||
|
||||
/obj/item/weapon/material/shard
|
||||
name = "shard"
|
||||
icon = 'icons/obj/shards.dmi'
|
||||
desc = "Made of nothing. How does this even exist?" // set based on material, if this desc is visible it's a bug (shards default to being made of glass)
|
||||
icon_state = "large"
|
||||
randpixel = 8
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
w_class = ITEMSIZE_SMALL
|
||||
force_divisor = 0.25 // 7.5 with hardness 30 (glass)
|
||||
thrown_force_divisor = 0.5
|
||||
item_state = "shard-glass"
|
||||
attack_verb = list("stabbed", "slashed", "sliced", "cut")
|
||||
default_material = "glass"
|
||||
unbreakable = 1 //It's already broken.
|
||||
drops_debris = 0
|
||||
|
||||
/obj/item/weapon/material/shard/set_material(var/new_material)
|
||||
..(new_material)
|
||||
if(!istype(material))
|
||||
return
|
||||
|
||||
icon_state = "[material.shard_icon][pick("large", "medium", "small")]"
|
||||
randpixel_xy()
|
||||
update_icon()
|
||||
|
||||
if(material.shard_type)
|
||||
name = "[material.display_name] [material.shard_type]"
|
||||
desc = "A small piece of [material.display_name]. It looks sharp, you wouldn't want to step on it barefoot. Could probably be used as ... a throwing weapon?"
|
||||
switch(material.shard_type)
|
||||
if(SHARD_SPLINTER, SHARD_SHRAPNEL)
|
||||
gender = PLURAL
|
||||
else
|
||||
gender = NEUTER
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/material/shard/update_icon()
|
||||
if(material)
|
||||
color = material.icon_colour
|
||||
// 1-(1-x)^2, so that glass shards with 0.3 opacity end up somewhat visible at 0.51 opacity
|
||||
alpha = 255 * (1 - (1 - material.opacity)*(1 - material.opacity))
|
||||
else
|
||||
color = "#ffffff"
|
||||
alpha = 255
|
||||
|
||||
/obj/item/weapon/material/shard/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(W.has_tool_quality(TOOL_WELDER) && material.shard_can_repair)
|
||||
var/obj/item/weapon/weldingtool/WT = W.get_welder()
|
||||
if(WT.remove_fuel(0, user))
|
||||
material.place_sheet(loc, 1)
|
||||
qdel(src)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/material/shard/afterattack(var/atom/target, mob/living/carbon/human/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
var/active_hand //hand the shard is in
|
||||
var/will_break = FALSE
|
||||
var/protected_hands = FALSE //this is a fucking mess
|
||||
var/break_damage = 4
|
||||
var/light_glove_d = rand(2, 4)
|
||||
var/no_glove_d = rand(4, 6)
|
||||
var/list/forbidden_gloves = list(
|
||||
/obj/item/clothing/gloves/sterile,
|
||||
/obj/item/clothing/gloves/knuckledusters
|
||||
)
|
||||
|
||||
if(src == user.l_hand)
|
||||
active_hand = BP_L_HAND
|
||||
else if(src == user.r_hand)
|
||||
active_hand = BP_R_HAND
|
||||
else
|
||||
return // If it's not actually in our hands anymore, we were probably gentle with it
|
||||
|
||||
active_hand = (src == user.l_hand) ? BP_L_HAND : BP_R_HAND // May not actually be faster than an if-else block, but a little bit cleaner -Ater
|
||||
|
||||
if(prob(75))
|
||||
will_break = TRUE
|
||||
|
||||
if(user.gloves && (user.gloves.body_parts_covered & HANDS) && istype(user.gloves, /obj/item/clothing/gloves)) // Not-gloves aren't gloves, and therefore don't protect us
|
||||
protected_hands = TRUE // If we're wearing gloves we can probably handle it just fine
|
||||
for(var/I in forbidden_gloves)
|
||||
if(istype(user.gloves, I)) // forbidden_gloves is a blacklist, so if we match anything in there, our hands are not protected
|
||||
protected_hands = FALSE
|
||||
break
|
||||
|
||||
if(user.gloves && !protected_hands)
|
||||
to_chat(user, "<span class='warning'>\The [src] partially cuts into your hand through your gloves as you hit \the [target]!</span>")
|
||||
user.apply_damage(light_glove_d + will_break ? break_damage : 0, BRUTE, active_hand, 0, 0, src, src.sharp, src.edge) // Ternary to include break damage
|
||||
|
||||
else if(!user.gloves)
|
||||
to_chat(user, "<span class='warning'>\The [src] cuts into your hand as you hit \the [target]!</span>")
|
||||
user.apply_damage(no_glove_d + will_break ? break_damage : 0, BRUTE, active_hand, 0, 0, src, src.sharp, src.edge)
|
||||
|
||||
if(will_break && src.loc == user) // If it's not in our hand anymore
|
||||
user.visible_message("<span class='danger'>[user] hit \the [target] with \the [src], shattering it!</span>", "<span class='warning'>You shatter \the [src] in your hand!</span>")
|
||||
playsound(src, pick('sound/effects/Glassbr1.ogg', 'sound/effects/Glassbr2.ogg', 'sound/effects/Glassbr3.ogg'), 30, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/weapon/material/shard/Crossed(atom/movable/AM as mob|obj)
|
||||
..()
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
if(isliving(AM))
|
||||
var/mob/M = AM
|
||||
|
||||
if(M.buckled) //wheelchairs, office chairs, rollerbeds
|
||||
return
|
||||
|
||||
playsound(src, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(H.species.siemens_coefficient<0.5) //Thick skin.
|
||||
return
|
||||
|
||||
if( H.shoes || ( H.wear_suit && (H.wear_suit.body_parts_covered & FEET) ) )
|
||||
return
|
||||
|
||||
if(H.species.flags & NO_MINOR_CUT)
|
||||
return
|
||||
|
||||
to_chat(H, "<span class='danger'>You step on \the [src]!</span>")
|
||||
|
||||
var/list/check = list("l_foot", "r_foot")
|
||||
while(check.len)
|
||||
var/picked = pick(check)
|
||||
var/obj/item/organ/external/affecting = H.get_organ(picked)
|
||||
if(affecting)
|
||||
if(affecting.robotic >= ORGAN_ROBOT)
|
||||
return
|
||||
if(affecting.take_damage(force, 0))
|
||||
H.UpdateDamageIcon()
|
||||
H.updatehealth()
|
||||
if(affecting.organ_can_feel_pain())
|
||||
H.Weaken(3)
|
||||
return
|
||||
check -= picked
|
||||
return
|
||||
|
||||
// Preset types - left here for the code that uses them
|
||||
/obj/item/weapon/material/shard/shrapnel/New(loc)
|
||||
..(loc, "steel")
|
||||
|
||||
/obj/item/weapon/material/shard/phoron/New(loc)
|
||||
..(loc, "borosilicate glass")
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
/obj/item/weapon/material/sword
|
||||
name = "claymore"
|
||||
desc = "What are you standing around staring at this for? Get to killing!"
|
||||
icon_state = "claymore"
|
||||
slot_flags = SLOT_BELT
|
||||
force_divisor = 0.7 // 42 when wielded with hardnes 60 (steel)
|
||||
thrown_force_divisor = 0.5 // 10 when thrown with weight 20 (steel)
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
drop_sound = 'sound/items/drop/sword.ogg'
|
||||
pickup_sound = 'sound/items/pickup/sword.ogg'
|
||||
|
||||
/obj/item/weapon/material/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(unique_parry_check(user, attacker, damage_source) && prob(50))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/material/sword/katana
|
||||
name = "katana"
|
||||
desc = "Woefully underpowered in D20. This one looks pretty sharp."
|
||||
icon_state = "katana"
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
|
||||
/obj/item/weapon/material/sword/katana/caneblade
|
||||
name = "cane blade"
|
||||
desc = "Used for making people fall over instead of helping them stand up."
|
||||
icon_state = "caneblade"
|
||||
item_state = "caneblade"
|
||||
|
||||
/obj/item/weapon/material/sword/rapier
|
||||
name = "rapier"
|
||||
desc = "A slender, fancy and sharply pointed sword."
|
||||
icon_state = "rapier"
|
||||
item_state = "rapier"
|
||||
slot_flags = SLOT_BELT
|
||||
applies_material_colour = 0
|
||||
attack_verb = list("attacked", "stabbed", "prodded", "poked", "lunged")
|
||||
edge = 0 //rapiers are pointy, but not cutty like other swords
|
||||
|
||||
/obj/item/weapon/material/sword/longsword
|
||||
name = "longsword"
|
||||
desc = "A double-edged large blade."
|
||||
icon_state = "longsword"
|
||||
item_state = "longsword"
|
||||
applies_material_colour = 0
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
can_cleave = TRUE
|
||||
|
||||
/obj/item/weapon/material/sword/sabre
|
||||
name = "sabre"
|
||||
desc = "A sharp curved sword, a favored weapon of pirates far in the past."
|
||||
icon_state = "sabre"
|
||||
item_state = "sabre"
|
||||
applies_material_colour = 0 //messes up the hilt color otherwise
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/weapon/material/sword/battleaxe
|
||||
name = "battleaxe"
|
||||
desc = "A one handed battle axe, still a deadly weapon."
|
||||
icon_state = "axe"
|
||||
item_state = "axe"
|
||||
slot_flags = SLOT_BACK
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
applies_material_colour = 0
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
can_cleave = TRUE
|
||||
|
||||
/obj/item/weapon/material/sword/battleaxe/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(unique_parry_check(user, attacker, damage_source) && prob(10))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/material/sword/gladius
|
||||
name = "gladius"
|
||||
desc = "An ancient short sword, designed to stab and cut."
|
||||
icon_state = "gladius"
|
||||
item_state = "gladius"
|
||||
applies_material_colour = 0
|
||||
slot_flags = SLOT_BELT
|
||||
/obj/item/weapon/material/sword
|
||||
name = "claymore"
|
||||
desc = "What are you standing around staring at this for? Get to killing!"
|
||||
icon_state = "claymore"
|
||||
slot_flags = SLOT_BELT
|
||||
force_divisor = 0.7 // 42 when wielded with hardnes 60 (steel)
|
||||
thrown_force_divisor = 0.5 // 10 when thrown with weight 20 (steel)
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
drop_sound = 'sound/items/drop/sword.ogg'
|
||||
pickup_sound = 'sound/items/pickup/sword.ogg'
|
||||
|
||||
/obj/item/weapon/material/sword/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(unique_parry_check(user, attacker, damage_source) && prob(50))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/material/sword/katana
|
||||
name = "katana"
|
||||
desc = "Woefully underpowered in D20. This one looks pretty sharp."
|
||||
icon_state = "katana"
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
|
||||
/obj/item/weapon/material/sword/katana/caneblade
|
||||
name = "cane blade"
|
||||
desc = "Used for making people fall over instead of helping them stand up."
|
||||
icon_state = "caneblade"
|
||||
item_state = "caneblade"
|
||||
|
||||
/obj/item/weapon/material/sword/rapier
|
||||
name = "rapier"
|
||||
desc = "A slender, fancy and sharply pointed sword."
|
||||
icon_state = "rapier"
|
||||
item_state = "rapier"
|
||||
slot_flags = SLOT_BELT
|
||||
applies_material_colour = 0
|
||||
attack_verb = list("attacked", "stabbed", "prodded", "poked", "lunged")
|
||||
edge = 0 //rapiers are pointy, but not cutty like other swords
|
||||
|
||||
/obj/item/weapon/material/sword/longsword
|
||||
name = "longsword"
|
||||
desc = "A double-edged large blade."
|
||||
icon_state = "longsword"
|
||||
item_state = "longsword"
|
||||
applies_material_colour = 0
|
||||
slot_flags = SLOT_BELT | SLOT_BACK
|
||||
can_cleave = TRUE
|
||||
|
||||
/obj/item/weapon/material/sword/sabre
|
||||
name = "sabre"
|
||||
desc = "A sharp curved sword, a favored weapon of pirates far in the past."
|
||||
icon_state = "sabre"
|
||||
item_state = "sabre"
|
||||
applies_material_colour = 0 //messes up the hilt color otherwise
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/weapon/material/sword/battleaxe
|
||||
name = "battleaxe"
|
||||
desc = "A one handed battle axe, still a deadly weapon."
|
||||
icon_state = "axe"
|
||||
item_state = "axe"
|
||||
slot_flags = SLOT_BACK
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
applies_material_colour = 0
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
can_cleave = TRUE
|
||||
|
||||
/obj/item/weapon/material/sword/battleaxe/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(unique_parry_check(user, attacker, damage_source) && prob(10))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/material/sword/gladius
|
||||
name = "gladius"
|
||||
desc = "An ancient short sword, designed to stab and cut."
|
||||
icon_state = "gladius"
|
||||
item_state = "gladius"
|
||||
applies_material_colour = 0
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
/obj/item/weapon/material/star
|
||||
name = "shuriken"
|
||||
desc = "A sharp, perfectly weighted piece of metal."
|
||||
icon_state = "star"
|
||||
force_divisor = 0.1 // 6 with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.75 // 15 with weight 20 (steel)
|
||||
throw_speed = 10
|
||||
throw_range = 15
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
|
||||
/obj/item/weapon/material/star/New()
|
||||
..()
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
|
||||
/obj/item/weapon/material/star/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(material.radioactivity>0 && istype(hit_atom,/mob/living))
|
||||
var/mob/living/M = hit_atom
|
||||
M.adjustToxLoss(rand(20,40))
|
||||
|
||||
/obj/item/weapon/material/star/ninja
|
||||
/obj/item/weapon/material/star
|
||||
name = "shuriken"
|
||||
desc = "A sharp, perfectly weighted piece of metal."
|
||||
icon_state = "star"
|
||||
force_divisor = 0.1 // 6 with hardness 60 (steel)
|
||||
thrown_force_divisor = 0.75 // 15 with weight 20 (steel)
|
||||
throw_speed = 10
|
||||
throw_range = 15
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
|
||||
/obj/item/weapon/material/star/New()
|
||||
..()
|
||||
src.pixel_x = rand(-12, 12)
|
||||
src.pixel_y = rand(-12, 12)
|
||||
|
||||
/obj/item/weapon/material/star/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(material.radioactivity>0 && istype(hit_atom,/mob/living))
|
||||
var/mob/living/M = hit_atom
|
||||
M.adjustToxLoss(rand(20,40))
|
||||
|
||||
/obj/item/weapon/material/star/ninja
|
||||
default_material = "uranium"
|
||||
@@ -1,193 +1,193 @@
|
||||
/* Two-handed Weapons
|
||||
* Contains:
|
||||
* Twohanded
|
||||
* Fireaxe
|
||||
* Double-Bladed Energy Swords
|
||||
*/
|
||||
|
||||
/*##################################################################
|
||||
##################### TWO HANDED WEAPONS BE HERE~ -Agouri :3 ########
|
||||
####################################################################*/
|
||||
|
||||
//Rewrote TwoHanded weapons stuff and put it all here. Just copypasta fireaxe to make new ones ~Carn
|
||||
//This rewrite means we don't have two variables for EVERY item which are used only by a few weapons.
|
||||
//It also tidies stuff up elsewhere.
|
||||
|
||||
/*
|
||||
* Twohanded
|
||||
*/
|
||||
/obj/item/weapon/material/twohanded
|
||||
w_class = ITEMSIZE_LARGE
|
||||
var/wielded = 0
|
||||
var/force_wielded = 0
|
||||
var/force_unwielded
|
||||
var/wieldsound = null
|
||||
var/unwieldsound = null
|
||||
var/base_icon
|
||||
var/base_name
|
||||
var/unwielded_force_divisor = 0.25
|
||||
hitsound = "swing_hit"
|
||||
drop_sound = 'sound/items/drop/sword.ogg'
|
||||
pickup_sound = 'sound/items/pickup/sword.ogg'
|
||||
|
||||
/obj/item/weapon/material/twohanded/update_held_icon()
|
||||
var/mob/living/M = loc
|
||||
if(istype(M) && M.can_wield_item(src) && is_held_twohanded(M))
|
||||
wielded = 1
|
||||
force = force_wielded
|
||||
name = "[base_name] (wielded)"
|
||||
update_icon()
|
||||
else
|
||||
wielded = 0
|
||||
force = force_unwielded
|
||||
name = "[base_name]"
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/twohanded/update_force()
|
||||
base_name = name
|
||||
if(sharp || edge)
|
||||
force_wielded = material.get_edge_damage()
|
||||
else
|
||||
force_wielded = material.get_blunt_damage()
|
||||
force_wielded = round(force_wielded*force_divisor)
|
||||
force_unwielded = round(force_wielded*unwielded_force_divisor)
|
||||
force = force_unwielded
|
||||
throwforce = round(force*thrown_force_divisor)
|
||||
//to_world("[src] has unwielded force [force_unwielded], wielded force [force_wielded] and throwforce [throwforce] when made from default material [material.name]")
|
||||
|
||||
/obj/item/weapon/material/twohanded/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
//Allow a small chance of parrying melee attacks when wielded - maybe generalize this to other weapons someday
|
||||
/obj/item/weapon/material/twohanded/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(wielded && default_parry_check(user, attacker, damage_source) && prob(15))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/material/twohanded/update_icon()
|
||||
icon_state = "[base_icon][wielded]"
|
||||
item_state = icon_state
|
||||
|
||||
/obj/item/weapon/material/twohanded/dropped()
|
||||
..()
|
||||
if(wielded)
|
||||
spawn(0)
|
||||
update_held_icon()
|
||||
|
||||
/*
|
||||
* Fireaxe
|
||||
*/
|
||||
/obj/item/weapon/material/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
|
||||
icon_state = "fireaxe0"
|
||||
base_icon = "fireaxe"
|
||||
name = "fire axe"
|
||||
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
|
||||
description_info = "This weapon can cleave, striking nearby lesser, hostile enemies close to the primary target. It must be held in both hands to do this."
|
||||
unwielded_force_divisor = 0.25
|
||||
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
|
||||
dulled_divisor = 0.75 //Still metal on a stick
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
w_class = ITEMSIZE_LARGE
|
||||
slot_flags = SLOT_BACK
|
||||
force_wielded = 30
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
applies_material_colour = 0
|
||||
can_cleave = TRUE
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
|
||||
/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
|
||||
..()
|
||||
if(A && wielded)
|
||||
if(istype(A,/obj/structure/window))
|
||||
var/obj/structure/window/W = A
|
||||
W.shatter()
|
||||
else if(istype(A,/obj/structure/grille))
|
||||
qdel(A)
|
||||
else if(istype(A,/obj/effect/plant))
|
||||
var/obj/effect/plant/P = A
|
||||
P.die_off()
|
||||
|
||||
/obj/item/weapon/material/twohanded/fireaxe/scythe
|
||||
icon_state = "scythe0"
|
||||
base_icon = "scythe"
|
||||
name = "scythe"
|
||||
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
|
||||
force_divisor = 0.65
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 2)
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
|
||||
//spears, bay edition
|
||||
/obj/item/weapon/material/twohanded/spear
|
||||
icon_state = "spearglass0"
|
||||
base_icon = "spearglass"
|
||||
name = "spear"
|
||||
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
|
||||
force = 10
|
||||
w_class = ITEMSIZE_LARGE
|
||||
slot_flags = SLOT_BACK
|
||||
force_divisor = 0.5 // 15 when wielded with hardness 30 (glass)
|
||||
unwielded_force_divisor = 0.375
|
||||
thrown_force_divisor = 1.5 // 22.5 when thrown with weight 15 (glass)
|
||||
throw_speed = 3
|
||||
edge = FALSE
|
||||
sharp = TRUE
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
mob_throw_hit_sound = 'sound/weapons/pierce.ogg'
|
||||
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
|
||||
default_material = "glass"
|
||||
applies_material_colour = 0
|
||||
fragile = 1 //It's a haphazard thing of glass, wire, and steel
|
||||
reach = 2 // Spears are long.
|
||||
attackspeed = 14
|
||||
|
||||
//This is mostly for centaurs.
|
||||
/obj/item/weapon/material/twohanded/spear/lance
|
||||
name = "lance"
|
||||
desc = "End him rightly"
|
||||
icon = 'icons/obj/weapons_vr.dmi'
|
||||
icon_state = "lance"
|
||||
item_state = "lance"
|
||||
force_divisor = 0.3
|
||||
force = 10
|
||||
thrown_force_divisor = 1
|
||||
default_material = "MAT_STEEL"
|
||||
fragile = 0
|
||||
sharp = TRUE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/weapon/material/twohanded/riding_crop
|
||||
name = "riding crop"
|
||||
desc = "A rod, a little over a foot long with a widened grip and a thick, leather patch at the end. Used since the dawn of the West to control animals."
|
||||
force_divisor = 0.05 //Required in order for the X attacks Y message to pop up.
|
||||
unwielded_force_divisor = 1 // One here, too.
|
||||
applies_material_colour = 1
|
||||
unbreakable = 1
|
||||
base_icon = "riding_crop"
|
||||
icon_state = "riding_crop0"
|
||||
attack_verb = list("cropped","spanked","swatted","smacked","peppered")
|
||||
|
||||
/obj/item/weapon/material/twohanded/spear/flint
|
||||
/* Two-handed Weapons
|
||||
* Contains:
|
||||
* Twohanded
|
||||
* Fireaxe
|
||||
* Double-Bladed Energy Swords
|
||||
*/
|
||||
|
||||
/*##################################################################
|
||||
##################### TWO HANDED WEAPONS BE HERE~ -Agouri :3 ########
|
||||
####################################################################*/
|
||||
|
||||
//Rewrote TwoHanded weapons stuff and put it all here. Just copypasta fireaxe to make new ones ~Carn
|
||||
//This rewrite means we don't have two variables for EVERY item which are used only by a few weapons.
|
||||
//It also tidies stuff up elsewhere.
|
||||
|
||||
/*
|
||||
* Twohanded
|
||||
*/
|
||||
/obj/item/weapon/material/twohanded
|
||||
w_class = ITEMSIZE_LARGE
|
||||
var/wielded = 0
|
||||
var/force_wielded = 0
|
||||
var/force_unwielded
|
||||
var/wieldsound = null
|
||||
var/unwieldsound = null
|
||||
var/base_icon
|
||||
var/base_name
|
||||
var/unwielded_force_divisor = 0.25
|
||||
hitsound = "swing_hit"
|
||||
drop_sound = 'sound/items/drop/sword.ogg'
|
||||
pickup_sound = 'sound/items/pickup/sword.ogg'
|
||||
|
||||
/obj/item/weapon/material/twohanded/update_held_icon()
|
||||
var/mob/living/M = loc
|
||||
if(istype(M) && M.can_wield_item(src) && is_held_twohanded(M))
|
||||
wielded = 1
|
||||
force = force_wielded
|
||||
name = "[base_name] (wielded)"
|
||||
update_icon()
|
||||
else
|
||||
wielded = 0
|
||||
force = force_unwielded
|
||||
name = "[base_name]"
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/material/twohanded/update_force()
|
||||
base_name = name
|
||||
if(sharp || edge)
|
||||
force_wielded = material.get_edge_damage()
|
||||
else
|
||||
force_wielded = material.get_blunt_damage()
|
||||
force_wielded = round(force_wielded*force_divisor)
|
||||
force_unwielded = round(force_wielded*unwielded_force_divisor)
|
||||
force = force_unwielded
|
||||
throwforce = round(force*thrown_force_divisor)
|
||||
//to_world("[src] has unwielded force [force_unwielded], wielded force [force_wielded] and throwforce [throwforce] when made from default material [material.name]")
|
||||
|
||||
/obj/item/weapon/material/twohanded/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
//Allow a small chance of parrying melee attacks when wielded - maybe generalize this to other weapons someday
|
||||
/obj/item/weapon/material/twohanded/handle_shield(mob/user, var/damage, atom/damage_source = null, mob/attacker = null, var/def_zone = null, var/attack_text = "the attack")
|
||||
if(wielded && default_parry_check(user, attacker, damage_source) && prob(15))
|
||||
user.visible_message("<span class='danger'>\The [user] parries [attack_text] with \the [src]!</span>")
|
||||
playsound(src, 'sound/weapons/punchmiss.ogg', 50, 1)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/material/twohanded/update_icon()
|
||||
icon_state = "[base_icon][wielded]"
|
||||
item_state = icon_state
|
||||
|
||||
/obj/item/weapon/material/twohanded/dropped()
|
||||
..()
|
||||
if(wielded)
|
||||
spawn(0)
|
||||
update_held_icon()
|
||||
|
||||
/*
|
||||
* Fireaxe
|
||||
*/
|
||||
/obj/item/weapon/material/twohanded/fireaxe // DEM AXES MAN, marker -Agouri
|
||||
icon_state = "fireaxe0"
|
||||
base_icon = "fireaxe"
|
||||
name = "fire axe"
|
||||
desc = "Truly, the weapon of a madman. Who would think to fight fire with an axe?"
|
||||
description_info = "This weapon can cleave, striking nearby lesser, hostile enemies close to the primary target. It must be held in both hands to do this."
|
||||
unwielded_force_divisor = 0.25
|
||||
force_divisor = 0.7 // 10/42 with hardness 60 (steel) and 0.25 unwielded divisor
|
||||
dulled_divisor = 0.75 //Still metal on a stick
|
||||
sharp = TRUE
|
||||
edge = TRUE
|
||||
w_class = ITEMSIZE_LARGE
|
||||
slot_flags = SLOT_BACK
|
||||
force_wielded = 30
|
||||
attack_verb = list("attacked", "chopped", "cleaved", "torn", "cut")
|
||||
applies_material_colour = 0
|
||||
can_cleave = TRUE
|
||||
drop_sound = 'sound/items/drop/axe.ogg'
|
||||
pickup_sound = 'sound/items/pickup/axe.ogg'
|
||||
|
||||
/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
|
||||
..()
|
||||
if(A && wielded)
|
||||
if(istype(A,/obj/structure/window))
|
||||
var/obj/structure/window/W = A
|
||||
W.shatter()
|
||||
else if(istype(A,/obj/structure/grille))
|
||||
qdel(A)
|
||||
else if(istype(A,/obj/effect/plant))
|
||||
var/obj/effect/plant/P = A
|
||||
P.die_off()
|
||||
|
||||
/obj/item/weapon/material/twohanded/fireaxe/scythe
|
||||
icon_state = "scythe0"
|
||||
base_icon = "scythe"
|
||||
name = "scythe"
|
||||
desc = "A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow."
|
||||
force_divisor = 0.65
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_COMBAT = 2)
|
||||
attack_verb = list("chopped", "sliced", "cut", "reaped")
|
||||
|
||||
//spears, bay edition
|
||||
/obj/item/weapon/material/twohanded/spear
|
||||
icon_state = "spearglass0"
|
||||
base_icon = "spearglass"
|
||||
name = "spear"
|
||||
desc = "A haphazardly-constructed yet still deadly weapon of ancient design."
|
||||
force = 10
|
||||
w_class = ITEMSIZE_LARGE
|
||||
slot_flags = SLOT_BACK
|
||||
force_divisor = 0.5 // 15 when wielded with hardness 30 (glass)
|
||||
unwielded_force_divisor = 0.375
|
||||
thrown_force_divisor = 1.5 // 22.5 when thrown with weight 15 (glass)
|
||||
throw_speed = 3
|
||||
edge = FALSE
|
||||
sharp = TRUE
|
||||
hitsound = 'sound/weapons/bladeslice.ogg'
|
||||
mob_throw_hit_sound = 'sound/weapons/pierce.ogg'
|
||||
attack_verb = list("attacked", "poked", "jabbed", "torn", "gored")
|
||||
default_material = "glass"
|
||||
applies_material_colour = 0
|
||||
fragile = 1 //It's a haphazard thing of glass, wire, and steel
|
||||
reach = 2 // Spears are long.
|
||||
attackspeed = 14
|
||||
|
||||
//This is mostly for centaurs.
|
||||
/obj/item/weapon/material/twohanded/spear/lance
|
||||
name = "lance"
|
||||
desc = "End him rightly"
|
||||
icon = 'icons/obj/weapons_vr.dmi'
|
||||
icon_state = "lance"
|
||||
item_state = "lance"
|
||||
force_divisor = 0.3
|
||||
force = 10
|
||||
thrown_force_divisor = 1
|
||||
default_material = "MAT_STEEL"
|
||||
fragile = 0
|
||||
sharp = TRUE
|
||||
edge = FALSE
|
||||
|
||||
/obj/item/weapon/material/twohanded/riding_crop
|
||||
name = "riding crop"
|
||||
desc = "A rod, a little over a foot long with a widened grip and a thick, leather patch at the end. Used since the dawn of the West to control animals."
|
||||
force_divisor = 0.05 //Required in order for the X attacks Y message to pop up.
|
||||
unwielded_force_divisor = 1 // One here, too.
|
||||
applies_material_colour = 1
|
||||
unbreakable = 1
|
||||
base_icon = "riding_crop"
|
||||
icon_state = "riding_crop0"
|
||||
attack_verb = list("cropped","spanked","swatted","smacked","peppered")
|
||||
|
||||
/obj/item/weapon/material/twohanded/spear/flint
|
||||
default_material = MAT_FLINT
|
||||
Reference in New Issue
Block a user