-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds hunger to mouse #1753
Adds hunger to mouse #1753
Conversation
Reviewer's Guide by SourceryThis pull request introduces a hunger system for player-controlled mice, allowing them to eat food and suffer consequences for overeating. The system includes a nutrition level, hunger drain, and different states based on the nutrition level. The mice can eat food items, which will increase their nutrition level. If a mouse overeats, it will die. The speed of eating is also affected by the hunger level. Sequence diagram for mouse eating foodsequenceDiagram
participant M as Mouse
participant F as Food Item
M->>F: Click on food
alt Already eating
M-->>M: Show 'finish chewing' message
else Not eating
Note over M,F: Eating time varies with nutrition level
M->>F: Start eating animation
M->>F: Wait for eating duration
alt Eating completed
F->>M: Transfer nutrients
Note over M: Adjust nutrition level
F->>F: Generate trash
F->>F: Self-destruct
else Interrupted
M-->>M: Stop eating
end
end
Class diagram for mouse hunger systemclassDiagram
class Mouse {
+nutrition: float
+hunger_drain: float
+busy: bool
+previous_status: string
+handle_chemicals_in_body()
+consume(food: Food)
+start_pulling(item)
}
class Food {
+reagents
+generate_trash()
}
class MouseHUD {
+nutrition_display
+healths
}
Mouse "1" -- "1" MouseHUD
Mouse "1" -- "*" Food : consumes
State diagram for mouse hunger levelsstateDiagram-v2
[*] --> Hungry
Hungry --> Fed: Eat food
Fed --> WellFed: Continue eating
WellFed --> Full: Continue eating
Full --> Fat: Overeat
Fat --> [*]: Explode from overeating
Hungry --> Starving: No food
Starving --> Hypoglycemia: No food
Hypoglycemia --> [*]: Death from starvation
note right of Fat: Above 135% nutrition
note right of Starving: Takes damage over time
note right of Hypoglycemia: Takes more damage
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Я не очень понимаю, почему у меня появилось столько include(ов) в |
можешь убрать. Это бьенд насирает, если им открыть |
Угусь, спасибо! |
@m-dzianishchyts, Максимилиан, посмотришь? Мне осталось там только текст проверить и дождаться, когда картинки будут готовы. С текстом у меня проблемы возникли, потому что там мышки могут быть и крысами и питомцами, поэтому я не уверен как написать текст, чтобы подошёл под все случаи, вот я и написал на английском. Но наверное слишком много где у меня |
Пока всё ещё жду картинки, но код бы посмотреть. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Бегло глянул, можно еще оставшиеся внутриигровые сообщения перевести для консистенси
Спасибо большое, я доработаю. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отступы, а так вроде всё ок
Co-authored-by: Aylong <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Надо выбрать какой-то один язык внутриигровых сообщений
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Наверное норм, верим в тестирование
Co-authored-by: Mikhail Dzianishchyts <[email protected]>
Рантаймов точно нет, а всё остальное, если что поправлю на днях. |
Так может ТМ? |
Хотя ладно, это просто мыши |
Мне кажется это оверкилл. Там даже обычные мышки не были затронуты, а только под управление призраков. Я то в целом не против, мне так только спокойнее будет. ТМ что-то дополнительное даёт, кроме моего душевного спокойства? |
Что этот PR делает
Добавляет мышкам под контролем игрока систему голода и возможность взаимодействовать с едой.
Почему это хорошо для игры
Скорее всего это плохо. Я уде вижу нашествие мышей на кухню с желанием съесть всё что можно.
Изображения изменений
TODO
Тестирование
Changelog
🆑
add: Мыши и крысы под управлением игроков теперь имеют шкалу голода. Для поедания доступна любая еда, а скорость поедания зависит от уровня голода. Для взаимодействия с едой нужно просто кликнуть на неё. Также добавлена уникальная шкала голода для них и появилась возможность тянуть не только сыр, но и другую еду.
/:cl:
Summary by Sourcery
Implement a hunger system for player-controlled mice, allowing them to interact with food and suffer consequences for overeating.
New Features:
Tests:
Summary by Sourcery
Add a hunger system for player-controlled mice, including a hunger meter and the ability to eat food. Overeating will cause the mouse to explode.
New Features:
Tests: