Added Human parts

This commit is contained in:
Samuele Lorefice
2024-12-31 04:06:14 +01:00
parent abfde63278
commit 3380ad963c
36 changed files with 266 additions and 35 deletions

View File

@@ -1,3 +1,5 @@
using WaifuCellar.Parts;
namespace WaifuCellar;
[AttributeUsage(AttributeTargets.Property)]

View File

@@ -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<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

6
EPosition.cs Normal file
View File

@@ -0,0 +1,6 @@
namespace WaifuCellar;
public enum EPosition {
Left,
Right
}

5
ISkill.cs Normal file
View File

@@ -0,0 +1,5 @@
namespace WaifuCellar;
public interface ISkill {
}

View File

@@ -1,8 +0,0 @@
namespace WaifuCellar;
public abstract class Part {
public abstract List<IBuff> Buffs { get; set; }
public abstract Part? ParentPart { get; set; }
//Also includes limbs
public abstract List<Part> AttachedParts { get; set; }
}

7
Parts/Base/Anus.cs Normal file
View File

@@ -0,0 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Anus : Part {
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Arm : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Breasts : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Ear : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Eye : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Foot : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Hand : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Head : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Leg : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Mouth : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Penis : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Torso : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

View File

@@ -1,7 +1,7 @@
namespace WaifuCellar.Parts.Base;
public class Vagina : Part {
public override List<IBuff> Buffs { get; set; } = new();
public override List<IBuff> Buffs { get; set; } = [];
public override Part? ParentPart { get; set; }
public override List<Part> AttachedParts { get; set; } = new();
public override List<Part> AttachedParts { get; } = [];
}

7
Parts/EAreolaSize.cs Normal file
View File

@@ -0,0 +1,7 @@
namespace WaifuCellar.Parts;
public enum EAreolaSize {
Small,
Medium,
Large
}

11
Parts/EBreastSize.cs Normal file
View File

@@ -0,0 +1,11 @@
namespace WaifuCellar.Parts;
public enum EBreastSize {
Flat,
Tiny,
Small,
Medium,
Large,
VeryLarge,
Huge
}

9
Parts/Human/HumanAnus.cs Normal file
View File

@@ -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; }
}

7
Parts/Human/HumanArm.cs Normal file
View File

@@ -0,0 +1,7 @@
using WaifuCellar.Parts.Base;
namespace WaifuCellar.Parts.Human;
public class HumanArm : Arm {
}

View File

@@ -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; }
}

7
Parts/Human/HumanEar.cs Normal file
View File

@@ -0,0 +1,7 @@
using WaifuCellar.Parts.Base;
namespace WaifuCellar.Parts.Human;
public sealed class HumanEar : Ear{
}

7
Parts/Human/HumanEye.cs Normal file
View File

@@ -0,0 +1,7 @@
using WaifuCellar.Parts.Base;
namespace WaifuCellar.Parts.Human;
public sealed class HumanEye : Eye {
}

7
Parts/Human/HumanFoot.cs Normal file
View File

@@ -0,0 +1,7 @@
using WaifuCellar.Parts.Base;
namespace WaifuCellar.Parts.Human;
public sealed class HumanFoot : Foot{
}

7
Parts/Human/HumanHand.cs Normal file
View File

@@ -0,0 +1,7 @@
using WaifuCellar.Parts.Base;
namespace WaifuCellar.Parts.Human;
public sealed class HumanHand : Hand {
}

79
Parts/Human/HumanHead.cs Normal file
View File

@@ -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<Part> _attachedParts = [];
public override List<Part> 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;
}
}

7
Parts/Human/HumanLeg.cs Normal file
View File

@@ -0,0 +1,7 @@
using WaifuCellar.Parts.Base;
namespace WaifuCellar.Parts.Human;
public sealed class HumanLeg : Leg{
}

10
Parts/Human/HumanMouth.cs Normal file
View File

@@ -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; }
}

View File

@@ -0,0 +1,7 @@
using WaifuCellar.Parts.Base;
namespace WaifuCellar.Parts.Human;
public sealed class HumanPenis : Penis {
//TODO: add the related stats
}

View File

@@ -0,0 +1,7 @@
using WaifuCellar.Parts.Base;
namespace WaifuCellar.Parts.Human;
public sealed class HumanTorso : Torso {
}

View File

@@ -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; }
}

20
Parts/Part.cs Normal file
View File

@@ -0,0 +1,20 @@
namespace WaifuCellar.Parts;
public abstract class Part {
public abstract List<IBuff> Buffs { get; set; }
public abstract Part? ParentPart { get; set; }
// limbs
public abstract List<Part> 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);
}

View File

@@ -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}");

View File

@@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>latest</LangVersion>
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>