Use Character Pool Class#1
Open
nightninja54 wants to merge 5 commits into
Open
Conversation
When generating a soldier from the character pool, check and use the designated Character's class
Favid
requested changes
May 12, 2021
| `LOG("RandomlyChooseCharacter adding to RandomCharacterOptions"); | ||
| RandomCharacterOptions.AddItem(Character.GetFullName()); | ||
| `LOG("Searching for Character with Class: " $ ClassName); | ||
| if(ClassName == Character.GetSoldierClassTemplateName()) { |
Owner
There was a problem hiding this comment.
- Curly brackets should be on new lines
- I don't like the side-effect where, if there aren't any characters with the given class, then the soldier will end up being fully randomly generated. I think that if it can't find a character with the given class, it should just randomly choose a character. And then if it can't find a character, it should be randomly generated.
|
|
||
| // Start with the default squad - 4 random soldiers at the start, with others joining at missions 2 and 4 | ||
| Soldier.bRandomlyGeneratedCharacter = true; | ||
| Soldier.bRandomCharacter = true; |
Owner
There was a problem hiding this comment.
Please revert the changes to this file - I would prefer that randomly generated characters be the default.
Author
|
Noted! I'll follow up here, thanks for review :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When generating a soldier from the character pool, check and use the designated Character's class.
If a selected class does not have a character pool match, generate a new soldier.