[MIRROR] fullauto now checks for incapacitated instead of stat [MDB IGNORE] (#9786)

* fullauto now checks for incapacitated instead of stat (#63083)

* fullauto now checks for incapacitated instead of stat

* Fixes our own fullauto

* Tabs indentation moment

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
SkyratBot
2021-12-01 16:52:03 +00:00
committed by GitHub
co-authored by Fikou GoldenAlpharex
parent 7513ab64bf
commit 0bcf77b855
2 changed files with 11 additions and 9 deletions
+2 -2
View File
@@ -240,7 +240,7 @@
// Gun procs.
/obj/item/gun/proc/on_autofire_start(mob/living/shooter)
if(semicd || shooter.stat || !can_trigger_gun(shooter))
if(semicd || shooter.incapacitated() || !can_trigger_gun(shooter))
return FALSE
if(!can_shoot())
shoot_with_empty_chamber(shooter)
@@ -260,7 +260,7 @@
/obj/item/gun/proc/do_autofire(datum/source, atom/target, mob/living/shooter, params)
SIGNAL_HANDLER
if(semicd || shooter.stat)
if(semicd || shooter.incapacitated())
return NONE
if(!can_shoot())
shoot_with_empty_chamber(shooter)
@@ -249,7 +249,7 @@
// Gun procs.
/obj/item/gun/proc/on_autofire_start(mob/living/shooter)
if(!can_shoot(shooter) || !can_trigger_gun(shooter) || semicd)
if(!can_shoot(shooter) || !can_trigger_gun(shooter) || shooter.incapacitated() || semicd)
return FALSE
var/obj/item/bodypart/other_hand = shooter.has_hand_for_held_index(shooter.get_inactive_hand_index())
if(weapon_weight == WEAPON_HEAVY && (shooter.get_inactive_held_item() || !other_hand))
@@ -264,12 +264,14 @@
return COMPONENT_AUTOFIRE_ONMOUSEDOWN_BYPASS
/obj/item/gun/proc/do_autofire(datum/source, atom/target, mob/living/shooter, params)
SIGNAL_HANDLER
if(!can_shoot())
shoot_with_empty_chamber(shooter)
return FALSE
INVOKE_ASYNC(src, .proc/do_autofire_shot, source, target, shooter, params)
return COMPONENT_AUTOFIRE_SHOT_SUCCESS
SIGNAL_HANDLER
if(shooter.incapacitated())
return FALSE
if(!can_shoot())
shoot_with_empty_chamber(shooter)
return FALSE
INVOKE_ASYNC(src, .proc/do_autofire_shot, source, target, shooter, params)
return COMPONENT_AUTOFIRE_SHOT_SUCCESS
/obj/item/gun/proc/do_autofire_shot(datum/source, atom/target, mob/living/shooter, params)
var/obj/item/gun/akimbo_gun = shooter.get_inactive_held_item()