Files
GS13NG/code/game/objects/items/tools/saw.dm
KathrinBailey ff51c9d2db Improvised Weapons Update: Part 1 (#12226)
* Improvised Weapons Part 1: Shotgun & Rifle

Adds new sprites for ammo, the improvised rifle, the improvised shotgun. Adds a hand saw. Adds things to the crafting menu. Adds things to the autolathe menu.

* PR not yet ready - just cleaning issues.

Just trying to remark some of the issues resolved so I can see where I'm at a bit easier.

* Reverting changes to shotgun ammo names in the autolathe.

No point calling it 12G when there's no 20G anymore.

* Weapon weight + sprite improvements.

Makes sprites for gun parts bulkier with a low alpha pixel outline to make them easier to click on. They also look a bit closer to what their final product will be.

* oops forgot the "

* Revert "Merge branch 'master' into Improvised-Part-1"

This reverts commit 1e43d228d1bc35b0582244ed0bd91934573b3cdd, reversing
changes made to 207e9fccd4e8cffbe9ed26401a6f516fc44245dd.

* Revert "Revert "Merge branch 'master' into Improvised-Part-1""

This reverts commit 22d421d010c4a4c5c5e26f49fe6bffcf6198df42.

* My Github or environment isn't flipping out. no more.

Derp. Also projectile damage modifier fixed. I can actually compile without hundreds of errors.

* Made small weapon parts have w_class small.

I was testing it out and seeing the trigger assembly take so much space in my inventory seemed really odd.

* Duplicate definition refused.

Hurrdurr I suck.
Glad I gave this a quick look-voer.
Shotgun description edited to reflect the 0.8x damage modifier.

* Resolved tools.dmi merge conflict.

Just took the dmi from master and put the new sprites on at the end.

* DNM - Trying to see why usptream tools.dmi with my stuff added on the end is conflicting.

* Please don't conflict
2020-05-28 23:24:42 -07:00

47 lines
1.4 KiB
Plaintext

/obj/item/hatchet/saw
name = "handsaw"
desc = "A very sharp handsaw, it's compact."
icon = 'icons/obj/tools.dmi'
icon_state = "saw"
item_state = "sawhandle_greyscale"
lefthand_file = 'icons/mob/inhands/equipment/kitchen_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/kitchen_righthand.dmi'
tool_behaviour = TOOL_SAW
force = 10
throwforce = 8
throw_speed = 3
throw_range = 5
custom_materials = list(/datum/material/iron = 5000)
attack_verb = list("sawed", "sliced", "cut")
hitsound = 'sound/weapons/bladeslice.ogg'
sharpness = IS_SHARP
var/random_color = TRUE //code taken from screwdrivers.dm; cool handles are cool.
var/static/list/saw_colors = list(
"blue" = rgb(24, 97, 213),
"red" = rgb(255, 0, 0),
"pink" = rgb(213, 24, 141),
"brown" = rgb(160, 82, 18),
"green" = rgb(14, 127, 27),
"cyan" = rgb(24, 162, 213),
"yellow" = rgb(255, 165, 0)
)
/obj/item/hatchet/saw/Initialize()
. = ..()
if(random_color)
icon_state = "sawhandle_greyscale"
var/our_color = pick(saw_colors)
add_atom_colour(saw_colors[our_color], FIXED_COLOUR_PRIORITY)
update_icon()
if(prob(75))
pixel_y = rand(-8, 8)
/obj/item/hatchet/saw/update_overlays()
. = ..()
if(!random_color) //icon override
return
var/mutable_appearance/base_overlay = mutable_appearance(icon, "sawblade")
base_overlay.appearance_flags = RESET_COLOR
. += base_overlay
// END