-
Notifications
You must be signed in to change notification settings - Fork 4
Default
Defaults - components that controloed by other components. Player cannot add or remove they manualy, buy, sell or salvage(they not appear on this list basicly). Usualy they DarkGrey color on mech, but you can ovveride this using ColorComponent(default color for upgrades "Upgrade"). Main idea - they can be created or destroyed any time. Attention: Default must be same base type as main component - Weapon, AmmunitionBox, JumpJet, HeatSink or Upgrade
Static helper class used for interaction with default components.
bool IsDefault(this MechComponentDef cdef)bool IsDefault(this MechComponentRef cref)
Return true if component is default.
RemoveInventory(string defaultID, MechDef mech, ChassisLocations location, ComponentType type)
Remove default with given id from mech inventory. Use it in IOnInstalled to remove component from mech
AddInventory(string defaultID, MechDef mech, ChassisLocations location, ComponentType type, SimGameState state)
Create and add valid Default Component to mech inventory. Use it in IOnInstalled
CreateSlot(string id, ComponentType type, MechLabPanel mechLab)
Create and return valid MechLabItemSlotElement to use for mechlab. Designed for adding element with AddChange in drop sequience.
AddMechLab(string id, ComponentType type, MechLabHelper mechLab, ChassisLocations location)
Create and add Default component with given id to target location in mechlab. dont use in item drop sequence
RemoveMechLab(string id, ComponentType type, MechLabHelper mechLab, ChassisLocations location)
Remove default component from target location in mechlab. dont use in item drop sequence