Merge pull request #8709 from Trilbyspaceclone/Fel_port_1

Ports "Fixes every issue in the slimes milestone. #44450"
This commit is contained in:
deathride58
2019-07-08 18:10:46 -04:00
committed by GitHub
10 changed files with 76 additions and 16 deletions
@@ -5,6 +5,7 @@
default_color = "00FF90"
say_mod = "chirps"
species_traits = list(MUTCOLORS,EYECOLOR,HAIR,FACEHAIR,NOBLOOD)
mutantlungs = /obj/item/organ/lungs/slime
mutant_bodyparts = list("mam_tail", "mam_ears", "mam_snouts", "taur") //CIT CHANGE
default_features = list("mcolor" = "FFF", "mam_tail" = "None", "mam_ears" = "None", "mam_snouts" = "None", "taur" = "None") //CIT CHANGE
inherent_traits = list(TRAIT_TOXINLOVER)
@@ -61,7 +61,7 @@
break
if(Target in view(1,src))
if(issilicon(Target))
if(!CanFeedon(Target)) //If they're not able to be fed upon, ignore them.
if(!Atkcool)
Atkcool = 1
spawn(45)
@@ -600,7 +600,8 @@
phrases += "[M]... friend..."
if (nutrition < get_hunger_nutrition())
phrases += "[M]... feed me..."
say (pick(phrases))
if(!stat)
say (pick(phrases))
/mob/living/simple_animal/slime/proc/get_max_nutrition() // Can't go above it
if (is_adult)
@@ -48,34 +48,58 @@
var/mob/living/simple_animal/slime/S = owner
S.Feed()
/mob/living/simple_animal/slime/proc/CanFeedon(mob/living/M)
/mob/living/simple_animal/slime/proc/CanFeedon(mob/living/M, silent = FALSE)
if(!Adjacent(M))
return 0
return FALSE
if(buckled)
Feedstop()
return 0
return FALSE
if(issilicon(M))
return FALSE
if(isanimal(M))
var/mob/living/simple_animal/S = M
if(S.damage_coeff[TOX] <= 0 && S.damage_coeff[CLONE] <= 0) //The creature wouldn't take any damage, it must be too weird even for us.
if(silent)
return FALSE
to_chat(src, "<span class='warning'>[pick("This subject is incompatible", \
"This subject does not have life energy", "This subject is empty", \
"I am not satisified", "I can not feed from this subject", \
"I do not feel nourished", "This subject is not food")]!</span>")
return FALSE
if(isslime(M))
if(silent)
return FALSE
to_chat(src, "<span class='warning'><i>I can't latch onto another slime...</i></span>")
return 0
return FALSE
if(docile)
if(silent)
return FALSE
to_chat(src, "<span class='notice'><i>I'm not hungry anymore...</i></span>")
return 0
return FALSE
if(stat)
if(silent)
return FALSE
to_chat(src, "<span class='warning'><i>I must be conscious to do this...</i></span>")
return 0
return FALSE
if(M.stat == DEAD)
if(silent)
return FALSE
to_chat(src, "<span class='warning'><i>This subject does not have a strong enough life energy...</i></span>")
return 0
return FALSE
if(locate(/mob/living/simple_animal/slime) in M.buckled_mobs)
if(silent)
return FALSE
to_chat(src, "<span class='warning'><i>Another slime is already feeding on this subject...</i></span>")
return 0
return 1
return FALSE
return TRUE
/mob/living/simple_animal/slime/proc/Feedon(mob/living/M)
M.unbuckle_all_mobs(force=1) //Slimes rip other mobs (eg: shoulder parrots) off (Slimes Vs Slimes is already handled in CanFeedon())