Skip to content

Commit

Permalink
[MIRROR] [No GBP] Slime people will not be eaten be slimes (#2583)
Browse files Browse the repository at this point in the history
* [No GBP] Slime people will not be eaten be slimes (#83340)

## About The Pull Request

This PR readds a missing faction check that got lost during basic mob
conversion. Partially at least, previous, it ensured that
FACTION_NEUTRAL was a one way faction, protecting slimes from other
things, while keeping all the other factions via a check that fully
reimplemented `faction_check` in a less efficient way. Rather then
reimplementing this behaviour, I have just made them check for the
FACTION_SLIME, similarly how regal rats skip converting already
converted frogs and cockroaches.

So in short, slimes once again will not attack slime people, but
everything else is fair game once they get hungry (except for people who
are in their friend list).

I am not fully happy with this solution, but I would rather not make a
new list by subtracting FACTION_NEUTRAL every time they check someone.

## Why It's Good For The Game

One of the unique features of slime people was that slimes consider them
friends and family. This PR brings this back this feature I forgot to
reimplement.

Fixes #83324

## Changelog

:cl:
fix: Slimes will no longer consider feeding upon slime people
/:cl:

* [No GBP] Slime people will not be eaten be slimes

---------

Co-authored-by: Profakos <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed May 20, 2024
1 parent 87c2e72 commit 4882c45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/modules/mob/living/basic/slime/ai/behaviours.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
if(REF(dinner) in hunter.faction) //Don't eat our friends...
return

var/static/list/slime_faction = list(FACTION_SLIME)
if(faction_check(slime_faction, dinner.faction)) //Don't try to eat slimy things, no matter how hungry we are. Anyone else can be betrayed.
return

if(!hunter.can_feed_on(dinner, check_adjacent = FALSE)) //Are they tasty to slimes?
return

Expand Down

0 comments on commit 4882c45

Please sign in to comment.