internal static void RegisterStudioControls() { if (!Running) { return; } Loaded = true; CurrentStateCategorySwitch StudioToggleEnable = new CurrentStateCategorySwitch("Enable", OCIChar => (bool)GetController(OCIChar)?.FunctionEnable); StudioToggleEnable.Value.Subscribe(_value => { CharacterAccessoryController _pluginCtrl = StudioAPI.GetSelectedControllers <CharacterAccessoryController>().FirstOrDefault(); if (_pluginCtrl == null) { return; } _pluginCtrl.FunctionEnable = _value; }); StudioAPI.GetOrCreateCurrentStateCategory("CharaAcc").AddControl(StudioToggleEnable); CurrentStateCategorySwitch StudioToggleAutoCopyToBlank = new CurrentStateCategorySwitch("Auto Copy To Blank", OCIChar => (bool)GetController(OCIChar)?.AutoCopyToBlank); StudioToggleAutoCopyToBlank.Value.Subscribe(_value => { CharacterAccessoryController _pluginCtrl = StudioAPI.GetSelectedControllers <CharacterAccessoryController>().FirstOrDefault(); if (_pluginCtrl == null) { return; } _pluginCtrl.AutoCopyToBlank = _value; }); StudioAPI.GetOrCreateCurrentStateCategory("CharaAcc").AddControl(StudioToggleAutoCopyToBlank); List <string> coordinateList = Enum.GetNames(typeof(ChaFileDefine.CoordinateType)).ToList(); coordinateList.Add("CharaAcc"); CurrentStateCategoryDropdown StudioDropdownRef = new CurrentStateCategoryDropdown("Referral", coordinateList.ToArray(), OCIChar => (int)GetController(OCIChar)?.ReferralIndex); StudioDropdownRef.Value.Subscribe(_value => { CharacterAccessoryController _pluginCtrl = StudioAPI.GetSelectedControllers <CharacterAccessoryController>().FirstOrDefault(); if (_pluginCtrl == null) { return; } _pluginCtrl.SetReferralIndex(_value); }); StudioAPI.GetOrCreateCurrentStateCategory("CharaAcc").AddControl(StudioDropdownRef); }
private static void RegisterStudioControls() { var invisibleSwitch = new CurrentStateCategorySwitch("Invisible Body", controller => controller.charInfo.GetComponent <InvisibleBodyCharaController>().Invisible); invisibleSwitch.Value.Subscribe(Observer.Create((bool value) => { var controller = GetSelectedStudioController(); if (controller != null) { controller.Invisible = value; } })); StudioAPI.GetOrCreateCurrentStateCategory("").AddControl(invisibleSwitch); }
private static void RegisterStudioControls() { var invisibleSwitch = new CurrentStateCategorySwitch("Shaking Eye Highlights", controller => controller.charInfo.GetComponent <EyeShakingController>().EyeShaking); invisibleSwitch.Value.Subscribe(Observer.Create((bool value) => { var controller = GetSelectedStudioController(); if (controller != null) { controller.EyeShaking = value; } })); StudioAPI.GetOrCreateCurrentStateCategory("").AddControl(invisibleSwitch); }
//No studio for EC private static void RegisterStudioControls() { if (!StudioAPI.InsideStudio) { return; } var pushupBraToggle = new CurrentStateCategorySwitch("Pushup Bra", ocichar => ocichar.charInfo.GetComponent <PushupController>().CurrentBraData.EnablePushup); StudioAPI.GetOrCreateCurrentStateCategory("Pushup").AddControl(pushupBraToggle); pushupBraToggle.Value.Subscribe(value => { bool first = true; foreach (var controller in StudioAPI.GetSelectedControllers <PushupController>()) { if (first && controller.CurrentBraData.EnablePushup == value) { break; } first = false; controller.CurrentBraData.EnablePushup = value; controller.RecalculateBody(); } }); var pushupTopToggle = new CurrentStateCategorySwitch("Pushup Top", ocichar => ocichar.charInfo.GetComponent <PushupController>().CurrentTopData.EnablePushup); StudioAPI.GetOrCreateCurrentStateCategory("Pushup").AddControl(pushupTopToggle); pushupTopToggle.Value.Subscribe(value => { bool first = true; foreach (var controller in StudioAPI.GetSelectedControllers <PushupController>()) { if (first && controller.CurrentTopData.EnablePushup == value) { break; } first = false; controller.CurrentTopData.EnablePushup = value; controller.RecalculateBody(); } }); }
//No studio for EC private static void RegisterStudioControls() { if (!StudioAPI.InsideStudio) { return; } var pushupBraToggle = new CurrentStateCategorySwitch("Pushup Bra", ocichar => ocichar.charInfo.GetComponent <PushupController>().CurrentBraData.EnablePushup); StudioAPI.GetOrCreateCurrentStateCategory("Pushup").AddControl(pushupBraToggle); pushupBraToggle.Value.Subscribe(value => { var controller = GetSelectedController(); if (controller == null) { return; } if (controller.CurrentBraData.EnablePushup != value) { controller.CurrentBraData.EnablePushup = value; controller.RecalculateBody(); } }); var pushupTopToggle = new CurrentStateCategorySwitch("Pushup Top", ocichar => ocichar.charInfo.GetComponent <PushupController>().CurrentTopData.EnablePushup); StudioAPI.GetOrCreateCurrentStateCategory("Pushup").AddControl(pushupTopToggle); pushupTopToggle.Value.Subscribe(value => { var controller = GetSelectedController(); if (controller == null) { return; } if (controller.CurrentTopData.EnablePushup != value) { controller.CurrentTopData.EnablePushup = value; controller.RecalculateBody(); } }); }
private static void RegisterStudioControls() { var invisibleSwitch = new CurrentStateCategorySwitch("Shaking Eye Highlights", controller => controller.charInfo.GetComponent <EyeShakingController>().EyeShaking); invisibleSwitch.Value.Subscribe(Observer.Create((bool value) => { bool first = true; foreach (var controller in StudioAPI.GetSelectedControllers <EyeShakingController>()) { //Prevent changing other characters when the value did not actually change if (first && controller.EyeShaking == value) { break; } first = false; controller.EyeShaking = value; } })); StudioAPI.GetOrCreateCurrentStateCategory("").AddControl(invisibleSwitch); }
public static void RegisterStudioControllerBasic() { if (!StudioAPI.InsideStudio) { return; } var bpEnable = new CurrentStateCategorySwitch("Enable BP Controller", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().enabled); bpEnable.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { if (value == false) { controller.ClearDanAgent(); controller.enabled = false; } else { controller.enabled = true; controller.InitializeDanAgent(); controller.AddDanConstraints(nodeConstraintPlugin); } } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(bpEnable); var colliderRadiusScale = new CurrentStateCategorySlider("Collilder Radius Scale", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanColliderRadiusScale, 0.5f, 1.5f); colliderRadiusScale.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanColliderRadiusScale = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(colliderRadiusScale); var colliderLengthScale = new CurrentStateCategorySlider("Collilder Length Scale", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanColliderLengthScale, 0.5f, 1.5f); colliderLengthScale.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanColliderLengthScale = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(colliderLengthScale); var lengthSlider = new CurrentStateCategorySlider("Length Squish", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanLengthSquish, 0f, 1f); lengthSlider.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanLengthSquish = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(lengthSlider); var girthSlider = new CurrentStateCategorySlider("Girth Squish", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanGirthSquish, 0f, 2f); girthSlider.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanGirthSquish = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(girthSlider); var thresholdSlider = new CurrentStateCategorySlider("Squish Threshold", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanSquishThreshold, 0f, 1f); thresholdSlider.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanSquishThreshold = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(thresholdSlider); var autoTargeter = new CurrentStateCategoryDropdown("Auto-Target", new string[] { "Off", "Vaginal", "Anal", "Oral" }, c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanAutoTarget); autoTargeter.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanAutoTarget = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(autoTargeter); var maxPush = new CurrentStateCategorySlider("Max Push", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().MaxPush, 0f, 0.3f); maxPush.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.MaxPush = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(maxPush); var maxPull = new CurrentStateCategorySlider("Max Pull", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().MaxPull, 0f, 0.3f); maxPull.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.MaxPull = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(maxPull); var pullRate = new CurrentStateCategorySlider("Pull Rate", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().PullRate, 0f, 50f); pullRate.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.PullRate = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(pullRate); var returnRate = new CurrentStateCategorySlider("Return Rate", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().ReturnRate, 0f, 1f); returnRate.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.ReturnRate = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(returnRate); var bellyBulgeEnable = new CurrentStateCategorySwitch("Enable Belly Bulge", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().EnableBellyBulge); bellyBulgeEnable.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.EnableBellyBulge = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(bellyBulgeEnable); var bellyBulgeScale = new CurrentStateCategorySlider("Belly Bulge Scale", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().BellyBulgeScale, 0.0f, 3.0f); bellyBulgeScale.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.BellyBulgeScale = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(bellyBulgeScale); }
private static void RegisterStudioControls() { if (!StudioAPI.InsideStudio) { return; } var breast = new CurrentStateCategorySwitch("Breast", ocichar => ocichar.charInfo.GetComponent <ColliderController>().BreastCollidersEnabled); breast.Value.Subscribe(value => { var controller = GetSelectedController(); if (controller == null) { return; } if (controller.BreastCollidersEnabled != value) { controller.BreastCollidersEnabled = value; controller.ApplyBreastColliders(); } }); #if KK var skirt = new CurrentStateCategorySwitch("Skirt", ocichar => ocichar.charInfo.GetComponent <ColliderController>().SkirtCollidersEnabled); skirt.Value.Subscribe(value => { var controller = GetSelectedController(); if (controller == null) { return; } if (controller.SkirtCollidersEnabled != value) { controller.SkirtCollidersEnabled = value; controller.ApplySkirtColliders(); } }); #endif var floor = new CurrentStateCategorySwitch("Floor", ocichar => ocichar.charInfo.GetComponent <ColliderController>().FloorColliderEnabled); floor.Value.Subscribe(value => { var controller = GetSelectedController(); if (controller == null) { return; } if (controller.FloorColliderEnabled != value) { controller.FloorColliderEnabled = value; controller.ApplyFloorCollider(); } }); StudioAPI.GetOrCreateCurrentStateCategory("Colliders").AddControl(breast); #if KK StudioAPI.GetOrCreateCurrentStateCategory("Colliders").AddControl(skirt); #endif StudioAPI.GetOrCreateCurrentStateCategory("Colliders").AddControl(floor); }
public static void RegisterStudioControls() { if (!StudioAPI.InsideStudio) { return; } var bpEnable = new CurrentStateCategorySwitch("Enable BP Controller", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().enabled); bpEnable.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.enabled = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(bpEnable); var lengthSlider = new CurrentStateCategorySlider("Length Squish", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanLengthSquish, 0f, 1f); lengthSlider.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanLengthSquish = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(lengthSlider); var girthSlider = new CurrentStateCategorySlider("Girth Squish", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanGirthSquish, 0f, 2f); girthSlider.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanGirthSquish = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(girthSlider); var thresholdSlider = new CurrentStateCategorySlider("Squish Threshold", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanSquishThreshold, 0f, 1f); thresholdSlider.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanSquishThreshold = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(thresholdSlider); var colliderRadius = new CurrentStateCategorySlider("Collilder Radius", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanColliderRadius, 0f, 1f); colliderRadius.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanColliderRadius = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(colliderRadius); var colliderLength = new CurrentStateCategorySlider("Collilder Length", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanColliderLength, 0f, 1f); colliderLength.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanColliderLength = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(colliderLength); var colliderVertical = new CurrentStateCategorySlider("Collilder Vertical", c => StudioAPI.GetSelectedControllers <BetterPenetrationController>().First().DanColliderVertical, -0.1f, 0.1f); colliderVertical.Value.Subscribe(value => { foreach (var controller in StudioAPI.GetSelectedControllers <BetterPenetrationController>()) { controller.DanColliderVertical = value; } }); StudioAPI.GetOrCreateCurrentStateCategory(StudioCategoryName).AddControl(colliderVertical); }
private static void RegisterStudioControls() { if (!StudioAPI.InsideStudio) { return; } var breast = new CurrentStateCategorySwitch("Breast", ocichar => ocichar.charInfo.GetComponent <ColliderController>().BreastCollidersEnabled); breast.Value.Subscribe(value => { bool first = true; foreach (var controller in StudioAPI.GetSelectedControllers <ColliderController>()) { if (first && controller.BreastCollidersEnabled == value) { break; } first = false; controller.BreastCollidersEnabled = value; controller.ApplyBreastColliders(); } }); #if KK || KKS var skirt = new CurrentStateCategorySwitch("Skirt", ocichar => ocichar.charInfo.GetComponent <ColliderController>().SkirtCollidersEnabled); skirt.Value.Subscribe(value => { bool first = true; foreach (var controller in StudioAPI.GetSelectedControllers <ColliderController>()) { if (first && controller.SkirtCollidersEnabled == value) { break; } first = false; controller.SkirtCollidersEnabled = value; controller.ApplySkirtColliders(); } }); #endif var floor = new CurrentStateCategorySwitch("Floor", ocichar => ocichar.charInfo.GetComponent <ColliderController>().FloorColliderEnabled); floor.Value.Subscribe(value => { bool first = true; foreach (var controller in StudioAPI.GetSelectedControllers <ColliderController>()) { if (first && controller.FloorColliderEnabled == value) { break; } first = false; controller.FloorColliderEnabled = value; controller.ApplyFloorCollider(); } }); StudioAPI.GetOrCreateCurrentStateCategory("Colliders").AddControl(breast); #if KK || KKS StudioAPI.GetOrCreateCurrentStateCategory("Colliders").AddControl(skirt); #endif StudioAPI.GetOrCreateCurrentStateCategory("Colliders").AddControl(floor); }