diff --git a/code/game/objects/items/weapons/material/chainsaw.dm b/code/game/objects/items/weapons/material/chainsaw.dm index 76db45298dd..de1e1902ffb 100644 --- a/code/game/objects/items/weapons/material/chainsaw.dm +++ b/code/game/objects/items/weapons/material/chainsaw.dm @@ -1,19 +1,29 @@ obj/item/weapon/chainsaw - name = "Chainsaw" + name = "chainsaw" desc = "Vroom vroom." icon_state = "chainsaw0" + item_state = "chainsaw0" var/on = 0 var/max_fuel = 20 w_class = ITEMSIZE_LARGE slot_flags = SLOT_BACK w_class = ITEMSIZE_LARGE slot_flags = SLOT_BACK + var/active_force = 55 + var/inactive_force = 10 obj/item/weapon/chainsaw/New() var/datum/reagents/R = new/datum/reagents(max_fuel) reagents = R R.my_atom = src R.add_reagent("fuel", max_fuel) + processing_objects |= src + ..() + +obj/item/weapon/chainsaw/Destroy() + processing_objects -= src + if(reagents) + qdel(reagents) ..() obj/item/weapon/chainsaw/proc/turnOn() @@ -31,7 +41,7 @@ obj/item/weapon/chainsaw/proc/turnOn() visible_message("You start \the [src] up with a loud grinding!", "[usr] starts \the [src] up with a loud grinding!") attack_verb = list("shreds", "rips", "tears") playsound(src, 'sound/weapons/chainsaw_startup.ogg',40,1) - force = 55 + force = active_force edge = 1 sharp = 1 on = 1 @@ -44,7 +54,7 @@ obj/item/weapon/chainsaw/proc/turnOff() to_chat(usr, "You switch the gas nozzle on the chainsaw, turning it off.") attack_verb = list("bluntly hit", "beat", "knocked") playsound(src, 'sound/weapons/chainsaw_turnoff.ogg',40,1) - force = 10 + force = inactive_force edge = 0 sharp = 0 on = 0 @@ -87,12 +97,13 @@ obj/item/weapon/chainsaw/process() if(on) if(get_fuel() > 0) reagents.remove_reagent("fuel", 1) + playsound(src, 'sound/weapons/chainsaw_turnoff.ogg',15,1) if(get_fuel() <= 0) to_chat(usr, "\The [src] sputters to a stop!") - on = !on + turnOff() obj/item/weapon/chainsaw/proc/get_fuel() - reagents.get_reagent_amount("fuel") + return reagents.get_reagent_amount("fuel") obj/item/weapon/chainsaw/examine(mob/user) if(..(user,0)) @@ -109,4 +120,4 @@ obj/item/weapon/chainsaw/update_icon() item_state = "chainsaw1" else icon_state = "chainsaw0" - icon_state = "chainsaw0" \ No newline at end of file + item_state = "chainsaw0" diff --git a/icons/mob/items/lefthand.dmi b/icons/mob/items/lefthand.dmi index 3f2e4217f4c..6d64ad2c37a 100644 Binary files a/icons/mob/items/lefthand.dmi and b/icons/mob/items/lefthand.dmi differ diff --git a/icons/mob/items/righthand.dmi b/icons/mob/items/righthand.dmi index 5c4521e6e67..89a17fd30a1 100644 Binary files a/icons/mob/items/righthand.dmi and b/icons/mob/items/righthand.dmi differ