public IEnumerable <BodyPartRecord> GetBasePartAt(ChassisPoint cp, BodyPosition bp = BodyPosition.Undefined) { foreach (var record in BaseBodyDef.AllParts) { if (record.def is DroidChassisPartDef) { var def = record.def as DroidChassisPartDef; if (def.ChassisPoint == cp) { if (record is DroidChassisPartRecord) { var chassisRecord = record as DroidChassisPartRecord; if (bp == BodyPosition.Undefined || chassisRecord.bodyPosition == bp) { yield return(record); } } else { yield return(record); } } } } }
public static string Get(ChassisPoint cp, BodyPosition bp = BodyPosition.Undefined) { switch (cp) { case ChassisPoint.ArmourPlating: return("Armour plating"); case ChassisPoint.ArmourHardPoint: return("Armour hard point"); case ChassisPoint.MotivatorManipulation: return("Motivator (manipulation)"); case ChassisPoint.MotivatorMoving: return("Motivator (moving)"); case ChassisPoint.CPU: return("CPU"); case ChassisPoint.VisualReceptor: if (bp == BodyPosition.LeftVisualReceptor) { return("Left visual receptor"); } else if (bp == BodyPosition.RightVisualReceptor) { return("Right visual receptor"); } else { return("Visual receptor"); } case ChassisPoint.MediumHead: return("Head"); case ChassisPoint.MediumChassis: return("Chassis"); case ChassisPoint.MediumShoulder: if (bp == BodyPosition.LeftShoulder) { return("Left shoulder"); } else if (bp == BodyPosition.LeftShoulder) { return("Right shoulder"); } else { return("Shoulder"); } case ChassisPoint.MediumArm: if (bp == BodyPosition.LeftArm) { return("Left arm"); } else if (bp == BodyPosition.RightArm) { return("Right arm"); } else { return("Arm"); } case ChassisPoint.MediumHand: if (bp == BodyPosition.RightHand) { return("Right hand"); } else if (bp == BodyPosition.LeftArm) { return("Left hand"); } else { return("Hand"); } case ChassisPoint.MediumFinger: return("Finger"); case ChassisPoint.MediumLegSocket: return("Leg socket"); case ChassisPoint.MediumLeg: if (bp == BodyPosition.LeftLeg) { return("Left leg"); } else if (bp == BodyPosition.RightLeg) { return("Right leg"); } else { return("Leg"); } case ChassisPoint.MediumFoot: if (bp == BodyPosition.LeftFoot) { return("Left foot"); } else if (bp == BodyPosition.RightFoot) { return("Right foot"); } else { return("Foot"); } default: return("Slot"); } }
public void CopyFrom(PartCustomisePack pack) { chassisPoint = pack.ChassisPoint; bodyPosition = pack.BodyPosition; part = pack.Part; }
public PartCustomisePack(ChassisPoint cp, DroidChassisPartDef part = null, BodyPosition position = BodyPosition.Undefined) { chassisPoint = cp; this.part = part; bodyPosition = position; }
public CustomiseGroupListItem(ChassisPoint cp = ChassisPoint.Undefined, BodyPosition bp = BodyPosition.Undefined) { ChassisPoint = cp; BodyPosition = bp; }