diff --git a/Attributes.cs b/Attributes.cs index 4db0732..e7d7ab4 100644 --- a/Attributes.cs +++ b/Attributes.cs @@ -1,3 +1,5 @@ +using WaifuCellar.Parts; + namespace WaifuCellar; [AttributeUsage(AttributeTargets.Property)] diff --git a/Characters/Character.cs b/Characters/Character.cs index 894a142..8b709d5 100644 --- a/Characters/Character.cs +++ b/Characters/Character.cs @@ -1,3 +1,5 @@ +using WaifuCellar.Parts; + namespace WaifuCellar.Characters; public class Character : Part { @@ -14,7 +16,7 @@ public class Character : Part { [Attribute] public int Agility { get; set; } [State] public int Equilibrium { get; set; } //Only for this part - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/EPosition.cs b/EPosition.cs new file mode 100644 index 0000000..c505262 --- /dev/null +++ b/EPosition.cs @@ -0,0 +1,6 @@ +namespace WaifuCellar; + +public enum EPosition { + Left, + Right +} \ No newline at end of file diff --git a/ISkill.cs b/ISkill.cs new file mode 100644 index 0000000..ad257e4 --- /dev/null +++ b/ISkill.cs @@ -0,0 +1,5 @@ +namespace WaifuCellar; + +public interface ISkill { + +} \ No newline at end of file diff --git a/Part.cs b/Part.cs deleted file mode 100644 index c0d9d20..0000000 --- a/Part.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace WaifuCellar; - -public abstract class Part { - public abstract List Buffs { get; set; } - public abstract Part? ParentPart { get; set; } - //Also includes limbs - public abstract List AttachedParts { get; set; } -} \ No newline at end of file diff --git a/Parts/Base/Anus.cs b/Parts/Base/Anus.cs new file mode 100644 index 0000000..5d7d1e2 --- /dev/null +++ b/Parts/Base/Anus.cs @@ -0,0 +1,7 @@ +namespace WaifuCellar.Parts.Base; + +public class Anus : Part { + public override List Buffs { get; set; } = []; + public override Part? ParentPart { get; set; } + public override List AttachedParts { get; } = []; +} \ No newline at end of file diff --git a/Parts/Base/Arm.cs b/Parts/Base/Arm.cs index 6fd4188..2686d14 100644 --- a/Parts/Base/Arm.cs +++ b/Parts/Base/Arm.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Arm : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Breasts.cs b/Parts/Base/Breasts.cs index d59a34c..804670d 100644 --- a/Parts/Base/Breasts.cs +++ b/Parts/Base/Breasts.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Breasts : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Ear.cs b/Parts/Base/Ear.cs index e73307b..2db01b7 100644 --- a/Parts/Base/Ear.cs +++ b/Parts/Base/Ear.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Ear : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Eye.cs b/Parts/Base/Eye.cs index 6818f93..2f1b8ab 100644 --- a/Parts/Base/Eye.cs +++ b/Parts/Base/Eye.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Eye : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Foot.cs b/Parts/Base/Foot.cs index dc8ac42..c3f4a4e 100644 --- a/Parts/Base/Foot.cs +++ b/Parts/Base/Foot.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Foot : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Hand.cs b/Parts/Base/Hand.cs index 41e3090..8ce1b56 100644 --- a/Parts/Base/Hand.cs +++ b/Parts/Base/Hand.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Hand : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Head.cs b/Parts/Base/Head.cs index eb2cb5b..63a6aee 100644 --- a/Parts/Base/Head.cs +++ b/Parts/Base/Head.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Head : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Leg.cs b/Parts/Base/Leg.cs index 72b9bc4..472b7b5 100644 --- a/Parts/Base/Leg.cs +++ b/Parts/Base/Leg.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Leg : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Mouth.cs b/Parts/Base/Mouth.cs index a9b30aa..e6a016a 100644 --- a/Parts/Base/Mouth.cs +++ b/Parts/Base/Mouth.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Mouth : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Penis.cs b/Parts/Base/Penis.cs index 86ae915..15db196 100644 --- a/Parts/Base/Penis.cs +++ b/Parts/Base/Penis.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Penis : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Torso.cs b/Parts/Base/Torso.cs index 55fb11b..2b2146c 100644 --- a/Parts/Base/Torso.cs +++ b/Parts/Base/Torso.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Torso : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/Base/Vagina.cs b/Parts/Base/Vagina.cs index 21ee768..9c39763 100644 --- a/Parts/Base/Vagina.cs +++ b/Parts/Base/Vagina.cs @@ -1,7 +1,7 @@ namespace WaifuCellar.Parts.Base; public class Vagina : Part { - public override List Buffs { get; set; } = new(); + public override List Buffs { get; set; } = []; public override Part? ParentPart { get; set; } - public override List AttachedParts { get; set; } = new(); + public override List AttachedParts { get; } = []; } \ No newline at end of file diff --git a/Parts/EAreolaSize.cs b/Parts/EAreolaSize.cs new file mode 100644 index 0000000..96f0795 --- /dev/null +++ b/Parts/EAreolaSize.cs @@ -0,0 +1,7 @@ +namespace WaifuCellar.Parts; + +public enum EAreolaSize { + Small, + Medium, + Large +} \ No newline at end of file diff --git a/Parts/EBreastSize.cs b/Parts/EBreastSize.cs new file mode 100644 index 0000000..06b45e5 --- /dev/null +++ b/Parts/EBreastSize.cs @@ -0,0 +1,11 @@ +namespace WaifuCellar.Parts; + +public enum EBreastSize { + Flat, + Tiny, + Small, + Medium, + Large, + VeryLarge, + Huge +} \ No newline at end of file diff --git a/Parts/Human/HumanAnus.cs b/Parts/Human/HumanAnus.cs new file mode 100644 index 0000000..12fabdc --- /dev/null +++ b/Parts/Human/HumanAnus.cs @@ -0,0 +1,9 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanAnus : Anus{ + [Attribute] public float DepthTolerance { get; set; } + [Attribute] public float GirthTolerance { get; set; } + [Trait] public float GirthLimit { get; set; } +} \ No newline at end of file diff --git a/Parts/Human/HumanArm.cs b/Parts/Human/HumanArm.cs new file mode 100644 index 0000000..af7d83c --- /dev/null +++ b/Parts/Human/HumanArm.cs @@ -0,0 +1,7 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public class HumanArm : Arm { + +} \ No newline at end of file diff --git a/Parts/Human/HumanBreasts.cs b/Parts/Human/HumanBreasts.cs new file mode 100644 index 0000000..f0cdc17 --- /dev/null +++ b/Parts/Human/HumanBreasts.cs @@ -0,0 +1,8 @@ +namespace WaifuCellar.Parts.Human; + +public class HumanBreasts { + [Trait] public EBreastSize Size { get; set; } + [Attribute] public float Sensitivity { get; set; } + [Trait] public EAreolaSize AreolaSize { get; set; } + [Attribute] public float AreolaSensitivity { get; set; } +} \ No newline at end of file diff --git a/Parts/Human/HumanEar.cs b/Parts/Human/HumanEar.cs new file mode 100644 index 0000000..a81ab49 --- /dev/null +++ b/Parts/Human/HumanEar.cs @@ -0,0 +1,7 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanEar : Ear{ + +} \ No newline at end of file diff --git a/Parts/Human/HumanEye.cs b/Parts/Human/HumanEye.cs new file mode 100644 index 0000000..14490c9 --- /dev/null +++ b/Parts/Human/HumanEye.cs @@ -0,0 +1,7 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanEye : Eye { + +} \ No newline at end of file diff --git a/Parts/Human/HumanFoot.cs b/Parts/Human/HumanFoot.cs new file mode 100644 index 0000000..fa10f1b --- /dev/null +++ b/Parts/Human/HumanFoot.cs @@ -0,0 +1,7 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanFoot : Foot{ + +} \ No newline at end of file diff --git a/Parts/Human/HumanHand.cs b/Parts/Human/HumanHand.cs new file mode 100644 index 0000000..e853ac2 --- /dev/null +++ b/Parts/Human/HumanHand.cs @@ -0,0 +1,7 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanHand : Hand { + +} \ No newline at end of file diff --git a/Parts/Human/HumanHead.cs b/Parts/Human/HumanHead.cs new file mode 100644 index 0000000..f242f44 --- /dev/null +++ b/Parts/Human/HumanHead.cs @@ -0,0 +1,79 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanHead(Part? parentPart) : Head { + public override Part? ParentPart { get; set; } = parentPart; + private List _attachedParts = []; + public override List AttachedParts => _attachedParts; + + + public Eye? LeftEye { + get; + set { + _attachedParts.Remove(field!); + field = value; + _attachedParts.Add(field!); + } + } + + public Eye? RightEye { + get; + set { + _attachedParts.Remove(field!); + field = value; + _attachedParts.Add(field!); + } + } + + public Mouth? Mouth { + get; + set { + _attachedParts.Remove(field!); + field = value; + _attachedParts.Add(field!); + } + } + + public void AddPart(Eye eye, EPosition position) { + if (position == EPosition.Left) { + LeftEye = eye; + return; + } + + if (position == EPosition.Right) { + RightEye = eye; + return; + } + } + + public override void AddPart(Part part) { + if (part is Eye eye) { + if (LeftEye == null) { + LeftEye = eye; + return; + } + + if (RightEye == null) { + RightEye = eye; + return; + } + } + + if (part is Mouth mouth) { + if (Mouth == null) { + Mouth = mouth; + return; + } + } + + throw new PartNotAttachableException(part, typeof(HumanHead)); + } + + public HumanHead(Part? parentPart, Eye? leftEye, Eye? rightEye, Mouth? mouth) : this(parentPart) { + ParentPart = parentPart; + LeftEye = leftEye; + RightEye = rightEye; + Mouth = mouth; + } +} \ No newline at end of file diff --git a/Parts/Human/HumanLeg.cs b/Parts/Human/HumanLeg.cs new file mode 100644 index 0000000..eebd3bd --- /dev/null +++ b/Parts/Human/HumanLeg.cs @@ -0,0 +1,7 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanLeg : Leg{ + +} \ No newline at end of file diff --git a/Parts/Human/HumanMouth.cs b/Parts/Human/HumanMouth.cs new file mode 100644 index 0000000..183703d --- /dev/null +++ b/Parts/Human/HumanMouth.cs @@ -0,0 +1,10 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanMouth(Part? parentPart) : Mouth { + public override Part? ParentPart { get; set; } = parentPart; + + [Attribute] public float GirthTolerance { get; set; } + [Attribute] public float DepthTolerance { get; set; } +} \ No newline at end of file diff --git a/Parts/Human/HumanPenis.cs b/Parts/Human/HumanPenis.cs new file mode 100644 index 0000000..d55f97e --- /dev/null +++ b/Parts/Human/HumanPenis.cs @@ -0,0 +1,7 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanPenis : Penis { + //TODO: add the related stats +} \ No newline at end of file diff --git a/Parts/Human/HumanTorso.cs b/Parts/Human/HumanTorso.cs new file mode 100644 index 0000000..a943b9b --- /dev/null +++ b/Parts/Human/HumanTorso.cs @@ -0,0 +1,7 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanTorso : Torso { + +} \ No newline at end of file diff --git a/Parts/Human/HumanVagina.cs b/Parts/Human/HumanVagina.cs new file mode 100644 index 0000000..88f53b2 --- /dev/null +++ b/Parts/Human/HumanVagina.cs @@ -0,0 +1,13 @@ +using WaifuCellar.Parts.Base; + +namespace WaifuCellar.Parts.Human; + +public sealed class HumanVagina : Vagina { + [Attribute] public int ClitorisSensitivity { get; set; } + [Attribute] public float DepthTolerance { get; set; } + [Trait] public float DepthLimit { get; set; } + [Attribute] public float GirthTolerance { get; set; } + [Trait] public float GirthLimit { get; set; } + [Attribute] public float GSpotSensitivity { get; set; } + [Attribute] public float CervixSensitivity { get; set; } +} \ No newline at end of file diff --git a/Parts/Part.cs b/Parts/Part.cs new file mode 100644 index 0000000..d5a0b53 --- /dev/null +++ b/Parts/Part.cs @@ -0,0 +1,20 @@ +namespace WaifuCellar.Parts; + +public abstract class Part { + public abstract List Buffs { get; set; } + public abstract Part? ParentPart { get; set; } + // limbs + public abstract List AttachedParts { get; } + + public virtual void AddPart(Part part) { + AttachedParts.Add(part); + part.ParentPart = this; + } + + public virtual void RemovePart(Part part) { + AttachedParts.Remove(part); + part.ParentPart = null; + } + + public virtual void RemoveSelf() => ParentPart?.RemovePart(this); +} \ No newline at end of file diff --git a/Parts/PartNotAttachableException.cs b/Parts/PartNotAttachableException.cs new file mode 100644 index 0000000..a7579d5 --- /dev/null +++ b/Parts/PartNotAttachableException.cs @@ -0,0 +1,4 @@ +namespace WaifuCellar.Parts; + +public class PartNotAttachableException(Part errorPart, Type destPart, string message = "") : Exception( + $"Part {System.Reflection.Assembly.GetAssembly(errorPart.GetType())?.GetName().Name} cannot be attached to {destPart.Name}.\n{message}"); \ No newline at end of file diff --git a/WaifuCellar.csproj b/WaifuCellar.csproj index e0439ac..e8804ba 100644 --- a/WaifuCellar.csproj +++ b/WaifuCellar.csproj @@ -2,7 +2,7 @@ net9.0 - latest + preview enable enable