From b0da18e4044f2bd3426419047662df289f4b78fd Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Thu, 23 Jan 2020 02:13:55 +0100 Subject: [PATCH] Fixes chainsaw force being set to 0 on unwield. --- code/game/objects/items/twohanded.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/objects/items/twohanded.dm b/code/game/objects/items/twohanded.dm index b9862c3423..28a6fd66ee 100644 --- a/code/game/objects/items/twohanded.dm +++ b/code/game/objects/items/twohanded.dm @@ -25,8 +25,8 @@ */ /obj/item/twohanded var/wielded = 0 - var/force_unwielded = 0 - var/force_wielded = 0 + var/force_unwielded // default to null, the number force will be set to on unwield() + var/force_wielded // same as above but for wield() var/wieldsound = null var/unwieldsound = null var/slowdown_wielded = 0 @@ -73,7 +73,7 @@ to_chat(user, "You don't have enough intact hands.") return wielded = 1 - if(force_wielded) + if(!isnull(force_wielded)) force = force_wielded name = "[name] (Wielded)" update_icon() @@ -738,7 +738,7 @@ on = !on to_chat(user, "As you pull the starting cord dangling from [src], [on ? "it begins to whirr." : "the chain stops moving."]") force = on ? force_on : initial(force) - throwforce = on ? force_on : initial(force) + throwforce = on ? force_on : force icon_state = "chainsaw_[on ? "on" : "off"]" var/datum/component/butchering/butchering = src.GetComponent(/datum/component/butchering) butchering.butchering_enabled = on