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
@@ -28,7 +28,7 @@
var/grabbed_something = 0
for(var/mob/M in T)
if(istype(M,/mob/living/simple_mob/animal/passive/lizard) || istype(M,/mob/living/simple_mob/animal/passive/mouse))
if(HAS_TRAIT(M, TRAIT_AMBIENT_PEST_MOB))
src.loc.visible_message(span_danger("[src.loc] sucks [M] into its decompiler. There's a horrible crunching noise."),span_danger("It's a bit of a struggle, but you manage to suck [M] into your decompiler. It makes a series of visceral crunching noises."))
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
qdel(M)
@@ -22,7 +22,7 @@
var/grabbed_something = FALSE
for(var/mob/M in T)
if(istype(M,/mob/living/simple_mob/animal/passive/lizard) || istype(M,/mob/living/simple_mob/animal/passive/mouse))
if(HAS_TRAIT(M, TRAIT_AMBIENT_PEST_MOB))
src.loc.visible_message(span_danger("[src.loc] sucks [M] into its decompiler. There's a horrible crunching noise."),span_danger("It's a bit of a struggle, but you manage to suck [M] into your decompiler. It makes a series of visceral crunching noises."))
new/obj/effect/decal/cleanable/blood/splatter(get_turf(src))
qdel(M)
@@ -43,6 +43,10 @@
var/squish_chance = 25
/mob/living/simple_mob/animal/passive/cockroach/Initialize(mapload)
. = ..()
ADD_TRAIT(src, TRAIT_AMBIENT_PEST_MOB, ROUNDSTART_TRAIT)
//Deletes the body upon death
/mob/living/simple_mob/animal/passive/cockroach/death()
new /obj/effect/decal/cleanable/bug_remains(src.loc)
@@ -44,6 +44,8 @@
else
desc = "A cute, tiny, [body_color] lizard."
ADD_TRAIT(src, TRAIT_AMBIENT_PEST_MOB, ROUNDSTART_TRAIT)
/mob/living/simple_mob/animal/passive/lizard/large
desc = "A cute, big lizard."
maxHealth = 20
@@ -66,6 +66,8 @@
add_verb(src, /mob/living/proc/ventcrawl)
add_verb(src, /mob/living/proc/hide)
ADD_TRAIT(src, TRAIT_AMBIENT_PEST_MOB, ROUNDSTART_TRAIT)
if(!keep_parent_data && name == initial(name))
name = "[name] ([rand(1, 1000)])"
real_name = name
@@ -91,8 +91,8 @@ GLOBAL_LIST_INIT(cat_default_emotes, list(
. = ..()
if(.) // We're pals, but they might be a dirty mouse...
if(ismouse(L))
if(.) // We're pals, but they might be a dirty mouse (or any other small fun to kill pest)...
if(HAS_TRAIT(L, TRAIT_AMBIENT_PEST_MOB))
return FALSE // Cats and mice can never get along.
/mob/living/simple_mob/animal/passive/cat/verb/become_friends()
@@ -102,8 +102,8 @@
. = ..()
if(.) // We're pals, but they might be a dirty mouse...
if(ismouse(L))
if(.) // We're pals, but they might be a dirty mouse (or any other small fun to kill pest)...
if(HAS_TRAIT(L, TRAIT_AMBIENT_PEST_MOB))
return FALSE // Cats and mice can never get along.
/mob/living/simple_mob/animal/passive/fox/renault/verb/become_friends()
@@ -79,6 +79,8 @@
add_verb(src, /mob/living/proc/ventcrawl)
add_verb(src, /mob/living/proc/hide)
ADD_TRAIT(src, TRAIT_AMBIENT_PEST_MOB, ROUNDSTART_TRAIT)
/datum/say_list/frostfly
speak = list("Zzzz.", "Kss.", "Zzt?")
emote_see = list("flutters its wings","looks around", "rubs its mandibles")
@@ -73,6 +73,8 @@
adjust_scale(round(rand(90, 105) / 100))
ADD_TRAIT(src, TRAIT_AMBIENT_PEST_MOB, ROUNDSTART_TRAIT)
/mob/living/simple_mob/animal/sif/glitterfly/rare
name = "sparkling glitterfly"
desc = "A large, incredibly shiny butterfly!"
@@ -112,6 +112,8 @@
add_verb(src, /mob/living/proc/ventcrawl)
add_verb(src, /mob/living/proc/hide)
ADD_TRAIT(src, TRAIT_AMBIENT_PEST_MOB, ROUNDSTART_TRAIT)
/mob/living/simple_mob/animal/sif/leech/get_status_tab_items()
. = ..()
. += "Chemicals: [chemicals]"
@@ -47,9 +47,6 @@
var/static/list/crew_creatures = list( /mob/living/simple_mob/protean_blob,
/mob/living/simple_mob/slime/promethean)
var/static/list/pest_creatures = list( /mob/living/simple_mob/animal/passive/mouse,
/mob/living/simple_mob/animal/passive/lizard,
/mob/living/simple_mob/animal/passive/cockroach)
var/obj/item/vac_attachment/swoopie/Vac
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/Initialize(mapload)
@@ -65,7 +62,7 @@
/mob/living/simple_mob/vore/aggressive/corrupthound/swoopie/IIsAlly(mob/living/L)
. = ..()
if(L?.type in pest_creatures) // If they're a pest, swoop no matter what!
if(L && HAS_TRAIT(L, TRAIT_AMBIENT_PEST_MOB)) // If they're a pest, swoop no matter what!
return FALSE
if(!.) // Outside the faction and not in friends, are they crew
return L?.type in crew_creatures