Files
Bubberstation/code/__DEFINES/monkeys.dm
MrMelbert c080b83c41 Monkey eating glowup (#93759)
## About The Pull Request

1. Monkeys will only seek out food to eat if they are actually hungry,
rather than on an arbitrary cooldown.
2. Monkeys will no longer teleport-yoink food out of your hands.
Instead, they may get angry at you for stealing their food, and fight
you over it. The hungrier the monkey, the more likely they are to fight.
3. Monkeys will discard trash and empty glasses (on the floor) after
eating or drinking them.
4. Monkeys can target soup to eat
5. PunPun will no longer seek out drinks if they are hungry.
6. PunPun will now, if the bartender is absent and there are multiple
patrons around, attempt to find filled glasses or food to hand out to
patrons.
7. Several places that sought edible items no longer include drinking
glasses as edible items

<img width="656" height="185" alt="image"
src="https://github.com/user-attachments/assets/8b3a6ac1-ae2c-41a0-919f-b471ad93bb0f"
/>

## Why It's Good For The Game

PunPun shouldn't be yoinking glasses out of patron's hands - their
intended behavior is to serve drinks not steal them

Otherwise, monkey eating was a bit jank due to it being some of our
oldest ai code. I largely just brought it up to more modern ai
standards.

## Changelog

🆑 Melbert
add: If the bartender is absent, PunPun will serve filled drink glasses
to patrons that don't have one.
add: PunPun will now ignore filled drinks and items being held when
looking for stuff to eat.
add: Monkeys can eat soup.
add: Monkeys will no longer seek out food if they are not hungry.
add: Hungry monkeys might fight you over the food you are holding. The
hungrier the monkey, the angrier the monkey.
fix: Monkeys can no longer teleport items out of your hands to eat. 
/🆑
2025-11-08 01:32:46 +01:00

40 lines
1.6 KiB
Plaintext

//Monkey defines, placed here so they can be read by other things!
/// below this health value the monkey starts to flee from enemies
#define MONKEY_FLEE_HEALTH 40
/// how close an enemy must be to trigger aggression
#define MONKEY_ENEMY_VISION 9
/// how close an enemy must be before it triggers flee
#define MONKEY_FLEE_VISION 4
/// How long does it take the item to be taken from a mobs hand
#define MONKEY_ITEM_SNATCH_DELAY 25
/// Probability monkey will aggro when cuffed
#define MONKEY_CUFF_RETALIATION_PROB 20
/// Probability monkey will aggro when syringed
#define MONKEY_SYRINGE_RETALIATION_PROB 20
// Probability per Life tick that the monkey will:
/// probability that monkey aggro against the mob pulling it
#define MONKEY_PULL_AGGRO_PROB 5
/// probability that monkey will get into mischief, i.e. finding/stealing items
#define MONKEY_SHENANIGAN_PROB 20
/// probability that monkey will disarm an armed attacker
#define MONKEY_ATTACK_DISARM_PROB 20
/// probability that monkey will get recruited when friend is attacked
#define MONKEY_RECRUIT_PROB 25
/// probability for the monkey to aggro when attacked
#define MONKEY_RETALIATE_PROB 85
/// amount of aggro to add to an enemy when they attack user
#define MONKEY_HATRED_AMOUNT 4
/// amount of aggro to add to an enemy when a monkey is recruited
#define MONKEY_RECRUIT_HATED_AMOUNT 2
/// amount of aggro to add if someone stole the food we wanted
#define MONKEY_FOOD_HATRED_AMOUNT 2
/// probability of reducing aggro by one when the monkey attacks
#define MONKEY_HATRED_REDUCTION_PROB 20
///Monkey recruit cooldown
#define MONKEY_RECRUIT_COOLDOWN (1 MINUTES)