mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
[MIRROR] Generalizes the hands-blocked trait as UnarmedAttack block (#2263)
* Generalizes hands blocked as unarmed attack block (#55579) I suppose for bots there's a certain level of abstraction involved, but it makes sense within the context. There's a pretty bad bug associated with shades here that this fixes. * Generalizes the hands-blocked trait as UnarmedAttack block Co-authored-by: Rohesie <rohesie@gmail.com>
This commit is contained in:
@@ -160,7 +160,10 @@
|
||||
change attack_robot() above to the proper function
|
||||
*/
|
||||
/mob/living/silicon/robot/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
A.attack_robot(src)
|
||||
|
||||
/mob/living/silicon/robot/RangedAttack(atom/A)
|
||||
A.attack_robot(src)
|
||||
|
||||
|
||||
@@ -97,6 +97,8 @@
|
||||
Animals & All Unspecified
|
||||
*/
|
||||
/mob/living/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
A.attack_animal(src)
|
||||
|
||||
/atom/proc/attack_animal(mob/user)
|
||||
@@ -158,6 +160,8 @@
|
||||
|
||||
// Babby aliens
|
||||
/mob/living/carbon/alien/larva/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
A.attack_larva(src)
|
||||
|
||||
/atom/proc/attack_larva(mob/user)
|
||||
@@ -169,6 +173,8 @@
|
||||
Nothing happening here
|
||||
*/
|
||||
/mob/living/simple_animal/slime/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(isturf(A))
|
||||
return ..()
|
||||
A.attack_slime(src)
|
||||
@@ -181,6 +187,8 @@
|
||||
Drones
|
||||
*/
|
||||
/mob/living/simple_animal/drone/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
A.attack_drone(src)
|
||||
|
||||
/atom/proc/attack_drone(mob/living/simple_animal/drone/user)
|
||||
@@ -208,6 +216,8 @@
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/UnarmedAttack(atom/A, proximity)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(!dextrous)
|
||||
return ..()
|
||||
if(!ismob(A))
|
||||
@@ -220,6 +230,8 @@
|
||||
*/
|
||||
|
||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
target = A
|
||||
if(dextrous && !ismob(A))
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user