Simplified Example
CfgWeapons
{
class 556_Magazine
{
magazines[] = {"30rnd_556x45_EPR","30rnd_556x45_SOST"};
};
class add_special_pointer
class WeaponSlotsInfo
class PointerSlot: PointerSlot
{
compatibleItems[] += {"special_pointer"};
};
};
};
class modB_weapon_m4a1: modA_weapon_m4a1,556_Magazine{};
class modB_weapon_m16a4: modA_weapon_m16a4,556_Magazine,add_special_pointer{};
};
In this example I would create a new class using the base class from another mod and a new class I created to overwrite the magazines used by those weapons and also a second new class used to add the ability to use a special pointer for the m16a4.
The current way to do that is to rewrite the magazine property and the pointer property in every new class.
Which would work but if we have the same 20 properties to change in every weapon then it becomes a bit clumsy and complicated to maintain.
Isn't it the base of programming to never write the same code twice ?