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/carbon/human/species_types.dm b/code/modules/mob/living/carbon/human/species_types.dm
index 2f6ba8c8448..f85a5bc340d 100644
--- a/code/modules/mob/living/carbon/human/species_types.dm
+++ b/code/modules/mob/living/carbon/human/species_types.dm
@@ -262,7 +262,7 @@ datum/species/human/spec_death(gibbed, mob/living/carbon/human/H)
/datum/action/innate/split_body
name = "Split Body"
check_flags = AB_CHECK_ALIVE
- button_icon_state = "split"
+ button_icon_state = "slimesplit"
background_icon_state = "bg_alien"
/datum/action/innate/split_body/CheckRemoval()
diff --git a/code/modules/mob/living/simple_animal/slime/death.dm b/code/modules/mob/living/simple_animal/slime/death.dm
index fe93264aca9..31542c8051c 100644
--- a/code/modules/mob/living/simple_animal/slime/death.dm
+++ b/code/modules/mob/living/simple_animal/slime/death.dm
@@ -9,6 +9,8 @@
M.regenerate_icons()
is_adult = 0
maxHealth = 150
+ var/datum/action/innate/slime/evolve/E = new
+ E.Grant(src)
revive()
regenerate_icons()
number = rand(1, 1000)
@@ -39,4 +41,4 @@
for(var/obj/machinery/computer/camera_advanced/xenobio/X in machines)
if(src in X.stored_slimes)
X.stored_slimes -= src
- return ..()
\ No newline at end of file
+ return ..()
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 bc64b2168c2..286b63ad9d1 100644
--- a/code/modules/mob/living/simple_animal/slime/powers.dm
+++ b/code/modules/mob/living/simple_animal/slime/powers.dm
@@ -1,3 +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."
@@ -16,6 +49,15 @@
Feedon(M)
return 1
+/datum/action/innate/slime/feed
+ name = "Feed"
+ button_icon_state = "slimeeat"
+
+
+/datum/action/innate/slime/feed/Activate()
+ var/mob/living/simple_animal/slime/S = owner
+ S.Feed()
+
/mob/living/simple_animal/slime/proc/CanFeedon(mob/living/M)
if(!Adjacent(M))
return 0
@@ -68,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
@@ -79,6 +121,19 @@
else
src << "I have already evolved..."
+/datum/action/innate/slime/evolve
+ name = "Evolve"
+ button_icon_state = "slimegrow"
+ adult_action = BABIES_ONLY
+ needs_growth = GROWTH_NEEDED
+
+/datum/action/innate/slime/evolve/Activate()
+ var/mob/living/simple_animal/slime/S = owner
+ S.Evolve()
+ if(S.is_adult)
+ var/datum/action/innate/slime/reproduce/A = new
+ A.Grant(S)
+
/mob/living/simple_animal/slime/verb/Reproduce()
set category = "Slime"
set desc = "This will make you split into four Slimes."
@@ -88,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
@@ -123,4 +178,14 @@
else
src << "I am not ready to reproduce yet..."
else
- src << "I am not old enough to reproduce yet..."
\ No newline at end of file
+ src << "I am not old enough to reproduce yet..."
+
+/datum/action/innate/slime/reproduce
+ name = "Reproduce"
+ button_icon_state = "slimesplit"
+ adult_action = ADULTS_ONLY
+ needs_growth = GROWTH_NEEDED
+
+/datum/action/innate/slime/reproduce/Activate()
+ var/mob/living/simple_animal/slime/S = owner
+ S.Reproduce()
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index a9d13772d0b..02b052d8263 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -70,9 +70,16 @@
var/list/slime_mutation[4]
/mob/living/simple_animal/slime/New()
+ var/datum/action/innate/slime/feed/F = new
+ F.Grant(src)
if(is_adult)
+ var/datum/action/innate/slime/reproduce/R = new
+ R.Grant(src)
health = 200
maxHealth = 200
+ else
+ var/datum/action/innate/slime/evolve/E = new
+ E.Grant(src)
create_reagents(100)
spawn (0)
number = rand(1, 1000)
@@ -149,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
diff --git a/icons/mob/actions.dmi b/icons/mob/actions.dmi
index 57f3f6ce40b..08410947b16 100644
Binary files a/icons/mob/actions.dmi and b/icons/mob/actions.dmi differ