In order to prevent lots of if(itemType) then specificAction(), the items should be split into their own classes. This can be done exactly the same as the the actor inheritance structure

class structure:
- Item - Common, Physical Item
- Loot
- Tool
- Weapon Mod
- Armour Mod
- CharacterClass - Advancements
- Class
- Subclass
- Background
- Species
- Activated - ActivatedEffect, Action
- Consumable - Ammo, Device, Grenade, Medigel, Omni-gel
- Feat - Recharge
- Fighting Style
- Power
- Equipment - Armour, Shield
- Weapon - Heavy Weapon
graph:
class common
subclass common
backpack common
backpack physicalItem
loot common
loot physicalItem
tool common
tool physicalItem
consumable common
consumable physicalItem
consumable activatedEffect
consumable action
spell common
spell activatedEffect
spell action
equipment common
equipment physicalItem
equipment activatedEffect
equipment action
equipment mountable
feat common
feat activatedEffect
feat action
feat recharge
fightingstyle common
fightingstyle activatedEffect
fightingstyle action
weapon common
weapon physicalItem
weapon activatedEffect
weapon action
weapon mountable
In order to prevent lots of
if(itemType) then specificAction(), the items should be split into their own classes. This can be done exactly the same as the the actor inheritance structureclass structure:
graph: