From 2a239de7cfdc96e3f08e738c977b78bb6040203c Mon Sep 17 00:00:00 2001 From: Unit2E <41054578+Unit2E@users.noreply.github.com> Date: Tue, 10 Mar 2020 22:16:10 +0100 Subject: [PATCH] fixes toy dualsabers gaining damage (#49789) * clean fix for toy problem * did code suggestions --- code/game/objects/items/dualsaber.dm | 4 ++-- code/game/objects/items/toys.dm | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/dualsaber.dm b/code/game/objects/items/dualsaber.dm index 574f62da7e1..e8c99f98f40 100644 --- a/code/game/objects/items/dualsaber.dm +++ b/code/game/objects/items/dualsaber.dm @@ -23,6 +23,7 @@ max_integrity = 200 armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 100, "acid" = 70) resistance_flags = FIRE_PROOF + var/two_hand_force = 34 var/hacked = FALSE var/brightness_on = 6 //TWICE AS BRIGHT AS A REGULAR ESWORD var/list/possible_colors = list("red", "blue", "green", "purple") @@ -30,8 +31,7 @@ /obj/item/dualsaber/ComponentInitialize() . = ..() - AddComponent(/datum/component/two_handed, force_unwielded=3, force_wielded=34, \ - wieldsound='sound/weapons/saberon.ogg', unwieldsound='sound/weapons/saberoff.ogg') + AddComponent(/datum/component/two_handed, force_unwielded=force, force_wielded=two_hand_force, wieldsound='sound/weapons/saberon.ogg', unwieldsound='sound/weapons/saberoff.ogg') /// Triggered on wield of two handed item /// Specific hulk checks due to reflection chance for balance issues and switches hitsounds. diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 09030f10ea9..0fdc3692db8 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -394,12 +394,9 @@ throwforce = 0 throw_speed = 3 throw_range = 5 + two_hand_force = 0 attack_verb = list("attacked", "struck", "hit") -/obj/item/dualsaber/toy/ComponentInitialize() - . = ..() - AddComponent(/datum/component/two_handed, wieldsound='sound/weapons/saberon.ogg', unwieldsound='sound/weapons/saberoff.ogg') - /obj/item/dualsaber/toy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK) return 0