Skip to content

Change items to a inheritance based structure #12

Description

@jtljac

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

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions