Skip to content

Commit

Permalink
attack_robot()
Browse files Browse the repository at this point in the history
  • Loading branch information
mystery3525 committed Aug 6, 2024
1 parent 332dd3c commit 7af0ed2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
#define COMSIG_ATOM_ATTACK_HAND "atom_attack_hand"
///from base of atom/attack_paw(): (mob/user)
#define COMSIG_ATOM_ATTACK_PAW "atom_attack_paw"
///from base of atom/attack_robot(): (mob/user)
#define COMSIG_ATOM_ATTACK_ROBOT "atom_attack_robot"
5 changes: 3 additions & 2 deletions code/_onclick/cyborg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,6 @@
A.attack_robot(src)

/atom/proc/attack_robot(mob/user)
attack_ai(user)
return
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_ROBOT, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
return TRUE
return FALSE
3 changes: 3 additions & 0 deletions code/game/machinery/_machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,9 @@ Class Procs:
user.visible_message("<span class='danger'>[user] smashes [src] with [user.p_their()] paws[damage ? "." : ", without leaving a mark!"]</span>", null, null, COMBAT_MESSAGE_RANGE)

/obj/machinery/attack_robot(mob/user)
. = ..()
if(.)
return
if(!(interaction_flags_machine & INTERACT_MACHINE_ALLOW_SILICON) && !IsAdminGhost(user))
return FALSE
if(Adjacent(user) && can_buckle && has_buckled_mobs()) //so that borgs (but not AIs, sadly (perhaps in a future PR?)) can unbuckle people from machines
Expand Down

0 comments on commit 7af0ed2

Please sign in to comment.