diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 155e873cffd..396ae309038 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -4,6 +4,7 @@ * Fireaxe * Double-Bladed Energy Swords * Spears + * CHAINSAWS */ /*################################################################## @@ -370,3 +371,38 @@ explosive = C42 desc = "A makeshift spear with [C42] attached to it. Alt+click on the spear to set your war cry!" update_icon() + +// CHAINSAW +/obj/item/weapon/twohanded/required/chainsaw + name = "chainsaw" + desc = "A versatile power tool. Useful for limbing trees and delimbing humans." + icon_state = "chainsaw_off" + flags = CONDUCT + force = 13 + w_class = 5 + throwforce = 13 + throw_speed = 2 + throw_range = 4 + materials = list(MAT_METAL=13000) + origin_tech = "materials=2;engineering=2;combat=2" + attack_verb = list("sawed", "torn", "cut", "chopped", "diced") + hitsound = "swing_hit" + sharpness = IS_SHARP + action_button_name = "Pull the starting cord" + var/on = 0 + +/obj/item/weapon/twohanded/required/chainsaw/attack_self(mob/user) + on = !on + user << "As you pull the starting cord dangling from \the [src], [on ? "it begins to whirr." : "the chain stops moving."]" + force = on ? 21 : 13 + throwforce = on ? 21 : 13 + icon_state = "chainsaw_[on ? "on" : "off"]" + + if(hitsound == "swing_hit") + hitsound = 'sound/weapons/chainsawhit.ogg' + else + hitsound = "swing_hit" + + if(src == user.get_active_hand()) //update inhands + user.update_inv_l_hand() + user.update_inv_r_hand() diff --git a/code/modules/crafting/recipes.dm b/code/modules/crafting/recipes.dm index 2721f4f8ed3..b3b632f789c 100644 --- a/code/modules/crafting/recipes.dm +++ b/code/modules/crafting/recipes.dm @@ -229,4 +229,14 @@ /obj/item/stack/packageWrap = 5,) tools = list(/obj/item/weapon/screwdriver) time = 200 - category = CAT_WEAPON \ No newline at end of file + category = CAT_WEAPON + +/datum/table_recipe/chainsaw + name = "Chainsaw" + result = /obj/item/weapon/twohanded/required/chainsaw + reqs = list(/obj/item/weapon/circular_saw = 1, + /obj/item/stack/cable_coil = 1, + /obj/item/stack/sheet/plasteel = 1) + tools = list(/obj/item/weapon/weldingtool) + time = 100 + category = CAT_WEAPON diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index ddb7d17ac2e..638a7efb9d7 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -68,7 +68,7 @@ /obj/item/weapon/grown/log/attackby(obj/item/weapon/W, mob/user, params) ..() - if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy)) + if(istype(W, /obj/item/weapon/circular_saw) || istype(W, /obj/item/weapon/hatchet) || (istype(W, /obj/item/weapon/twohanded/fireaxe) && W:wielded) || istype(W, /obj/item/weapon/melee/energy) || istype(W, /obj/item/weapon/twohanded/required/chainsaw)) user.show_message("You make [plank_name] out of \the [src]!", 1) var/obj/item/stack/plank = new plank_type(user.loc, 1 + round(potency / 25)) var/old_plank_amount = plank.amount diff --git a/html/changelogs/Tkdrg-CHAINSAWS.yml b/html/changelogs/Tkdrg-CHAINSAWS.yml new file mode 100644 index 00000000000..686f28c112e --- /dev/null +++ b/html/changelogs/Tkdrg-CHAINSAWS.yml @@ -0,0 +1,6 @@ +author: Tkdrg + +delete-after: True + +changes: + - rscadd: "Added chainsaws. They can be tablecrafted using a circular saw, a plasteel sheet, some cable coil, and a welding tool. Don't forget to turn it on!" diff --git a/icons/mob/inhands/items_lefthand.dmi b/icons/mob/inhands/items_lefthand.dmi index 8081e5deabf..876b0d6ebdc 100644 Binary files a/icons/mob/inhands/items_lefthand.dmi and b/icons/mob/inhands/items_lefthand.dmi differ diff --git a/icons/mob/inhands/items_righthand.dmi b/icons/mob/inhands/items_righthand.dmi index 48092455cca..f24cc31534e 100644 Binary files a/icons/mob/inhands/items_righthand.dmi and b/icons/mob/inhands/items_righthand.dmi differ diff --git a/icons/obj/weapons.dmi b/icons/obj/weapons.dmi index f4e8277ac46..eaea54a5c73 100644 Binary files a/icons/obj/weapons.dmi and b/icons/obj/weapons.dmi differ diff --git a/sound/weapons/chainsawhit.ogg b/sound/weapons/chainsawhit.ogg new file mode 100644 index 00000000000..1c926112e8f Binary files /dev/null and b/sound/weapons/chainsawhit.ogg differ