During some recent searching through scripts for modding purposes I discovered a class typo and some inconsistency relating to suppressors in the game.
M4_Suppressor extends SuppressorBase
ImprovisedSuppressor extends SuppressorBase
Groza_Barrel_Suppressor extends SuppressorBase
Groza_Barrel_Short extends SuppressorBase
Groza_Barrel_Grip extends SuppressorBase
Typo >> SuppresorBase extends ItemBase [suppressorbase.c]
PistolSuppressor extends ItemSuppressor
MakarovPBSuppressor extends ItemSuppressor
AK_Suppressor extends ItemSuppressor
MP5_Compensator extends ItemSuppressor
Mosin_Compensator extends ItemSuppressor
ItemSuppressor extends InventoryItemSuper
As I've referenced above, some of the suppressors and other muzzle devices in the game are inheriting from the class "SuppressorBase" but that class doesn't actually exist as there's a typo in "suppressorbase.c" and the class name is incorrectly spelled "SuppresorBase".
In addition, the rest of the suppressors and muzzle devices that aren't inheriting from the missing SuppressorBase class are inheriting from ItemSuppressor, and I'm not entirely sure why there's a split like this.
Also worth mentioning, attempting to mod "ItemSuppressor" results in the error about engine classes not being able to be modded. I'm not sure if that's by design or not.
Modding SuppressorBase results in an error because the class doesn't exist. Modding "SuppresorBase" results in nothing inheriting any of the modded scripting because nothing inherits from this typo class, in addition it would appear that all in game suppressors that are attempting to inherit from SuppressorBase>ItemBase are inheriting nothing due to this typo as well.
Is there a particular reason why some suppressors and muzzle devices inherit from one parent class rather than the other in the scripts? In the configs they all inherit from ItemSuppressor.
This is on the most recent stable version(1.21) of the game at the time of this writing. I haven't unpacked 1.22 experimental files to check if this all still exists.
Also as a suggestion, it would be nice and make more sense if suppressors and non suppressor muzzle devices like compensators weren't all part of the same parent class. Perhaps an ItemCompensator or CompensatorBase class could be added to both the configs and scripts facilitate such a separation?