Skip to content
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

Feature added: Restrict Hungry Animals to an area (per age and gender) #151

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dandiez
Copy link

@dandiez dandiez commented Oct 27, 2019

A new area restriction added to send hungry animals to a specific area (separated by gender and age).
The "food need" limit can be adjusted such that only hungry enough animals are sent there.

The idea behind is to have a bit more control in certain cases, like for example:

  • If animals are waiting to be tamed (and potentially in the future to be milked or sheared) it happens sometimes that the handler is not available, and the animals get stuck in an area where they either starve or need to be provided food (which would come from the winter reserves).
  • It allows to have all animals in a central place and only go out to eat some grass and then come back. Currently you can sort of do this with sleeping spots, but during sleep animals cannot be handled and during the day they roam free far away from the barn.
  • You can have animals in a particular area (generally), but have an emergency food stash for hard times. The animals would go there if needed.
  • You can have wargs hauling food to the freezer, but prevent them from eating the meat there, because as soon as they are a bit hungry they are sent to a special freezer to feed on corpses, etc.

pos.y += ListEntryHeight;
if (_selectedCurrent.RestrictToHungryArea)
{
if (_selectedCurrent.RestrictHungryArea.Count != _selectedCurrent.RestrictArea.Count)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this workaround, if you load an existing save, the GUI goes crazy (I assume because the new array has some sort of bad initialisation data).
I'm sure there is a better way, checking for null correctly, but after trying that I could not get it to work.

@dandiez dandiez changed the title Feature added: Restrict Hungry Animals to an area Feature added: Restrict Hungry Animals to an area (per age and gender) Oct 27, 2019
@FluffierThanThou
Copy link
Member

Hi dandiez!

First of all, thank you for the suggestion and implementation. As it is, I cannot accept this pull request. I've deliberately kept the other restrict options simple - adding a per gender/age box to each of them would overly complicate the tab.

I'ld be willing to accept a simpler toggle for restricting hungry animals. Alternatively, feel free to keep using your own branch - you've done some good work here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants