Implement type-dependent classes for rebel AIs #1947
Merged
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.
What type of PR is this.
What have you changed and why?
Implemented type-dependent classes for rebel AIs. This makes the unit type icons in the command bar work correctly (medics and engineers now have the appropriate symbol), plus the overlay names no longer all say "riflemen". Petros is now "officer", for example.
Each element of customUnitTypes now has an additional parameter for the unit class to be used for that unit type. These are varied for rebel units only, as we don't much care about the UI for enemy troops.
Also fixed some misnamed loadout -> definition variables, and fixed the incorrect loadout count debug text. Definitions already had an extra parameter of unit traits, so the format apparently changed at some point.
Based on vn-development so that we can get the merge conflicts in early.
I haven't checked the code for civ creation but they seem to work for whatever reason. Enemies should be fine.
Please specify which Issue this PR Resolves.
mentioned in #1914
Please verify the following and ensure all checks are completed.
Is further testing or are further changes required?
How can the changes be tested?
Enable command bar and the server difficulty option that gives you information about your troops on mouseover. Recruit all the different rebels and look at them. Also check out Petros. He likes it.