mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 05:27:39 +01:00
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:
@@ -103,7 +103,7 @@
|
||||
return
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if(ismouse(usr) || (isobserver(usr)))
|
||||
if(HAS_TRAIT(usr, TRAIT_AMBIENT_PEST_MOB) || (isobserver(usr)))
|
||||
return
|
||||
|
||||
if(busy)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if (!can_touch(usr) || ismouse(usr))
|
||||
|
||||
if (!can_touch(usr) || HAS_TRAIT(usr, TRAIT_AMBIENT_PEST_MOB))
|
||||
return
|
||||
|
||||
if(flipped < 0 || !flip(get_cardinal_dir(usr,src)))
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
set category = "Vehicle"
|
||||
set src in view(0)
|
||||
|
||||
if(!isliving(usr) || ismouse(usr))
|
||||
if(!isliving(usr) || HAS_TRAIT(usr, TRAIT_AMBIENT_PEST_MOB))
|
||||
return
|
||||
|
||||
if(usr.incapacitated()) return
|
||||
@@ -89,7 +89,7 @@
|
||||
set category = "Vehicle"
|
||||
set src in view(0)
|
||||
|
||||
if(!isliving(usr) || ismouse(usr))
|
||||
if(!isliving(usr) || HAS_TRAIT(usr, TRAIT_AMBIENT_PEST_MOB))
|
||||
return
|
||||
|
||||
if(usr.incapacitated()) return
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
/obj/structure/smoletrack/attack_hand(mob/user)
|
||||
if(user.a_intent == I_DISARM)
|
||||
if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
if(HAS_TRAIT(user, TRAIT_AMBIENT_PEST_MOB) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
return
|
||||
to_chat(user, span_notice("[src] was dismantaled into bricks."))
|
||||
playsound(src, 'sound/items/smolesmallbuild.ogg', 50, 1, -1, volume_channel = VOLUME_CHANNEL_MASTER)
|
||||
@@ -136,7 +136,7 @@
|
||||
set name = "Use Color Pieces"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
if(HAS_TRAIT(usr, TRAIT_AMBIENT_PEST_MOB) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
return
|
||||
var/new_color = tgui_color_picker(usr, "Please select color.", "Paint Color", color)
|
||||
color = new_color
|
||||
@@ -148,7 +148,7 @@
|
||||
set name = "Take Road Apart"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
if(HAS_TRAIT(usr, TRAIT_AMBIENT_PEST_MOB) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
return
|
||||
playsound(src, 'sound/items/smolesmallbuild.ogg', 50, 1, -1, volume_channel = VOLUME_CHANNEL_MASTER)
|
||||
var/turf/simulated/floor/F = get_turf(src)
|
||||
@@ -202,7 +202,7 @@
|
||||
//makes it so buildings can be dismaintaled or GodZilla style attacked
|
||||
/obj/structure/smolebuilding/attack_hand(mob/user)
|
||||
if(user.a_intent == I_DISARM)
|
||||
if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
if(HAS_TRAIT(user, TRAIT_AMBIENT_PEST_MOB) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
return
|
||||
to_chat(user, span_notice("[src] was dismantaled into bricks."))
|
||||
playsound(src, 'sound/items/smolesmallbuild.ogg', 50, 1, -1, volume_channel = VOLUME_CHANNEL_MASTER)
|
||||
@@ -213,7 +213,7 @@
|
||||
|
||||
else if (user.a_intent == I_HURT)
|
||||
|
||||
if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
if(HAS_TRAIT(user, TRAIT_AMBIENT_PEST_MOB) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
return
|
||||
|
||||
take_damage()
|
||||
@@ -265,7 +265,7 @@
|
||||
//get material from ruins
|
||||
/obj/structure/smoleruins/attack_hand(mob/user)
|
||||
if(user.a_intent == I_DISARM)
|
||||
if(ismouse(user) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
if(HAS_TRAIT(user, TRAIT_AMBIENT_PEST_MOB) || (isobserver(user) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
return
|
||||
to_chat(user, span_notice("[src] was dismantaled into bricks."))
|
||||
playsound(src, 'sound/items/smolelargeunbuild.ogg', 50, 1, volume_channel = VOLUME_CHANNEL_MASTER)
|
||||
@@ -296,7 +296,7 @@
|
||||
set name = "Use Color Pieces"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
if(HAS_TRAIT(usr, TRAIT_AMBIENT_PEST_MOB) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
return
|
||||
var/new_color = tgui_color_picker(usr, "Please select color.", "Paint Color", color)
|
||||
color = new_color
|
||||
@@ -307,7 +307,7 @@
|
||||
set name = "Take Building Apart"
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
if(ismouse(usr) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
if(HAS_TRAIT(usr, TRAIT_AMBIENT_PEST_MOB) || (isobserver(usr) && !CONFIG_GET(flag/ghost_interaction)))
|
||||
return
|
||||
playsound(src, 'sound/items/smolesmallbuild.ogg', 50, 1, -1, volume_channel = VOLUME_CHANNEL_MASTER)
|
||||
if(!isnull(loc))
|
||||
|
||||
Reference in New Issue
Block a user