Any chance we could get a MutableShipStatsAPI.get<SIZE>WeaponRangeBonus, i.e. MutableShipStatsAPI.getSmallWeaponRangeBonus?
There are a couple things where you can only tweak certain weapons by type, and others by size, and some by PD tag or projectile/beam, etc. and I bumped into this one recently.
What if you want to start mixing weapon size and weapon type stat changes though? I feel like this would get clunky very fast. I love the flexibility that stats affecting certain sizes gives, but imagine having all the mutable stats a weapon can take multiplied by three for the different weapon sizes.
I suggest a potential extension of Vayra's request: for weapon-affecting stats that are applied to a whole ship (such as, say, weapon range), the stat change method ".get_WeaponRangeBonus()" could have an optional field before the modifier method that allows you to specify a size - either as an enum "SMALL / MEDIUM / LARGE", or just an integer from 0 to 2. So, to give a range buff to all of a ship's small-sized ballistic weapons, you could do this:
...
stats.getBallisticWeaponRange(WeaponSize.SMALL).modifyPercent(id, someRangeBonus);
...
This could extend to all sorts of ship-wide, weapon-affecting stats - weapon flux cost, weapon damage, weapon rate of fire, etc. - in much the same way, keeping everything nice and tidy without MutableShipStatsAPI becoming a bit of a labyrinth (even if it already is
). Would such a setup be possible, or even sane?