Full Auto Gun Mode Component (#24998)

* Full Auto Gun Mode Component

* Apply some refactoring

* spaces mhmm

* Some signal movement

* Apply DGamerL suggestions

* Unknown SIGNAL_HANDLER no more

* Fix runtime if uid is passed

* Why the hell you even care

* god you serious

---------

Co-authored-by: Gottfrei <zweisen@gmail.com>
This commit is contained in:
Mikhail Dzianishchyts
2024-04-22 21:32:49 +00:00
committed by GitHub
co-authored by Gottfrei
parent 00be61a811
commit 7fa44a31fb
49 changed files with 521 additions and 51 deletions
@@ -42,7 +42,7 @@
var/turf/location = loc
if(ismob(location))
var/mob/M = location
if(M.l_hand == src || M.r_hand == src)
if(M.is_holding(src))
location = M.loc
if(isturf(location)) //start a fire if possible
igniter.flamethrower_process(location)
@@ -360,7 +360,7 @@
if(ishuman(loc))
var/mob/living/carbon/human/our_location = loc
if(istype(our_location))
if(src != our_location.l_hand && src != our_location.r_hand)
if(!our_location.is_holding(src))
return
if(our_location.Adjacent(attacking_atom)) // with a buddy we deal 12 damage :D
our_location.do_attack_animation(attacking_atom, used_item = src)
@@ -240,7 +240,7 @@
. = ..()
if(!.) // they did not block the attack
return
if(istype(hitby, /obj/item/projectile))
if(isprojectile(hitby))
var/obj/item/projectile/P = hitby
if(P.reflectability == REFLECTABILITY_NEVER) //only 1 magic spell does this, but hey, needed
owner.visible_message("<span class='danger'>[owner] blocks [attack_text] with [src]!</span>")
+1 -1
View File
@@ -86,7 +86,7 @@
return
/obj/item/shield/energy/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(istype(hitby, /obj/item/projectile))
if(isprojectile(hitby))
var/obj/item/projectile/P = hitby
if(P.shield_buster && active)
toggle(owner, TRUE)
@@ -43,7 +43,7 @@
/obj/item/storage/briefcase/false_bottomed/afterattack(atom/A, mob/user, flag, params)
..()
if(stored_item && istype(stored_item, /obj/item/gun) && !Adjacent(A))
if(stored_item && isgun(stored_item) && !Adjacent(A))
var/obj/item/gun/stored_gun = stored_item
stored_gun.afterattack(A, user, flag, params)