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
+4
View File
@@ -1,6 +1,10 @@
////////////////////////////////////////////////////////////////////////////////
/// Food.
////////////////////////////////////////////////////////////////////////////////
/// Note: When adding food items with dummy parents, make sure to add
/// the parent to the exclusion list in code/__HELPERS/unsorted.dm's
/// get_random_food proc.
////////////////////////////////////////////////////////////////////////////////
/obj/item/reagent_containers/food
possible_transfer_amounts = list()
volume = 50 //Sets the default container amount for all food items.
@@ -138,6 +138,10 @@
for (var/mob/M in src)
M.forceMove(drop_location())
/obj/machinery/processor/container_resist(mob/living/user)
user.forceMove(drop_location())
user.visible_message("<span class='notice'>[user] crawls free of the processor!</span>")
/obj/machinery/processor/slime
name = "slime processor"
desc = "An industrial grinder with a sticker saying appropriated for science department. Keep hands clear of intake area while operating."
@@ -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())
@@ -216,7 +216,7 @@
/datum/chemical_reaction/slime/slimefreeze/on_reaction(datum/reagents/holder)
var/turf/T = get_turf(holder.my_atom)
T.visible_message("<span class='danger'>The slime extract begins to vibrate adorably!</span>")
T.visible_message("<span class='danger'>The slime extract starts to feel extremely cold!</span>")
addtimer(CALLBACK(src, .proc/freeze, holder), 50)
var/obj/item/slime_extract/M = holder.my_atom
deltimer(M.qdel_timer)
@@ -227,7 +227,8 @@
if(holder && holder.my_atom)
var/turf/open/T = get_turf(holder.my_atom)
if(istype(T))
T.atmos_spawn_air("nitrogen=50;TEMP=2.7")
var/datum/gas/gastype = /datum/gas/nitrogen
T.atmos_spawn_air("[initial(gastype.id)]=50;TEMP=2.7")
/datum/chemical_reaction/slime/slimefireproof
name = "Slime Fireproof"
@@ -370,6 +371,11 @@
/datum/chemical_reaction/slime/slimebloodlust/on_reaction(datum/reagents/holder)
for(var/mob/living/simple_animal/slime/slime in viewers(get_turf(holder.my_atom), null))
if(slime.docile) //Undoes docility, but doesn't make rabid.
slime.visible_message("<span class='danger'>[slime] forgets its training, becoming wild once again!</span>")
slime.docile = FALSE
slime.update_name()
continue
slime.rabid = 1
slime.visible_message("<span class='danger'>The [slime] is driven into a frenzy!</span>")
..()
@@ -186,6 +186,7 @@ Chilling extracts:
/obj/item/slimecross/chilling/sepia/do_effect(mob/user)
user.visible_message("<span class='warning'>[src] shatters, freezing time itself!</span>")
allies -= user //support class
new /obj/effect/timestop(get_turf(user), 2, 300, allies)
..()
@@ -267,7 +268,7 @@ Chilling extracts:
addtimer(CALLBACK(src, .proc/boom), 50)
/obj/item/slimecross/chilling/oil/proc/boom()
explosion(get_turf(src), -1, -1, 3, 10) //Large radius, but mostly light damage.
explosion(get_turf(src), -1, -1, 10, 0) //Large radius, but mostly light damage, and no flash.
qdel(src)
/obj/item/slimecross/chilling/black
@@ -307,4 +308,4 @@ Chilling extracts:
user.visible_message("<span class='warning'>[src] reflects an array of dazzling colors and light, energy rushing to nearby doors!</span>")
for(var/obj/machinery/door/airlock/door in area)
new /obj/effect/forcefield/slimewall/rainbow(door.loc)
return ..()
return ..()
@@ -633,6 +633,12 @@
to_chat(user, "<span class='warning'>The slime is dead!</span>")
return
if(M.rabid) //Stops being rabid, but doesn't become truly docile.
to_chat(M, "<span class='warning'>You absorb the potion, and your rabid hunger finally settles to a normal desire to feed.</span>")
to_chat(user, "<span class='notice'>You feed the slime the potion, calming its rabid rage.</span>")
M.rabid = FALSE
qdel(src)
return
M.docile = 1
M.nutrition = 700
to_chat(M, "<span class='warning'>You absorb the potion and feel your intense desire to feed melt away.</span>")
+11
View File
@@ -442,3 +442,14 @@
heat_level_1_threshold = 400 // better adapted for heat, obv. Lavaland standard is 300
heat_level_2_threshold = 600 // up 200 from level 1, 1000 is silly but w/e for level 3
/obj/item/organ/lungs/slime
name = "vacuole"
desc = "A large organelle designed to store oxygen and other important gasses."
safe_toxins_max = 0 //We breathe this to gain POWER.
/obj/item/organ/lungs/slime/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H)
. = ..()
if (breath.gases[/datum/gas/plasma])
var/plasma_pp = breath.get_breath_partial_pressure(breath.gases[/datum/gas/plasma])
owner.blood_volume += (0.2 * plasma_pp) // 10/s when breathing literally nothing but plasma, which will suffocate you.