Basic mobs core implementation and cow migration. (#28667)

* Basic mobs core implementation and cow migration.

* fix whitespace

* uncomfortable fix for null weirdness

* update updatepaths script number

* lewc review 1

* fix delta

* Update code/datums/ai/basic_mobs/basic_ai_behaviors/tipped_reaction.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: warriorstar-orion <orion@snowfrost.garden>

---------

Signed-off-by: warriorstar-orion <orion@snowfrost.garden>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
warriorstar-orion
2025-04-05 11:35:42 +00:00
committed by GitHub
co-authored by Luc
parent b012f18d9a
commit c820499f90
80 changed files with 1493 additions and 272 deletions
+3 -5
View File
@@ -99,8 +99,6 @@
var/player_spiders = FALSE
var/list/faction = list("spiders")
var/selecting_player = 0
///Is this spiderling created from a xenobiology mob?
var/xenobiology_spawned = FALSE
/obj/structure/spider/spiderling/Initialize(mapload)
. = ..()
@@ -181,7 +179,7 @@
if(isturf(loc))
amount_grown += rand(0,2)
if(amount_grown >= 100)
if(SSmobs.xenobiology_mobs > MAX_GOLD_CORE_MOBS && xenobiology_spawned)
if(SSmobs.xenobiology_mobs > MAX_GOLD_CORE_MOBS && HAS_TRAIT(src, TRAIT_XENOBIO_SPAWNED))
qdel(src)
return
if(!grow_as)
@@ -189,8 +187,8 @@
var/mob/living/simple_animal/hostile/poison/giant_spider/S = new grow_as(loc)
S.faction = faction.Copy()
S.master_commander = master_commander
S.xenobiology_spawned = xenobiology_spawned
if(xenobiology_spawned)
if(HAS_TRAIT(src, TRAIT_XENOBIO_SPAWNED))
ADD_TRAIT(S, TRAIT_XENOBIO_SPAWNED, "xenobio")
SSmobs.xenobiology_mobs++
if(player_spiders && !selecting_player)
selecting_player = 1
@@ -71,7 +71,7 @@
var/mob/living/carbon/human/H = loc
if(H.l_ear == src || H.r_ear == src)
return ..()
else if(isanimal(loc) || is_ai(loc))
else if(isanimal_or_basicmob(loc) || is_ai(loc))
return ..()
return FALSE
+1 -1
View File
@@ -199,7 +199,7 @@ SLIME SCANNER
if(HAS_TRAIT(user, TRAIT_MED_MACHINE_HALLUCINATING) && prob(10) && IS_HORIZONTAL(M))
probably_dead = TRUE
if(issimple_animal(M))
if(isanimal_or_basicmob(M))
// No box here, keep it simple.
if(probably_dead)
to_chat(user, "<span class='notice'>Analyzing Results for [M]:\nOverall Status: <font color='red'>Dead</font></span>")
@@ -74,8 +74,8 @@
// This is required to ensure that the forceMove checks on some objects don't rip the gripper out of the borg's inventory and toss it on the floor. That would hurt, a lot!
/obj/item/gripper/forceMove(atom/destination)
return
/obj/item/gripper/interact_with_atom(atom/target, mob/living/user, list/modifiers)
/obj/item/gripper/interact_with_atom(atom/target, mob/living/user, list/modifiers)
if(!target)
return ITEM_INTERACT_COMPLETE
@@ -170,7 +170,7 @@
if(gripped_item)
gripped_item.attack(A, user)
return TRUE
if(!ismob(A))
return ..()
@@ -208,7 +208,7 @@
return
// Checks if holder_type exists to prevent picking up animals like mice, because we're about to use the hands that borgs secretly have.
if(isanimal(target) && !target.holder_type)
if(isanimal_or_basicmob(target) && !target.holder_type)
var/list/modifiers = params2list(params)
// This enables borgs to get the floating heart icon and mob emote from simple_animals that have petbonus == TRUE.
target.attack_hand(user, modifiers)
@@ -23,7 +23,7 @@
to_chat(user, "<span class='warning'>You don't have enough energy to dispense more [singular_name]\s!</span>")
return TRUE
if(!iscarbon(M) && !isanimal(M))
if(!iscarbon(M) && !isanimal_or_basicmob(M))
to_chat(user, "<span class='danger'>[src] cannot be applied to [M]!</span>")
return TRUE
@@ -53,8 +53,8 @@
return TRUE
return
if(isanimal(M))
var/mob/living/simple_animal/critter = M
if(isanimal_or_basicmob(M))
var/mob/living/critter = M
if(!(critter.healable))
to_chat(user, "<span class='notice'>You cannot use [src] on [critter]!</span>")
return
+1 -1
View File
@@ -108,7 +108,7 @@
if(!armed || !isturf(loc) || !istype(entered))
return
if((iscarbon(entered) || isanimal(entered)) && !HAS_TRAIT(entered, TRAIT_FLYING))
if((iscarbon(entered) || isanimal_or_basicmob(entered)) && !HAS_TRAIT(entered, TRAIT_FLYING))
spring_trap(entered)
if(ishuman(entered))
@@ -31,7 +31,7 @@
depotarea.armory_locker_looted()
/obj/structure/closet/secure_closet/depot/attack_animal(mob/M)
if(isanimal(M) && ("syndicate" in M.faction))
if(isanimal_or_basicmob(M) && ("syndicate" in M.faction))
to_chat(M, "<span class='warning'>[src] resists your attack!</span>")
return
return ..()
@@ -47,7 +47,7 @@
/obj/structure/closet/critter/random/populate_contents()
content_mob = pick(/mob/living/simple_animal/pet/dog/corgi,
/mob/living/simple_animal/pet/dog/corgi/lisa,
/mob/living/simple_animal/cow,
/mob/living/basic/cow,
/mob/living/simple_animal/pig,
/mob/living/simple_animal/hostile/retaliate/goat,
/mob/living/simple_animal/turkey,
@@ -68,7 +68,7 @@
/obj/structure/closet/critter/cow
name = "cow crate"
content_mob = /mob/living/simple_animal/cow
content_mob = /mob/living/basic/cow
/obj/structure/closet/critter/pig
name = "pig crate"
@@ -75,7 +75,7 @@
/obj/structure/largecrate/cow/crowbar_act(mob/living/user, obj/item/I)
if(!I.use_tool(src, user, I.tool_volume))
return
new /mob/living/simple_animal/cow(loc)
new /mob/living/basic/cow(loc)
return ..()
/obj/structure/largecrate/goat
@@ -89,7 +89,7 @@
/obj/structure/kitchenspike/MouseDrop_T(mob/living/victim, mob/living/user)
if(!user.Adjacent(src) || !user.Adjacent(victim) || is_ai(user) || !ismob(victim))
return
if(isanimal(user) && victim != user)
if(isanimal_or_basicmob(user) && victim != user)
return // animals cannot put mobs other than themselves onto spikes
add_fingerprint(user)
INVOKE_ASYNC(src, TYPE_PROC_REF(/obj/structure/kitchenspike, start_spike), victim, user)
+1 -1
View File
@@ -360,7 +360,7 @@
/obj/structure/table/proc/get_flip_speed(mob/living/flipper)
if(!istype(flipper))
return 0 SECONDS // sure
if(!issimple_animal(flipper))
if(!isanimal_or_basicmob(flipper))
return 0 SECONDS
if(istype(flipper, /mob/living/simple_animal/revenant))
return 0 SECONDS // funny ghost table