mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Adds Slime overcrowding because my byond client died once when flying over xenobio (#88935)
## About The Pull Request Basically if there's too many slimes on a single turf, the slime will not split. The define I set is 2 (which can change) so you can still reasonably spam a few monkeys inside a 3x3 cell and expect the slimes to split. Overcrowding isn't really meant to stop people from doing xenobio like this, it's to stop instances where people add way too many monkeys and in 30 minutes everyone's clients turn into a powerpoint when entering xenobiology. Basically to prevent this from happening. ``` ADMIN LOG: '(thesharkenning)'/(white wolf) deleted all instances of type or subtype of /mob/living/basic/slime (979 instances deleted) ADMIN LOG: '(thesharkenning)'/(white wolf) deleted all instances of type or subtype of /mob/living/basic/slime (641 instances deleted) ADMIN LOG: '(thesharkenning)'/(white wolf) deleted all instances of type or subtype of /mob/living/basic/slime (962 instances deleted) ``` ## Why It's Good For The Game I'm sure it's hell on the server too, but it's definitely something that makes byond cry. You don't need a whole lot of time: just a lot of monkeys and a single slime. ## Changelog 🆑 fix: Fixes uncapped xenobio slime multiplication which can easily result in hundreds of slimes. /🆑
This commit is contained in:
@@ -77,6 +77,7 @@
|
||||
|
||||
///Splits the slime into multiple children if possible
|
||||
/mob/living/basic/slime/proc/reproduce()
|
||||
|
||||
if(stat != CONSCIOUS)
|
||||
balloon_alert(src, "not conscious!")
|
||||
return
|
||||
@@ -92,6 +93,19 @@
|
||||
balloon_alert(src, "need growth!")
|
||||
return
|
||||
|
||||
var/list/friends_list = list()
|
||||
for(var/mob/living/basic/slime/friend in loc)
|
||||
if(QDELETED(friend))
|
||||
continue
|
||||
if(friend == src)
|
||||
continue
|
||||
friends_list += friend
|
||||
|
||||
overcrowded = length(friends_list) >= SLIME_OVERCROWD_AMOUNT
|
||||
if(overcrowded)
|
||||
balloon_alert(src, "overcrowded!")
|
||||
return
|
||||
|
||||
var/list/babies = list()
|
||||
var/new_nutrition = round(nutrition * 0.9)
|
||||
var/new_powerlevel = round(powerlevel / 4)
|
||||
|
||||
@@ -66,6 +66,9 @@
|
||||
///Our slime's current mood
|
||||
var/current_mood = SLIME_MOOD_NONE
|
||||
|
||||
///If the slime is currently overcrowded and unable to reproduce.
|
||||
var/overcrowded = FALSE
|
||||
|
||||
///The number of /obj/item/slime_extract's the slime has left inside
|
||||
var/cores = 1
|
||||
///Chance of mutating, should be between 25 and 35
|
||||
@@ -243,6 +246,8 @@
|
||||
|
||||
if(SLIME_MAX_POWER)
|
||||
. += span_boldwarning("It is radiating with massive levels of electrical activity!")
|
||||
if(overcrowded)
|
||||
. += span_warning("It seems too overcroweded to properly reproduce!")
|
||||
|
||||
///Changes the slime's current life state
|
||||
/mob/living/basic/slime/proc/set_life_stage(new_life_stage = SLIME_LIFE_STAGE_BABY)
|
||||
|
||||
Reference in New Issue
Block a user