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

Some splits for better modding options #49

Conversation

onemantooo
Copy link

@onemantooo onemantooo commented Jan 11, 2024

Hello.
Recently i've tried to add some options to spawned patrols, and one caused a problem - i wanted to add an options to spawn only male or only female AIs via my mod configuration. But to accomplish that - i need to fully override or copy SpawnAI method which causes obvious problem - it can break Expansion functionality after some of your updates.

So i took all my bravery to send you this PR. It's just splits SpawnAI to few separated methods.

If you won't accept this one, maybe i can send you a PR with male/female functionality?

return GetGame().CreateObject(GetRandomAI(), pos);
}

private void ConfigureAi(eAIBase ai, vector pos) {
ai.SetPosition(pos);
Copy link
Author

@onemantooo onemantooo Jan 11, 2024

Choose a reason for hiding this comment

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

Not sure why is this needed cos we already passed position to CreateObject but kept it untouched.

Copy link
Owner

Choose a reason for hiding this comment

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

Options to set the specific AI class names used to spawn the AI patrol units have been added in the last update:

@LieutenantMaster
Copy link
Collaborator

In the latest update now, thank you for the suggestion <3

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.

3 participants