mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 00:21:11 +01:00
Animal eating bugfix/cleanup (#8420)
This commit is contained in:
@@ -285,17 +285,20 @@
|
||||
if (!stat || prob(0.5))
|
||||
wake_up()
|
||||
|
||||
//Eating in tile
|
||||
for(var/obj/item/reagent_containers/food/snacks/S in src.loc)
|
||||
if(can_eat() && (nutrition < max_nutrition * 0.3)) //Only when sufficiently hungry
|
||||
UnarmedAttack(S)
|
||||
else
|
||||
break
|
||||
if(nutrition < max_nutrition / 3 && isturf(loc)) //If we're hungry enough (and not being held/in a bag), we'll check our tile for food.
|
||||
handle_eating()
|
||||
|
||||
/mob/living/simple_animal/proc/handle_supernatural()
|
||||
if(purge)
|
||||
purge -= 1
|
||||
|
||||
/mob/living/simple_animal/proc/handle_eating()
|
||||
var/list/food_choices = list()
|
||||
for(var/obj/item/reagent_containers/food/snacks/S in get_turf(src))
|
||||
food_choices += S
|
||||
if(food_choices.len) //Only when sufficiently hungry
|
||||
UnarmedAttack(pick(food_choices))
|
||||
|
||||
//Simple reagent processing for simple animals
|
||||
//This allows animals to digest food, and only food
|
||||
//Most drugs, poisons etc, are designed to work on carbons and affect many values a simple animal doesnt have
|
||||
|
||||
Reference in New Issue
Block a user