mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 03:55:05 +01:00
Diona nymphs can eat veggies (#12423)
* Diona Nymphs can now consume vegetables. It takes 2 seconds to do so, and they gain nutrition based on how much plant matter and/or nutriment is present. This tends to be a slightly slower way to grow than eating weeds (unless specialized plants are provided for the purpose, like high potency pumpkins) but provides an option to nymphs that have nothing but earthsblood trays around. * Changed the spacing a bit. * Changing some minor things in line with provided code reviews. * Hopefully this is an improvement. * Requested minor changes * Swapped type check with isnymph(). I didn't even know these defines existed.
This commit is contained in:
@@ -182,3 +182,11 @@
|
||||
user.put_in_hands(T)
|
||||
to_chat(user, "<span class='notice'>You open [src]\'s shell, revealing \a [T].</span>")
|
||||
qdel(src)
|
||||
|
||||
// Diona Nymphs can eat these as well as weeds to gain nutrition.
|
||||
/obj/item/reagent_containers/food/snacks/grown/attack_animal(mob/living/simple_animal/M)
|
||||
if(isnymph(M))
|
||||
var/mob/living/simple_animal/diona/D = M
|
||||
D.consume(src)
|
||||
else
|
||||
return ..()
|
||||
@@ -202,6 +202,20 @@
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
// Consumes plant matter other than weeds to evolve
|
||||
/mob/living/simple_animal/diona/proc/consume(obj/item/reagent_containers/food/snacks/grown/G)
|
||||
if(nutrition >= nutrition_need) // Prevents griefing by overeating plant items without evolving.
|
||||
to_chat(src, "<span class='warning'>You're too full to consume this! Perhaps it's time to grow bigger...</span>")
|
||||
else
|
||||
if(do_after_once(src, 20, target = G))
|
||||
visible_message("[src] ravenously consumes [G].", "You ravenously devour [G].")
|
||||
playsound(loc, 'sound/items/eatfood.ogg', 30, 0, frequency = 1.5)
|
||||
if(G.reagents.get_reagent_amount("nutriment") + G.reagents.get_reagent_amount("plantmatter") < 1)
|
||||
adjust_nutrition(2)
|
||||
else
|
||||
adjust_nutrition((G.reagents.get_reagent_amount("nutriment") + G.reagents.get_reagent_amount("plantmatter")) * 2)
|
||||
qdel(G)
|
||||
|
||||
/mob/living/simple_animal/diona/proc/steal_blood()
|
||||
if(stat != CONSCIOUS)
|
||||
return FALSE
|
||||
|
||||
Reference in New Issue
Block a user