mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
Fixes energy shields and energy swords blocking everything regardless of block chance. (#21278)
1. When a human is hit by a bullet, check_shields() is called. If a value different from BULLET_ACT_HIT is returned, the shield will void the bullet. 2. In turn, check_shield() calls handle_shield() on the held shield. 3. whoever coded this shit forgot to add a default return value so the held shield returns null when it fails to block meaning that the game voids the bullet lol Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -118,6 +118,8 @@
|
||||
if(prob(reflectchance))
|
||||
user.visible_message(SPAN_DANGER("\The [user] blocks [attack_text] with \the [src]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
else
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
/obj/item/melee/energy/get_print_info()
|
||||
. = ..()
|
||||
|
||||
@@ -221,7 +221,8 @@
|
||||
else
|
||||
user.visible_message(SPAN_DANGER("\The [user] blocks [attack_text] with \the [src]!"))
|
||||
return BULLET_ACT_BLOCK
|
||||
|
||||
else
|
||||
return BULLET_ACT_HIT
|
||||
|
||||
/obj/item/shield/energy/get_block_chance(mob/user, damage, atom/damage_source = null, mob/attacker = null)
|
||||
if(isprojectile(damage_source))
|
||||
|
||||
Reference in New Issue
Block a user