Pest mob has_trait (#19262)

* trait

* ignore this for now...

* text

* many mouse checks are just pest checks

* remove more manually done pronoun code

* Revert "remove more manually done pronoun code"

This reverts commit 3a6401f443.

* user should be passed

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Will
2026-03-09 00:31:33 +01:00
committed by GitHub
co-authored by Kashargul
parent f9da8eb1e2
commit 9fff3bb4f4
24 changed files with 58 additions and 43 deletions
+10 -10
View File
@@ -23,23 +23,23 @@
return ..()
// Core rotation proc, override me to add conditions to object rotations or update_icons/state after!
/atom/movable/proc/handle_rotation_verbs(angle)
if(isobserver(usr))
/atom/movable/proc/handle_rotation_verbs(angle, mob/user)
if(isobserver(user))
if(!ghosts_can_use_rotate_verbs())
return FALSE
else
if(usr.incapacitated())
if(user.incapacitated())
return FALSE
if(ismouse(usr))
to_chat(usr, span_notice("You are too tiny to do that!"))
if(HAS_TRAIT(user, TRAIT_AMBIENT_PEST_MOB))
to_chat(user, span_notice("You are too tiny to do that!"))
return FALSE
if(anchored && !can_use_rotate_verbs_while_anchored())
to_chat(usr, span_notice("It is fastened to the floor!"))
to_chat(user, span_notice("It is fastened to the floor!"))
return FALSE
set_dir(turn(dir, angle))
to_chat(usr, span_notice("You rotate \the [src] to face [dir2text(dir)]!"))
to_chat(user, span_notice("You rotate \the [src] to face [dir2text(dir)]!"))
return TRUE
// Overrides for customization
@@ -55,18 +55,18 @@
set name = "Rotate Clockwise"
set category = "Object"
set src in view(1)
return handle_rotation_verbs(270)
return handle_rotation_verbs(270, usr)
/atom/movable/proc/rotate_counterclockwise()
SHOULD_NOT_OVERRIDE(TRUE)
set name = "Rotate Counter Clockwise"
set category = "Object"
set src in view(1)
return handle_rotation_verbs(90)
return handle_rotation_verbs(90, usr)
/atom/movable/proc/turn_around()
SHOULD_NOT_OVERRIDE(TRUE)
set name = "Turn Around"
set category = "Object"
set src in view(1)
return handle_rotation_verbs(180)
return handle_rotation_verbs(180, usr)