diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index fab1bae9525..a6ad2311974 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -163,6 +163,9 @@
#define MOB_SIZE_HUMAN 2
#define MOB_SIZE_LARGE 3
+//Slime evolution threshold. Controls how fast slimes can split/grow
+#define SLIME_EVOLUTION_THRESHOLD 10
+
//singularity defines
#define STAGE_ONE 1
#define STAGE_TWO 3
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index 268440117f7..32fdb40f65b 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -49,9 +49,9 @@ MASS SPECTROMETER
if(O.level != 1)
continue
-
+
var/mob/living/L = locate() in O
-
+
if(O.invisibility == 101)
O.invisibility = 0
if(L)
@@ -417,4 +417,4 @@ MASS SPECTROMETER
user.show_message("Genetic destability: [T.mutation_chance] % chance of mutation on splitting", 1)
if (T.cores > 1)
user.show_message("Anomalious slime core amount detected", 1)
- user.show_message("Growth progress: [T.amount_grown]/10", 1)
+ user.show_message("Growth progress: [T.amount_grown]/[SLIME_EVOLUTION_THRESHOLD]", 1)
diff --git a/code/modules/mob/living/simple_animal/slime/life.dm b/code/modules/mob/living/simple_animal/slime/life.dm
index f65100a6d64..1774f2e592d 100644
--- a/code/modules/mob/living/simple_animal/slime/life.dm
+++ b/code/modules/mob/living/simple_animal/slime/life.dm
@@ -222,11 +222,11 @@
if(prob(75))
adjustBruteLoss(rand(0,5))
- else if (nutrition >= get_grow_nutrition() && amount_grown < 10)
+ else if (nutrition >= get_grow_nutrition() && amount_grown < SLIME_EVOLUTION_THRESHOLD)
nutrition -= 20
amount_grown++
- if(amount_grown >= 10 && !buckled && !Target && !ckey)
+ if(amount_grown >= SLIME_EVOLUTION_THRESHOLD && !buckled && !Target && !ckey)
if(is_adult)
Reproduce()
else
diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm
index c7862581253..abcaa142356 100644
--- a/code/modules/mob/living/simple_animal/slime/powers.dm
+++ b/code/modules/mob/living/simple_animal/slime/powers.dm
@@ -1,12 +1,36 @@
+#define SIZE_DOESNT_MATTER -1
+#define BABIES_ONLY 0
+#define ADULTS_ONLY 1
+
+#define NO_GROWTH_NEEDED 0
+#define GROWTH_NEEDED 1
+
/datum/action/innate/slime
check_flags = AB_CHECK_ALIVE
background_icon_state = "bg_alien"
+ var/adult_action = SIZE_DOESNT_MATTER
+ var/needs_growth = NO_GROWTH_NEEDED
/datum/action/innate/slime/CheckRemoval()
if(!isslime(owner))
return 1
+ var/mob/living/simple_animal/slime/S = owner
+ if(adult_action != SIZE_DOESNT_MATTER)
+ if(adult_action == ADULTS_ONLY && !S.is_adult)
+ return 1
+ else if(adult_action == BABIES_ONLY && S.is_adult)
+ return 1
return 0
+/datum/action/innate/slime/IsAvailable()
+ if(..())
+ var/mob/living/simple_animal/slime/S = owner
+ if(needs_growth == GROWTH_NEEDED)
+ if(S.amount_grown > SLIME_EVOLUTION_THRESHOLD)
+ return 1
+ return 0
+ return 1
+
/mob/living/simple_animal/slime/verb/Feed()
set category = "Slime"
set desc = "This will let you feed on any valid creature in the surrounding area. This should also be used to halt the feeding process."
@@ -86,7 +110,7 @@
src << "I must be conscious to do this..."
return
if(!is_adult)
- if(amount_grown >= 10)
+ if(amount_grown >= SLIME_EVOLUTION_THRESHOLD)
is_adult = 1
maxHealth = 200
amount_grown = 0
@@ -100,21 +124,8 @@
/datum/action/innate/slime/evolve
name = "Evolve"
button_icon_state = "slimegrow"
-
-/datum/action/innate/slime/evolve/CheckRemoval()
- if(!..())
- var/mob/living/simple_animal/slime/S = owner
- if(S.is_adult)
- return 1
- return 0
- return 1
-
-/datum/action/innate/slime/evolve/IsAvailable()
- if(..())
- var/mob/living/simple_animal/slime/S = owner
- if(S.amount_grown > 10)
- return 1
- return 0
+ adult_action = BABIES_ONLY
+ needs_growth = GROWTH_NEEDED
/datum/action/innate/slime/evolve/Activate()
var/mob/living/simple_animal/slime/S = owner
@@ -132,7 +143,7 @@
return
if(is_adult)
- if(amount_grown >= 10)
+ if(amount_grown >= SLIME_EVOLUTION_THRESHOLD)
if(stat)
src << "I must be conscious to do this..."
return
@@ -172,21 +183,8 @@
/datum/action/innate/slime/reproduce
name = "Reproduce"
button_icon_state = "slimesplit"
-
-/datum/action/innate/slime/reproduce/CheckRemoval()
- if(!..())
- var/mob/living/simple_animal/slime/S = owner
- if(!S.is_adult)
- return 1
- return 0
- return 1
-
-/datum/action/innate/slime/reproduce/IsAvailable()
- if(..())
- var/mob/living/simple_animal/slime/S = owner
- if(S.amount_grown > 10)
- return 1
- return 0
+ adult_action = ADULTS_ONLY
+ needs_growth = GROWTH_NEEDED
/datum/action/innate/slime/reproduce/Activate()
var/mob/living/simple_animal/slime/S = owner
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index 61ab08debf0..02b052d8263 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -156,7 +156,7 @@
if(!docile)
stat(null, "Nutrition: [nutrition]/[get_max_nutrition()]")
- if(amount_grown >= 10)
+ if(amount_grown >= SLIME_EVOLUTION_THRESHOLD)
if(is_adult)
stat(null, "You can reproduce!")
else