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-23 00:32:49 +03:00
committed by GitHub
parent 00be61a811
commit 7fa44a31fb
49 changed files with 521 additions and 51 deletions
@@ -75,7 +75,7 @@
/obj/item/taperecorder/attack_hand(mob/user)
if(loc == user)
if(mytape)
if(user.l_hand != src && user.r_hand != src)
if(!user.is_holding(src))
..()
return
eject(user)
+1 -1
View File
@@ -110,7 +110,7 @@
go_rabid()
return
if(!(src in list(master.l_hand, master.r_hand)))
if(!master.is_holding(src))
go_rabid()
return
+2 -2
View File
@@ -46,7 +46,7 @@
. = ..()
var/mob/living/carbon/human/M = hit_atom
if(ishuman(hit_atom) && (M.wear_suit?.type in suit_types))
if(M.r_hand == src || M.l_hand == src)
if(M.is_holding(src))
return
playsound(src, 'sound/items/dodgeball.ogg', 50, 1)
M.KnockDown(6 SECONDS)
@@ -86,7 +86,7 @@
return
/obj/structure/holohoop/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
if(isitem(AM) && !istype(AM, /obj/item/projectile))
if(isitem(AM) && !isprojectile(AM))
if(prob(50) || HAS_TRAIT(throwingdatum.thrower, TRAIT_BADASS))
AM.forceMove(get_turf(src))
visible_message("<span class='notice'>Swish! [AM] lands in [src].</span>")
@@ -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)