mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +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
|
change attack_robot() above to the proper function
|
||||||
*/
|
*/
|
||||||
/mob/living/silicon/robot/UnarmedAttack(atom/A)
|
/mob/living/silicon/robot/UnarmedAttack(atom/A)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
A.attack_robot(src)
|
A.attack_robot(src)
|
||||||
|
|
||||||
/mob/living/silicon/robot/RangedAttack(atom/A)
|
/mob/living/silicon/robot/RangedAttack(atom/A)
|
||||||
A.attack_robot(src)
|
A.attack_robot(src)
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,8 @@
|
|||||||
Animals & All Unspecified
|
Animals & All Unspecified
|
||||||
*/
|
*/
|
||||||
/mob/living/UnarmedAttack(atom/A)
|
/mob/living/UnarmedAttack(atom/A)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
A.attack_animal(src)
|
A.attack_animal(src)
|
||||||
|
|
||||||
/atom/proc/attack_animal(mob/user)
|
/atom/proc/attack_animal(mob/user)
|
||||||
@@ -158,6 +160,8 @@
|
|||||||
|
|
||||||
// Babby aliens
|
// Babby aliens
|
||||||
/mob/living/carbon/alien/larva/UnarmedAttack(atom/A)
|
/mob/living/carbon/alien/larva/UnarmedAttack(atom/A)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
A.attack_larva(src)
|
A.attack_larva(src)
|
||||||
|
|
||||||
/atom/proc/attack_larva(mob/user)
|
/atom/proc/attack_larva(mob/user)
|
||||||
@@ -169,6 +173,8 @@
|
|||||||
Nothing happening here
|
Nothing happening here
|
||||||
*/
|
*/
|
||||||
/mob/living/simple_animal/slime/UnarmedAttack(atom/A)
|
/mob/living/simple_animal/slime/UnarmedAttack(atom/A)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
if(isturf(A))
|
if(isturf(A))
|
||||||
return ..()
|
return ..()
|
||||||
A.attack_slime(src)
|
A.attack_slime(src)
|
||||||
@@ -181,6 +187,8 @@
|
|||||||
Drones
|
Drones
|
||||||
*/
|
*/
|
||||||
/mob/living/simple_animal/drone/UnarmedAttack(atom/A)
|
/mob/living/simple_animal/drone/UnarmedAttack(atom/A)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
A.attack_drone(src)
|
A.attack_drone(src)
|
||||||
|
|
||||||
/atom/proc/attack_drone(mob/living/simple_animal/drone/user)
|
/atom/proc/attack_drone(mob/living/simple_animal/drone/user)
|
||||||
@@ -208,6 +216,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/mob/living/simple_animal/UnarmedAttack(atom/A, proximity)
|
/mob/living/simple_animal/UnarmedAttack(atom/A, proximity)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
if(!dextrous)
|
if(!dextrous)
|
||||||
return ..()
|
return ..()
|
||||||
if(!ismob(A))
|
if(!ismob(A))
|
||||||
@@ -220,6 +230,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
/mob/living/simple_animal/hostile/UnarmedAttack(atom/A)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
target = A
|
target = A
|
||||||
if(dextrous && !ismob(A))
|
if(dextrous && !ismob(A))
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -127,6 +127,8 @@
|
|||||||
log_combat(src, victim, "slaughter slammed")
|
log_combat(src, victim, "slaughter slammed")
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/imp/slaughter/UnarmedAttack(atom/A, proximity)
|
/mob/living/simple_animal/hostile/imp/slaughter/UnarmedAttack(atom/A, proximity)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
if(iscarbon(A))
|
if(iscarbon(A))
|
||||||
var/mob/living/carbon/target = A
|
var/mob/living/carbon/target = A
|
||||||
if(target.stat != DEAD && target.mind && current_hitstreak < wound_bonus_hitstreak_max)
|
if(target.stat != DEAD && target.mind && current_hitstreak < wound_bonus_hitstreak_max)
|
||||||
|
|||||||
@@ -312,6 +312,8 @@
|
|||||||
target_types = typecacheof(target_types)
|
target_types = typecacheof(target_types)
|
||||||
|
|
||||||
/mob/living/simple_animal/bot/cleanbot/UnarmedAttack(atom/A)
|
/mob/living/simple_animal/bot/cleanbot/UnarmedAttack(atom/A)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
if(ismopable(A))
|
if(ismopable(A))
|
||||||
icon_state = "cleanbot-c"
|
icon_state = "cleanbot-c"
|
||||||
mode = BOT_CLEANING
|
mode = BOT_CLEANING
|
||||||
|
|||||||
@@ -61,6 +61,8 @@
|
|||||||
/mob/living/simple_animal/bot/firebot/UnarmedAttack(atom/A)
|
/mob/living/simple_animal/bot/firebot/UnarmedAttack(atom/A)
|
||||||
if(!on)
|
if(!on)
|
||||||
return
|
return
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
if(internal_ext)
|
if(internal_ext)
|
||||||
internal_ext.afterattack(A, src)
|
internal_ext.afterattack(A, src)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -392,6 +392,8 @@
|
|||||||
req_one_access = list(ACCESS_CONSTRUCTION, ACCESS_ROBOTICS)
|
req_one_access = list(ACCESS_CONSTRUCTION, ACCESS_ROBOTICS)
|
||||||
|
|
||||||
/mob/living/simple_animal/bot/floorbot/UnarmedAttack(atom/A)
|
/mob/living/simple_animal/bot/floorbot/UnarmedAttack(atom/A)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
if(isturf(A))
|
if(isturf(A))
|
||||||
repair(A)
|
repair(A)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -143,6 +143,8 @@ Maintenance panel panel is [open ? "opened" : "closed"]"},
|
|||||||
/mob/living/simple_animal/bot/honkbot/UnarmedAttack(atom/A)
|
/mob/living/simple_animal/bot/honkbot/UnarmedAttack(atom/A)
|
||||||
if(!on)
|
if(!on)
|
||||||
return
|
return
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
if(iscarbon(A))
|
if(iscarbon(A))
|
||||||
var/mob/living/carbon/C = A
|
var/mob/living/carbon/C = A
|
||||||
if (emagged <= 1)
|
if (emagged <= 1)
|
||||||
|
|||||||
@@ -475,6 +475,8 @@
|
|||||||
..()
|
..()
|
||||||
|
|
||||||
/mob/living/simple_animal/bot/medbot/UnarmedAttack(atom/A)
|
/mob/living/simple_animal/bot/medbot/UnarmedAttack(atom/A)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
if(iscarbon(A) && !tending)
|
if(iscarbon(A) && !tending)
|
||||||
var/mob/living/carbon/C = A
|
var/mob/living/carbon/C = A
|
||||||
patient = C
|
patient = C
|
||||||
|
|||||||
@@ -810,6 +810,8 @@
|
|||||||
unload()
|
unload()
|
||||||
|
|
||||||
/mob/living/simple_animal/bot/mulebot/UnarmedAttack(atom/A)
|
/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)
|
if(isturf(A) && isturf(loc) && loc.Adjacent(A) && load)
|
||||||
unload(get_dir(loc, A))
|
unload(get_dir(loc, A))
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -243,6 +243,8 @@ Auto Patrol: []"},
|
|||||||
/mob/living/simple_animal/bot/secbot/UnarmedAttack(atom/A)
|
/mob/living/simple_animal/bot/secbot/UnarmedAttack(atom/A)
|
||||||
if(!on)
|
if(!on)
|
||||||
return
|
return
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
if(iscarbon(A))
|
if(iscarbon(A))
|
||||||
var/mob/living/carbon/C = A
|
var/mob/living/carbon/C = A
|
||||||
if(!C.IsParalyzed() || arrest_type)
|
if(!C.IsParalyzed() || arrest_type)
|
||||||
|
|||||||
@@ -109,6 +109,8 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/mob/living/simple_animal/mouse/UnarmedAttack(atom/A, proximity)
|
/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(istype(A, /obj/item/food/cheesewedge) && canUseTopic(A, BE_CLOSE, NO_DEXTERITY))
|
||||||
if(health == maxHealth)
|
if(health == maxHealth)
|
||||||
|
|||||||
@@ -50,6 +50,8 @@
|
|||||||
eat_atom(attacked_target)
|
eat_atom(attacked_target)
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/ooze/UnarmedAttack(atom/A)
|
/mob/living/simple_animal/hostile/ooze/UnarmedAttack(atom/A)
|
||||||
|
if(HAS_TRAIT(src, TRAIT_HANDS_BLOCKED))
|
||||||
|
return
|
||||||
if(!check_edible(A))
|
if(!check_edible(A))
|
||||||
return ..()
|
return ..()
|
||||||
eat_atom(A)
|
eat_atom(A)
|
||||||
|
|||||||
Reference in New Issue
Block a user