From f7b3194d755cefe18de55fc540ba1067c053f11b Mon Sep 17 00:00:00 2001 From: Resomi Enjoer Date: Sun, 15 Oct 2023 23:08:09 +0300 Subject: [PATCH] QOLmod - pre PR clean --- .../modules/tff_modsuits/modules/module_combat.dm | 14 +++++++++++++- tff_modular/modules/tff_modsuits/modules_items.dm | 7 +++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/tff_modular/modules/tff_modsuits/modules/module_combat.dm b/tff_modular/modules/tff_modsuits/modules/module_combat.dm index 072c1ad0cd5..11b1f14160b 100644 --- a/tff_modular/modules/tff_modsuits/modules/module_combat.dm +++ b/tff_modular/modules/tff_modsuits/modules/module_combat.dm @@ -20,7 +20,8 @@ var/datum/weakref/spear_ref /obj/item/mod/module/energy_spear/on_use() - ..() + if(!..()) + return //Если прошлое копье еще существует(каким-то образом), останавливаем создание нового. if(deployed) mod.wearer.balloon_alert(mod.wearer, "Old spear exist!") @@ -81,6 +82,17 @@ /obj/item/mod/module/itemgive/mod_blade/syndicate, ) +/obj/item/mod/module/itemgive/mod_blade/on_install() + . = ..() + for(var/obj/item/melee/mod_blade/blade in items_to_give) + balde.mod = mod + + +/obj/item/mod/module/itemgive/mod_blade/on_uninstall(deleting) + . = ..() + for(var/obj/item/melee/mod_blade/blade in items_to_give) + balde.mod = null + /obj/item/mod/module/itemgive/mod_blade/syndicate name = "MOD armblade module" icon_state = "module_mod_armblade" diff --git a/tff_modular/modules/tff_modsuits/modules_items.dm b/tff_modular/modules/tff_modsuits/modules_items.dm index 6124bffd3d6..6dbaea4f7eb 100644 --- a/tff_modular/modules/tff_modsuits/modules_items.dm +++ b/tff_modular/modules/tff_modsuits/modules_items.dm @@ -74,7 +74,7 @@ // Урон от альтернативной атаки. var/alt_attack_force = 10 // Время перезарядки альтерантивной атаки. - var/alt_attack_cooldown = 3 SECONDS + var/alt_attack_cooldown = 5 SECONDS COOLDOWN_DECLARE(cooldown_aoe) // Цена по энергии для второстепенной атаки. var/alt_attack_power_cost = 50 @@ -109,7 +109,11 @@ var/turf/turf = get_step(user_turf, turn(dir_to_target, i)) for(var/mob/living/living_target in turf) if(user.Adjacent(living_target) && living_target.body_position != LYING_DOWN) + if(living_target == user) + user.balloon_alert(user, "Hurting self!") + break living_target.apply_damage(alt_attack_force, BRUTE, attacking_item = src) + user.do_attack_animation(target, "slash", src, TRUE) playsound(get_turf(user), 'tff_modular/master_files/sounds/anomaly_attack_slice.ogg', 40) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN @@ -123,5 +127,4 @@ wound_bonus = 30 bare_wound_bonus = 30 alt_attack_force = 20 - alt_attack_cooldown = 1 SECONDS alt_attack_power_cost = 100