public static Entity BuildNakedMech(string label, bool player, Guidebook book) { var mech = new Entity(label: label, typeLabel: MechTypeLabel) .AddComponent(new Component_Buffable()) .AddComponent(new Component_ActionExecutor(Config.DefaultEntityAP)) .AddComponent(new Component_Inventory()) .AddComponent(new Component_Skeleton()); if (player) { mech.AddComponent(new Component_Player()); } else if (book != null) { mech.AddComponent(new Component_AI(book)); } else { throw new InvalidOperationException("book can't be null!"); } SlotAt(mech, BodyPartLocation.LEFT_ARM, BlueprintListing.BuildForLabel(Blueprints.HAND)); SlotAt(mech, BodyPartLocation.RIGHT_ARM, BlueprintListing.BuildForLabel(Blueprints.HAND)); // Slot in all the required components return(mech); }
public static Entity BuildArmorPart() { return(BlueprintListing.BuildForLabel(Blueprints.ARMOR)); }