mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 02:01:22 +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))
|
||||
..()
|
||||
|
||||
@@ -127,6 +127,8 @@
|
||||
log_combat(src, victim, "slaughter slammed")
|
||||
|
||||
/mob/living/simple_animal/hostile/imp/slaughter/UnarmedAttack(atom/A, proximity)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(iscarbon(A))
|
||||
var/mob/living/carbon/target = A
|
||||
if(target.stat != DEAD && target.mind && current_hitstreak < wound_bonus_hitstreak_max)
|
||||
|
||||
@@ -312,6 +312,8 @@
|
||||
target_types = typecacheof(target_types)
|
||||
|
||||
/mob/living/simple_animal/bot/cleanbot/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(ismopable(A))
|
||||
icon_state = "cleanbot-c"
|
||||
mode = BOT_CLEANING
|
||||
|
||||
@@ -61,6 +61,8 @@
|
||||
/mob/living/simple_animal/bot/firebot/UnarmedAttack(atom/A)
|
||||
if(!on)
|
||||
return
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(internal_ext)
|
||||
internal_ext.afterattack(A, src)
|
||||
else
|
||||
|
||||
@@ -392,6 +392,8 @@
|
||||
req_one_access = list(ACCESS_CONSTRUCTION, ACCESS_ROBOTICS)
|
||||
|
||||
/mob/living/simple_animal/bot/floorbot/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(isturf(A))
|
||||
repair(A)
|
||||
else
|
||||
|
||||
@@ -143,6 +143,8 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
|
||||
/mob/living/simple_animal/bot/honkbot/UnarmedAttack(atom/A)
|
||||
if(!on)
|
||||
return
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(iscarbon(A))
|
||||
var/mob/living/carbon/C = A
|
||||
if (emagged <= 1)
|
||||
|
||||
@@ -475,6 +475,8 @@
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(iscarbon(A) && !tending)
|
||||
var/mob/living/carbon/C = A
|
||||
patient = C
|
||||
|
||||
@@ -810,6 +810,8 @@
|
||||
unload()
|
||||
|
||||
/mob/living/simple_animal/bot/mulebot/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(isturf(A) && isturf(loc) && loc.Adjacent(A) && load)
|
||||
unload(get_dir(loc, A))
|
||||
else
|
||||
|
||||
@@ -243,6 +243,8 @@ Auto Patrol: []"},
|
||||
/mob/living/simple_animal/bot/secbot/UnarmedAttack(atom/A)
|
||||
if(!on)
|
||||
return
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(iscarbon(A))
|
||||
var/mob/living/carbon/C = A
|
||||
if(!C.IsParalyzed() || arrest_type)
|
||||
|
||||
@@ -109,6 +109,8 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/mouse/UnarmedAttack(atom/A, proximity)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
. = ..()
|
||||
if(istype(A, /obj/item/food/cheesewedge) && canUseTopic(A, BE_CLOSE, NO_DEXTERITY))
|
||||
if(health == maxHealth)
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
eat_atom(attacked_target)
|
||||
|
||||
/mob/living/simple_animal/hostile/ooze/UnarmedAttack(atom/A)
|
||||
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if(!check_edible(A))
|
||||
return ..()
|
||||
eat_atom(A)
|
||||
|
||||
Reference in New Issue
Block a user