Skip to content

Commit

Permalink
[Crest] Add new crest with gameplay effect - Reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Sep 20, 2022
1 parent 98542ed commit 94ca7d7
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 14 deletions.
5 changes: 3 additions & 2 deletions src/Core_LewdCrestX/CrestType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public enum CrestType
deepfocus,
destruction,
forlorn,
gaze,
reduction,
glow,
gullible,
lactation,
Expand Down Expand Up @@ -61,7 +61,8 @@ public partial class LewdCrestXPlugin
CrestType.triggered,
CrestType.vibrancy,
CrestType.violove,
CrestType.broodmother
CrestType.broodmother,
CrestType.reduction
};
}
}
50 changes: 38 additions & 12 deletions src/Core_LewdCrestX/LewdCrestXBoneModifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,19 @@

namespace KK_LewdCrestX
{
sealed class LewdCrestXBoneModifier : BoneEffect
internal sealed class LewdCrestXBoneModifier : BoneEffect
{
private readonly LewdCrestXController _controller;

// todo might cause issues if in future abmx holds on to the bone modifiers since we reuse them for all characters
private static readonly Dictionary<string, KeyValuePair<Vector3, BoneModifierData>> _vibrancyBoneModifiers;
private static readonly string[] _vibrancyBones;
private float _previousVibRatio;

private static readonly Dictionary<string, BoneModifierData> _lactationModifiers =
new Dictionary<string, BoneModifierData>
{
{"cf_d_bust01_L" , new BoneModifierData(new Vector3(1.2f , 1.2f , 1.2f) , 1f)},
{"cf_d_bust01_R" , new BoneModifierData(new Vector3(1.2f , 1.2f , 1.2f) , 1f)},
{"cf_d_bnip01_L" , new BoneModifierData(new Vector3(1.2f , 1.2f , 1.2f) , 1f)},
{"cf_d_bnip01_R" , new BoneModifierData(new Vector3(1.2f , 1.2f , 1.2f) , 1f)},
};
private static readonly Dictionary<string, BoneModifierData> _lactationModifiers;
private static readonly string[] _lactationBones;
private static readonly Dictionary<string, BoneModifierData> _reductionModifiers;
private static readonly string[] _reductionBones;

private float _previousVibRatio;

public LewdCrestXBoneModifier(LewdCrestXController controller)
{
Expand Down Expand Up @@ -55,8 +50,35 @@ static LewdCrestXBoneModifier()
_vibrancyBoneModifiers = vibDict.ToDictionary(
x => x.Key,
x => new KeyValuePair<Vector3, BoneModifierData>(x.Value, new BoneModifierData(x.Value, 1)));


_lactationModifiers = new Dictionary<string, BoneModifierData>
{
{"cf_d_bust01_L" , new BoneModifierData(new Vector3(1.2f , 1.2f , 1.2f) , 1f)},
{"cf_d_bust01_R" , new BoneModifierData(new Vector3(1.2f , 1.2f , 1.2f) , 1f)},
{"cf_d_bnip01_L" , new BoneModifierData(new Vector3(1.2f , 1.2f , 1.2f) , 1f)},
{"cf_d_bnip01_R" , new BoneModifierData(new Vector3(1.2f , 1.2f , 1.2f) , 1f)},
};
_lactationBones = _lactationModifiers.Keys.ToArray();

_reductionModifiers = new Dictionary<string, BoneModifierData>
{
{"cf_d_bust01_L" , new BoneModifierData(new Vector3(0.8f , 0.8f , 0.8f) , 1f)},
{"cf_d_bust01_R" , new BoneModifierData(new Vector3(0.8f , 0.8f , 0.8f) , 1f)},
{"cf_d_bust02_L" , new BoneModifierData(new Vector3(0.7f , 0.7f , 0.7f) , 1f)},
{"cf_d_bust02_R" , new BoneModifierData(new Vector3(0.7f , 0.7f , 0.7f) , 1f)},
{"cf_s_siri_L" , new BoneModifierData(new Vector3(0.8f , 0.8f , 0.8f) , 1f)},
{"cf_s_siri_R" , new BoneModifierData(new Vector3(0.8f , 0.8f , 0.8f) , 1f)},
{"cf_n_height", new BoneModifierData(new Vector3(0.85f, 0.85f, 0.85f), 1f)},
{"cf_s_waist01", new BoneModifierData( new Vector3(0.9f, 0.9f, 0.9f), 1f)},
{"cf_s_waist02", new BoneModifierData( new Vector3(0.9f, 0.9f, 0.9f), 1f)},
{"cf_s_thigh01_L",new BoneModifierData(new Vector3(0.9f, 0.9f, 0.9f), 1f)},
{"cf_s_thigh01_R",new BoneModifierData(new Vector3(0.9f, 0.9f, 0.9f), 1f)},
{"cf_s_thigh02_L",new BoneModifierData(new Vector3(0.9f, 0.9f, 0.9f), 1f)},
{"cf_s_thigh02_R",new BoneModifierData(new Vector3(0.9f, 0.9f, 0.9f), 1f)},
{"cf_s_thigh03_L",new BoneModifierData(new Vector3(0.9f, 0.9f, 0.9f), 1f)},
{"cf_s_thigh03_R",new BoneModifierData(new Vector3(0.9f, 0.9f, 0.9f), 1f)},
};
_reductionBones = _reductionModifiers.Keys.ToArray();
}

public override IEnumerable<string> GetAffectedBones(BoneController origin)
Expand All @@ -67,6 +89,8 @@ public override IEnumerable<string> GetAffectedBones(BoneController origin)
return _vibrancyBones;
case CrestType.lactation:
return _lactationBones;
case CrestType.reduction:
return _reductionBones;
default:
return Enumerable.Empty<string>();
}
Expand Down Expand Up @@ -101,6 +125,8 @@ public override BoneModifierData GetEffect(string bone, BoneController origin, C
return null;
case CrestType.lactation:
return _lactationModifiers.TryGetValue(bone, out var lactMod) ? lactMod : null;
case CrestType.reduction:
return _reductionModifiers.TryGetValue(bone, out var reductionMod) ? reductionMod : null;
default:
return null;
}
Expand Down
Binary file modified src/Core_LewdCrestX/crests
Binary file not shown.

0 comments on commit 94ca7d7

Please sign in to comment.