This commit is contained in:
kyunkyunkyun
2025-08-15 09:17:18 +05:00
committed by GitHub
parent a5792fb697
commit c04f986bc0
4 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -51,7 +51,7 @@
///From mob/living/carbon/human/attackedby(): (mob/living/carbon/human/attacker). Also found on species/disarm and species/harm
#define COMSIG_HUMAN_ATTACKED "human_attacked"
///from /mob/living/carbon/human/proc/check_shields(): (atom/hit_by, damage, attack_text, attack_type, armour_penetration, damage_type)
///from /mob/living/carbon/human/proc/check_shields(): (/mob/living/carbon/human/owner, atom/hitby, attack_text, final_block_chance, damage, attack_type)
#define COMSIG_HUMAN_CHECK_SHIELDS "human_check_shields"
#define SHIELD_BLOCK (1<<0)
+1 -1
View File
@@ -187,7 +187,7 @@
user.do_attack_animation(target)
if(ishuman(target))
var/mob/living/carbon/human/human_target = target
if(human_target.check_shields(src, force, "[user]'s [name]", MELEE_ATTACK, armour_penetration_flat, armour_penetration_percentage))
if(human_target.check_shields(src, force, "[user]'s [name]", MELEE_ATTACK))
return FALSE
add_fingerprint(user)
+1 -1
View File
@@ -665,7 +665,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
user.do_attack_animation(M)
if(H.check_shields(src, force, "the [name]", MELEE_ATTACK, armour_penetration_flat, armour_penetration_percentage))
if(H.check_shields(src, force, "the [name]", MELEE_ATTACK))
return FALSE
if(M != user)
@@ -32,7 +32,7 @@ emp_act
return -1
//Shields
var/shield_check_result = check_shields(P, P.damage, "the [P.name]", PROJECTILE_ATTACK, P.armour_penetration_flat, P.armour_penetration_percentage)
var/shield_check_result = check_shields(P, P.damage, "the [P.name]", PROJECTILE_ATTACK)
if(shield_check_result == 1)
return 2
else if(shield_check_result == -1)
@@ -242,7 +242,7 @@ emp_act
//End Here
/mob/living/carbon/human/proc/check_shields(atom/AM, damage, attack_text = "the attack", attack_type = MELEE_ATTACK, armour_penetration_flat = 0, armour_penetration_percentage = 0)
/mob/living/carbon/human/proc/check_shields(atom/AM, damage, attack_text = "the attack", attack_type = MELEE_ATTACK)
var/obj/item/shield = get_best_shield()
var/shield_result = shield?.hit_reaction(src, AM, attack_text, 0, damage, attack_type)
if(shield_result >= 1)
@@ -477,7 +477,7 @@ emp_act
if(user != src)
user.do_attack_animation(src)
if(check_shields(I, I.force, "the [I.name]", MELEE_ATTACK, I.armour_penetration_flat, I.armour_penetration_percentage))
if(check_shields(I, I.force, "the [I.name]", MELEE_ATTACK))
return
send_item_attack_message(I, user, hit_area)
@@ -708,7 +708,7 @@ emp_act
. = ..()
if(.)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
if(check_shields(M, damage, "the [M.name]", MELEE_ATTACK, M.armour_penetration_flat, M.armour_penetration_percentage))
if(check_shields(M, damage, "the [M.name]", MELEE_ATTACK))
return FALSE
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
@@ -723,7 +723,7 @@ emp_act
. = ..()
if(.)
var/damage = rand(attacker.melee_damage_lower, attacker.melee_damage_upper)
if(check_shields(attacker, damage, "[attacker.name]", MELEE_ATTACK, attacker.armour_penetration_flat, attacker.armour_penetration_percentage))
if(check_shields(attacker, damage, "[attacker.name]", MELEE_ATTACK))
return FALSE
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))