Closed Mitzruti closed 4 years ago
I'll check it out.
Wait, I'm confused. Dual Wield specs can only become primary or complementary. You're not supposed to ever have a Dual Wield spec as a secondary. This is intentional, because Primary and Secondary specs are supposed to be independent from each other.
The primary DW spec kinda doubles as the secondary spec as well.
I know there's an issue with your flamethrower canister spec, but I really don't know how to accomodate for it without having to rewrite the randomization logic.
Make your primary flamethrower spec a dual wield one, mark it as having both Primary and Secondary inventory slots, and add both the flamethrower and the canister as allowed weapons. Mark the canister spec as required additional spec for the primary one.
Then any soldier who rolls the flamethrower spec will be able to equip the flamethrower primary, canister secondary, and will always have access to both specs. This is the best solution I can offer.
Pretty sure we went over this. making all the flamethrower specs dual wield make it impossible to roll a soldier that has something other than a canister as their secondary... which is not ideal.
It just needs to validate that, either in the function that's getting possible secondary specs or the place where that is called from, if the spec is dual wield that it's actually a valid choice.
All secondary specs are meant to be possible. If a secondary spec cannot function on its own then it's not a secondary spec.
Right, we've been over this. Sorry, a lot has happened in the last few days, so I forgot we decided to go your way. I'll make some code changes, it's currently bugged anyway.
How about setting the canister one as forced complementary spec and remove it from the random classes system?
How about setting the canister one as forced complementary spec and remove it from the random classes system?
That's more or less what I was suggesting, but it's fine, I'm happy to make the necessary changes. My akimbo and stormrider specs will benefit from this, plus there's a bug in the current implementation anyway. I'm just finalizing and testing the changes to make sure everything is okay. I'll make a PR later today.
I also noticed the rocket launcher icon is not in yet, if you don't mind, I'd like to add it, as well as the icons for flamethrower and canister.
They should only be available as secondary specs if the primary spec uses at least one of the same weapon categories. (so the end result is still dual-wielding)
X2UniversalSoldierClassInfo.IsSecondaryWeaponSpecialization()