From 80fbaf56326fccd5980eba13c51a436aba8ad97f Mon Sep 17 00:00:00 2001 From: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:42:32 +0300 Subject: [PATCH] Fixes for mech crusher (#26741) * E * forgor this * forgor this thing too * add icons * Update work_tools.dm Signed-off-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com> * Update code/modules/research/designs/mechfabricator_designs.dm Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com> * Update code/game/mecha/equipment/tools/work_tools.dm Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com> * my beloved , gone. * misinput!!! * Update code/game/mecha/equipment/tools/work_tools.dm Co-authored-by: warriorstar-orion Signed-off-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com> * Review compliance * Update work_tools.dm * Update work_tools.dm * more fixes * Update work_tools.dm --------- Signed-off-by: MLGTASTICa <61350382+MLGTASTICa@users.noreply.github.com> Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Co-authored-by: warriorstar-orion --- code/game/mecha/equipment/tools/work_tools.dm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 8ecbddf8641..7d8f64ed04e 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -459,15 +459,15 @@ name = "exosuit crusher" desc = "A mech mounted crusher. For crushing bigger things." icon_state = "mecha_crusher" - equip_cooldown = 15 + equip_cooldown = 1.2 SECONDS energy_drain = 3000 harmful = TRUE range = MECHA_MELEE | MECHA_RANGED var/obj/item/kinetic_crusher/mecha/internal_crusher /obj/item/kinetic_crusher/mecha - force = 15 - force_wielded = 30 + /// Since this one doesn't have the two_handed component it will always use the value in force + force = 30 armour_penetration_flat = 15 detonation_damage = 90 backstab_bonus = 50 @@ -483,6 +483,7 @@ unwanted?.RemoveComponent() unwanted = GetComponent(/datum/component/two_handed) unwanted?.RemoveComponent() + /// This is only for the sake of internal checks in the crusher itself. ADD_TRAIT(src, TRAIT_WIELDED, "mech[UID()]") /obj/item/mecha_parts/mecha_equipment/mech_crusher/Initialize(mapload) @@ -498,9 +499,10 @@ return if(!chassis.occupant) return + chassis.occupant.changeNext_click(equip_cooldown) var/proximate = chassis.Adjacent(target) - if(ismob(target)) - internal_crusher.attack(target, chassis.occupant) + if(proximate) + target.attackby(internal_crusher, chassis.occupant) internal_crusher.afterattack(target, chassis.occupant, proximate, null) #undef MECH_RCD_MODE_DECONSTRUCT