mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
jumps through hoops to save two lines
adds slime growth as a define
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>I must be conscious to do this...</i>"
|
||||
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>I must be conscious to do this...</i>"
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user