diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6fdfe2d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "Source/dependencies/rjw"] + path = Source/dependencies/rjw + url = https://gitgud.io/Ed86/rjw.git +[submodule "Source/dependencies/licentia-labs"] + path = Source/dependencies/licentia-labs + url = https://gitgud.io/Jaaldabaoth/licentia-labs diff --git a/1.3/Assemblies/RJW_PlasticSurgeries.dll b/1.3/Assemblies/RJW_PlasticSurgeries.dll index 35fe78c..1981e9e 100644 Binary files a/1.3/Assemblies/RJW_PlasticSurgeries.dll and b/1.3/Assemblies/RJW_PlasticSurgeries.dll differ diff --git a/1.4/Assemblies/RJW_PlasticSurgeries.dll b/1.4/Assemblies/RJW_PlasticSurgeries.dll index 74f2809..4abb372 100644 Binary files a/1.4/Assemblies/RJW_PlasticSurgeries.dll and b/1.4/Assemblies/RJW_PlasticSurgeries.dll differ diff --git a/1.5/Assemblies/RJW_PlasticSurgeries.dll b/1.5/Assemblies/RJW_PlasticSurgeries.dll index af19c04..6cadb50 100644 Binary files a/1.5/Assemblies/RJW_PlasticSurgeries.dll and b/1.5/Assemblies/RJW_PlasticSurgeries.dll differ diff --git a/1.6/Assemblies/RJW_PlasticSurgeries.dll b/1.6/Assemblies/RJW_PlasticSurgeries.dll new file mode 100644 index 0000000..937f39a Binary files /dev/null and b/1.6/Assemblies/RJW_PlasticSurgeries.dll differ diff --git a/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Beautify.xml b/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Beautify.xml new file mode 100644 index 0000000..5d60603 --- /dev/null +++ b/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Beautify.xml @@ -0,0 +1,43 @@ + + + + + Surgery_Beautify + + Surgically beautifies the pawn. + beautifying + Surgery + Recipe_Surgery + MedicalOperationSpeed + Medicine + 0.2 + 400 + true + +
  • Human
  • +
    + 95 + +
  • + + +
  • Medicine
  • + + + 1 + +
    + + +
  • Medicine
  • +
    +
    +
    + + Surgery_Beautify_Beautiful + + Surgically beautifies the pawn. + RJW_PlasticSurgeries.Recipe_Surgery_Beautify_Beautiful + beautify the pawn. + +
    \ No newline at end of file diff --git a/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Mammoplasty.xml b/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Mammoplasty.xml new file mode 100644 index 0000000..c9756a3 --- /dev/null +++ b/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Mammoplasty.xml @@ -0,0 +1,163 @@ + + + + + Surgery_Mammoplasty + + Surgically increases the pawn's breast size by 25%. + + increasing breast size + Surgery + Recipe_Surgery + MedicalOperationSpeed + Medicine + 0.2 + 400 + true + +
  • Human
  • +
    + 95 + +
  • + + +
  • Medicine
  • + + + 1 + +
    + + +
  • Medicine
  • +
    +
    +
    + + Surgery_Mammoplasty_A + + Surgically gives the pawn an A cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_A + alter cup size to A + + + Surgery_Mammoplasty_B + + Surgically gives the pawn an B cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_B + alter cup size to B + + + Surgery_Mammoplasty_C + + Surgically gives the pawn an C cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_C + alter cup size to C + + + Surgery_Mammoplasty_D + + Surgically gives the pawn an D cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_D + alter cup size to D + + + Surgery_Mammoplasty_E + + Surgically gives the pawn an E cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_E + alter cup size to E + + + Surgery_Mammoplasty_F + + Surgically gives the pawn an F cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_F + alter cup size to F + + + Surgery_Mammoplasty_G + + Surgically gives the pawn an G cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_G + alter cup size to G + + + Surgery_Mammoplasty_H + + Surgically gives the pawn an H cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_H + alter cup size to H + + + Surgery_Mammoplasty_J + + Surgically gives the pawn an J cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_J + alter cup size to J + + + Surgery_Mammoplasty_K + + Surgically gives the pawn an K cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_K + alter cup size to K + + + Surgery_Mammoplasty_L + + Surgically gives the pawn an L cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_L + alter cup size to L + + + Surgery_Mammoplasty_M + + Surgically gives the pawn an M cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_M + alter cup size to M + + + Surgery_Mammoplasty_N + + Surgically gives the pawn an N cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_N + alter cup size to N + + + Surgery_Mammoplasty_O + + Surgically gives the pawn an O cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_O + alter cup size to O + + + Surgery_Mammoplasty_P + + Surgically gives the pawn an P cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_P + alter cup size to P + + + Surgery_Mammoplasty_Q + + Surgically gives the pawn an Q cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_Q + alter cup size to Q + + + Surgery_Mammoplasty_R + + Surgically gives the pawn an R cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_R + alter cup size to R + + + Surgery_Mammoplasty_Unknown + + Surgically gives the pawn an ??? cup. + RJW_PlasticSurgeries.Recipe_Surgery_Mammoplasty_Unknown + alter cup size to ??? + +
    \ No newline at end of file diff --git a/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Penoplasty.xml b/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Penoplasty.xml new file mode 100644 index 0000000..3edac14 --- /dev/null +++ b/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Penoplasty.xml @@ -0,0 +1,72 @@ + + + + + Surgery_Penoplasty + + Surgically enlarges the pawn's Penis by 25%. + + enlarging Penis + Surgery + Recipe_Surgery + MedicalOperationSpeed + Medicine + 0.2 + 400 + true + +
  • Human
  • +
    + 95 + +
  • + + +
  • Medicine
  • + + + 1 + +
    + + +
  • Medicine
  • +
    +
    +
    + + Surgery_Penoplasty_Micro + + Surgically gives the pawn an micro Penis. + RJW_PlasticSurgeries.Recipe_Surgery_Penoplasty_Micro + alter Penis size to micro + + + Surgery_Penoplasty_Small + + Surgically gives the pawn an small Penis. + RJW_PlasticSurgeries.Recipe_Surgery_Penoplasty_Small + alter Penis size to small + + + Surgery_Penoplasty_Average + + Surgically gives the pawn an average Penis. + RJW_PlasticSurgeries.Recipe_Surgery_Penoplasty_Average + alter Penis size to average + + + Surgery_Penoplasty_Large + + Surgically gives the pawn an accomodating Penis. + RJW_PlasticSurgeries.Recipe_Surgery_Penoplasty_Large + alter Penis size to large + + + Surgery_Penoplasty_Huge + + Surgically gives the pawn an huge Penis. + RJW_PlasticSurgeries.Recipe_Surgery_Penoplasty_Huge + alter Penis size to huge + +
    \ No newline at end of file diff --git a/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Sphinctoplasty.xml b/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Sphinctoplasty.xml new file mode 100644 index 0000000..578d9db --- /dev/null +++ b/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Sphinctoplasty.xml @@ -0,0 +1,72 @@ + + + + + Surgery_Sphinctoplasty + + Surgically tightens the pawn's Sphincter by 25%. + + tightening Sphincter + Surgery + Recipe_Surgery + MedicalOperationSpeed + Medicine + 0.2 + 400 + true + +
  • Human
  • +
    + 95 + +
  • + + +
  • Medicine
  • + + + 1 + +
    + + +
  • Medicine
  • +
    +
    +
    + + Surgery_Sphinctoplasty_Micro + + Surgically gives the pawn an micro Sphincter. + RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty_Micro + alter Sphincter size to micro + + + Surgery_Sphinctoplasty_Tight + + Surgically gives the pawn an tight Sphincter. + RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty_Tight + alter Sphincter size to tight + + + Surgery_Sphinctoplasty_Average + + Surgically gives the pawn an average Sphincter. + RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty_Average + alter Sphincter size to average + + + Surgery_Sphinctoplasty_Accomodating + + Surgically gives the pawn an accomodating Sphincter. + RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty_Accomodating + alter Sphincter size to accomodating + + + Surgery_Sphinctoplasty_Cavernous + + Surgically gives the pawn an cavernous Sphincter. + RJW_PlasticSurgeries.Recipe_Surgery_Sphinctoplasty_Cavernous + alter Sphincter size to cavernous + +
    \ No newline at end of file diff --git a/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Vaginoplasty.xml b/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Vaginoplasty.xml new file mode 100644 index 0000000..11e9c8e --- /dev/null +++ b/1.6/Defs/Recipe_Surgery/Recipes_Surgery_Vaginoplasty.xml @@ -0,0 +1,72 @@ + + + + + Surgery_Vaginoplasty + + Surgically tightens the pawn's Vagina by 25%. + + tightening Vagina + Surgery + Recipe_Surgery + MedicalOperationSpeed + Medicine + 0.2 + 400 + true + +
  • Human
  • +
    + 95 + +
  • + + +
  • Medicine
  • + + + 1 + +
    + + +
  • Medicine
  • +
    +
    +
    + + Surgery_Vaginoplasty_Micro + + Surgically gives the pawn an micro Vagina. + RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty_Micro + alter Vagina size to micro + + + Surgery_Vaginoplasty_Tight + + Surgically gives the pawn an tight Vagina. + RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty_Tight + alter Vagina size to tight + + + Surgery_Vaginoplasty_Average + + Surgically gives the pawn an average Vagina. + RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty_Average + alter Vagina size to average + + + Surgery_Vaginoplasty_Accomodating + + Surgically gives the pawn an accomodating Vagina. + RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty_Accomodating + alter Vagina size to accomodating + + + Surgery_Vaginoplasty_Cavernous + + Surgically gives the pawn an cavernous Vagina. + RJW_PlasticSurgeries.Recipe_Surgery_Vaginoplasty_Cavernous + alter Vagina size to cavernous + +
    \ No newline at end of file diff --git a/About/About.xml b/About/About.xml index 55aab1b..6cdb3b7 100644 --- a/About/About.xml +++ b/About/About.xml @@ -7,6 +7,7 @@
  • 1.3
  • 1.4
  • 1.5
  • +
  • 1.6
  • Stardust3D.RJW.PlasticSurgeries Surgically alter pawn's genitals. diff --git a/About/Manifest.xml b/About/Manifest.xml index cb4e292..5a51cbc 100644 --- a/About/Manifest.xml +++ b/About/Manifest.xml @@ -2,5 +2,5 @@ RJW PlasticSurgeries - 5400.0.1.8 - \ No newline at end of file + 6010.0.1.8 + diff --git a/Source/RJW_PlasticSurgeries.sln b/Source/RJW_PlasticSurgeries.sln index a8eb130..b0004cd 100644 --- a/Source/RJW_PlasticSurgeries.sln +++ b/Source/RJW_PlasticSurgeries.sln @@ -3,11 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.4.33110.190 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RJW_PlasticSurgeries_1.3", "RJW_PlasticSurgeries\RJW_PlasticSurgeries_1.3.csproj", "{EB363145-6DB4-42CB-B2CB-82DA7AE02A97}" +Project("{EB363145-6DB4-42CB-B2CB-82DA7AE02A97}") = "RJW_PlasticSurgeries_1.3", "RJW_PlasticSurgeries\RJW_PlasticSurgeries_1.3.csproj", "{EB363145-6DB4-42CB-B2CB-82DA7AE02A97}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RJW_PlasticSurgeries_1.4", "RJW_PlasticSurgeries\RJW_PlasticSurgeries_1.4.csproj", "{F17C6B3F-BA9D-4133-A201-1265A64BCB72}" +Project("{F17C6B3F-BA9D-4133-A201-1265A64BCB72}") = "RJW_PlasticSurgeries_1.4", "RJW_PlasticSurgeries\RJW_PlasticSurgeries_1.4.csproj", "{F17C6B3F-BA9D-4133-A201-1265A64BCB72}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RJW_PlasticSurgeries_1.5", "RJW_PlasticSurgeries\RJW_PlasticSurgeries_1.5.csproj", "{02AA6D85-913F-44B8-9C32-6E8024261824}" +Project("{02AA6D85-913F-44B8-9C32-6E8024261824}") = "RJW_PlasticSurgeries_1.5", "RJW_PlasticSurgeries\RJW_PlasticSurgeries_1.5.csproj", "{02AA6D85-913F-44B8-9C32-6E8024261824}" +EndProject +Project("{a543e968-6ecf-46de-8e76-1050188a4050}") = "RJW_PlasticSurgeries_1.6", "RJW_PlasticSurgeries\RJW_PlasticSurgeries_1.6.csproj", "{a543e968-6ecf-46de-8e76-1050188a4050}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -27,6 +29,10 @@ Global {02AA6D85-913F-44B8-9C32-6E8024261824}.Debug|Any CPU.Build.0 = Debug|Any CPU {02AA6D85-913F-44B8-9C32-6E8024261824}.Release|Any CPU.ActiveCfg = Release|Any CPU {02AA6D85-913F-44B8-9C32-6E8024261824}.Release|Any CPU.Build.0 = Release|Any CPU + {a543e968-6ecf-46de-8e76-1050188a4050}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {a543e968-6ecf-46de-8e76-1050188a4050}.Debug|Any CPU.Build.0 = Debug|Any CPU + {a543e968-6ecf-46de-8e76-1050188a4050}.Release|Any CPU.ActiveCfg = Release|Any CPU + {a543e968-6ecf-46de-8e76-1050188a4050}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Source/RJW_PlasticSurgeries/1.5/Recipe_Surgery_Mammoplasty.cs b/Source/RJW_PlasticSurgeries/1.5/Recipe_Surgery_Mammoplasty.cs new file mode 100644 index 0000000..549373c --- /dev/null +++ b/Source/RJW_PlasticSurgeries/1.5/Recipe_Surgery_Mammoplasty.cs @@ -0,0 +1,198 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using rjw; +using Verse; + +namespace RJW_PlasticSurgeries +{ + public abstract class Recipe_Surgery_Mammoplasty : Recipe_Plastic_Surgery + { + protected override BodyPartRecord GetPartCandidate(Pawn pawn) + { + return Genital_Helper.get_genitalsBPR(pawn); + } + + protected override bool HasPart(Pawn pawn, List hediffs) + { + return Genital_Helper.has_breasts(pawn, hediffs) && + pawn.GetBreastList().Any(hed => hed.Severity >= 0.02f); + } + + protected override List GetHediffs(Pawn pawn) + { + throw new NotSupportedException(); + } + + protected void SurgeryCupX(Pawn pawn, int stage) + { + pawn.GetBreastList().ForEach(hed => + { + float severity; + if (TryGetSeverityFromSize(hed, stage, out severity)) hed.Severity = severity; + }); + } + + private static bool TryGetSeverityFromSize(Hediff hediff, float cupSize, out float severity) + { + var list = (hediff.def as HediffDef_SexPart)?.sizeProfile.cupSizes; + + if (list == null) + { + severity = 0f; + return false; + } + + var curve = new SimpleCurve(hediff.def.stages.Zip(list, + (stage, s) => new CurvePoint(s, stage.minSeverity))); + severity = curve.Evaluate(cupSize); + return true; + } + + protected override (HediffDef, float) GetLicentiaDamage() => throw new NotSupportedException(); + } + + public class Recipe_Surgery_Mammoplasty_A : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 1); + } + } + + public class Recipe_Surgery_Mammoplasty_B : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 2); + } + } + + public class Recipe_Surgery_Mammoplasty_C : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 3); + } + } + + public class Recipe_Surgery_Mammoplasty_D : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 4); + } + } + + public class Recipe_Surgery_Mammoplasty_E : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 6); + } + } + + public class Recipe_Surgery_Mammoplasty_F : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 7); + } + } + + public class Recipe_Surgery_Mammoplasty_G : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 9); + } + } + + public class Recipe_Surgery_Mammoplasty_H : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 11); + } + } + + public class Recipe_Surgery_Mammoplasty_J : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 13); + } + } + + public class Recipe_Surgery_Mammoplasty_K : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 15); + } + } + + public class Recipe_Surgery_Mammoplasty_L : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 17); + } + } + + public class Recipe_Surgery_Mammoplasty_M : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 19); + } + } + + public class Recipe_Surgery_Mammoplasty_N : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 21); + } + } + + public class Recipe_Surgery_Mammoplasty_O : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 23); + } + } + + public class Recipe_Surgery_Mammoplasty_P : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 25); + } + } + + public class Recipe_Surgery_Mammoplasty_Q : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 27); + } + } + + public class Recipe_Surgery_Mammoplasty_R : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 29); + } + } + + public class Recipe_Surgery_Mammoplasty_Unknown : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 31); + } + } +} \ No newline at end of file diff --git a/Source/RJW_PlasticSurgeries/1.6/Recipe_Plastic_Surgery.cs b/Source/RJW_PlasticSurgeries/1.6/Recipe_Plastic_Surgery.cs new file mode 100644 index 0000000..3f54ce7 --- /dev/null +++ b/Source/RJW_PlasticSurgeries/1.6/Recipe_Plastic_Surgery.cs @@ -0,0 +1,52 @@ +using System.Collections.Generic; +using RimWorld; +using rjw; +using Verse; + +namespace RJW_PlasticSurgeries +{ + public abstract class Recipe_Plastic_Surgery : Recipe_Surgery + { + public override IEnumerable GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) + { + var part = GetPartCandidate(pawn); + if (part != null) + { + var hediffs = Genital_Helper.get_PartsHediffList(pawn, part); + if (HasPart(pawn, hediffs)) yield return part; + } + } + + protected abstract BodyPartRecord GetPartCandidate(Pawn pawn); + protected abstract bool HasPart(Pawn pawn, List hediffs); + + public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List ingredients, + Bill bill) + { + if (billDoer != null) + { + TaleRecorder.RecordTale(TaleDefOf.DidSurgery, billDoer, pawn); + SurgeryResult(pawn); + } + } + + protected abstract void SurgeryResult(Pawn pawn); + + protected void SurgeryX(Pawn pawn, float severity, bool damagePart = false) + { + GetHediffs(pawn).ForEach(hed => + { + hed.Severity = severity; + /* if (damagePart) + { + var dmg = HediffDef.Named(); + hed.pawn.health.AddHediff(dmg); + var (type, damage) = GetLicentiaDamage(); + LicentiaLabs.DamageHelper.ApplyDamage(pawn, hed.Part, type, damage); + } */ + }); + } + + protected abstract List GetHediffs(Pawn pawn); + } +} \ No newline at end of file diff --git a/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Beautify.cs b/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Beautify.cs new file mode 100644 index 0000000..bdf4023 --- /dev/null +++ b/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Beautify.cs @@ -0,0 +1,61 @@ +using System.Collections.Generic; +using RimWorld; +using Verse; +using static rjw.VanillaTraitDefOf; + +namespace RJW_PlasticSurgeries +{ + /// + public abstract class Recipe_Surgery_Beautify : Recipe_Surgery + { + /// + public override IEnumerable GetPartsToApplyOn(Pawn pawn, RecipeDef recipe) + { + if (!pawn.story.traits.HasTrait(Beauty) || + pawn.story.traits.HasTrait(Beauty) && pawn.story.traits.GetTrait(Beauty).Degree < 2) + yield return pawn.RaceProps.body.corePart; + } + + /// + public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List ingredients, + Bill bill) + { + if (billDoer != null) + { + TaleRecorder.RecordTale(TaleDefOf.DidSurgery, billDoer, pawn); + SurgeryResult(pawn); + } + } + + /// + /// + /// + /// + public abstract void SurgeryResult(Pawn pawn); + + /// + /// Setts the severity of the Beautiful trait for the selected pawn. + /// If the trait doesn't exist in the pawns traits, it will be added. + /// + /// the pawn to modify + /// the new severity of the pawn's Beautiful trait + protected void SurgeryX(Pawn pawn, int severity) + { + if (pawn.story.traits.HasTrait(Beauty)) + { + pawn.story.traits.allTraits.FindAll(t => Beauty.ConflictsWith(t)) + .ForEach(t => pawn.story.traits.RemoveTrait(t)); + pawn.story.traits.RemoveTrait(pawn.story.traits.allTraits.Find(t => t.def == Beauty)); + } + + pawn.story.traits.GainTrait(new Trait(Beauty, severity)); + } + } + + /// + public class Recipe_Surgery_Beautify_Beautiful : Recipe_Surgery_Beautify + { + /// + public override void SurgeryResult(Pawn pawn) => SurgeryX(pawn, 2); + } +} \ No newline at end of file diff --git a/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Mammoplasty.cs b/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Mammoplasty.cs new file mode 100644 index 0000000..2ef03a6 --- /dev/null +++ b/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Mammoplasty.cs @@ -0,0 +1,196 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using rjw; +using Verse; + +namespace RJW_PlasticSurgeries +{ + public abstract class Recipe_Surgery_Mammoplasty : Recipe_Plastic_Surgery + { + protected override BodyPartRecord GetPartCandidate(Pawn pawn) + { + return Genital_Helper.get_genitalsBPR(pawn); + } + + protected override bool HasPart(Pawn pawn, List hediffs) + { + return Genital_Helper.has_breasts(pawn, hediffs) && + pawn.GetBreastList().Any(hed => hed.Severity >= 0.02f); + } + + protected override List GetHediffs(Pawn pawn) + { + throw new NotSupportedException(); + } + + protected void SurgeryCupX(Pawn pawn, int stage) + { + pawn.GetBreastList().ForEach(hed => + { + float severity; + if (TryGetSeverityFromSize(hed, stage, out severity)) hed.Severity = severity; + }); + } + + private static bool TryGetSeverityFromSize(Hediff hediff, float cupSize, out float severity) + { + var list = (hediff.def as HediffDef_SexPart)?.sizeProfile.cupSizes; + + if (list == null) + { + severity = 0f; + return false; + } + + var curve = new SimpleCurve(hediff.def.stages.Zip(list, + (stage, s) => new CurvePoint(s, stage.minSeverity))); + severity = curve.Evaluate(cupSize); + return true; + } + } + + public class Recipe_Surgery_Mammoplasty_A : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 1); + } + } + + public class Recipe_Surgery_Mammoplasty_B : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 2); + } + } + + public class Recipe_Surgery_Mammoplasty_C : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 3); + } + } + + public class Recipe_Surgery_Mammoplasty_D : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 4); + } + } + + public class Recipe_Surgery_Mammoplasty_E : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 6); + } + } + + public class Recipe_Surgery_Mammoplasty_F : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 7); + } + } + + public class Recipe_Surgery_Mammoplasty_G : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 9); + } + } + + public class Recipe_Surgery_Mammoplasty_H : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 11); + } + } + + public class Recipe_Surgery_Mammoplasty_J : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 13); + } + } + + public class Recipe_Surgery_Mammoplasty_K : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 15); + } + } + + public class Recipe_Surgery_Mammoplasty_L : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 17); + } + } + + public class Recipe_Surgery_Mammoplasty_M : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 19); + } + } + + public class Recipe_Surgery_Mammoplasty_N : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 21); + } + } + + public class Recipe_Surgery_Mammoplasty_O : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 23); + } + } + + public class Recipe_Surgery_Mammoplasty_P : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 25); + } + } + + public class Recipe_Surgery_Mammoplasty_Q : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 27); + } + } + + public class Recipe_Surgery_Mammoplasty_R : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 29); + } + } + + public class Recipe_Surgery_Mammoplasty_Unknown : Recipe_Surgery_Mammoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryCupX(pawn, 31); + } + } +} \ No newline at end of file diff --git a/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Penoplasty.cs b/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Penoplasty.cs new file mode 100644 index 0000000..f52b6c6 --- /dev/null +++ b/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Penoplasty.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using rjw; +using Verse; + +namespace RJW_PlasticSurgeries +{ + public abstract class Recipe_Surgery_Penoplasty : Recipe_Plastic_Surgery + { + protected override BodyPartRecord GetPartCandidate(Pawn pawn) + { + return Genital_Helper.get_genitalsBPR(pawn); + } + + protected override bool HasPart(Pawn pawn, List hediffs) + { + return Genital_Helper.has_penis_fertile(pawn, hediffs) || + Genital_Helper.has_penis_infertile(pawn, hediffs); + } + + protected override List GetHediffs(Pawn pawn) + { + return pawn.GetGenitalsList().FindAll(Genital_Helper.is_penis); + } + } + + public class Recipe_Surgery_Penoplasty_Micro : Recipe_Surgery_Penoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.1f, true); + } + } + + public class Recipe_Surgery_Penoplasty_Small : Recipe_Surgery_Penoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.3f, true); + } + } + + public class Recipe_Surgery_Penoplasty_Average : Recipe_Surgery_Penoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.5f, true); + } + } + + public class Recipe_Surgery_Penoplasty_Large : Recipe_Surgery_Penoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.7f, true); + } + } + + public class Recipe_Surgery_Penoplasty_Huge : Recipe_Surgery_Penoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.9f, true); + } + } +} \ No newline at end of file diff --git a/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Sphinctoplasty.cs b/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Sphinctoplasty.cs new file mode 100644 index 0000000..251f5b9 --- /dev/null +++ b/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Sphinctoplasty.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using rjw; +using Verse; + +namespace RJW_PlasticSurgeries +{ + public abstract class Recipe_Surgery_Sphinctoplasty : Recipe_Plastic_Surgery + { + protected override BodyPartRecord GetPartCandidate(Pawn pawn) + { + return Genital_Helper.get_anusBPR(pawn); + } + + protected override bool HasPart(Pawn pawn, List hediffs) + { + return Genital_Helper.has_anus(pawn, hediffs); + } + + protected override List GetHediffs(Pawn pawn) + { + return pawn.GetAnusList(); + } + } + + public class Recipe_Surgery_Sphinctoplasty_Micro : Recipe_Surgery_Sphinctoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.1f, true); + } + } + + public class Recipe_Surgery_Sphinctoplasty_Tight : Recipe_Surgery_Sphinctoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.3f, true); + } + } + + public class Recipe_Surgery_Sphinctoplasty_Average : Recipe_Surgery_Sphinctoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.5f, true); + } + } + + public class Recipe_Surgery_Sphinctoplasty_Accomodating : Recipe_Surgery_Sphinctoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.7f, true); + } + } + + public class Recipe_Surgery_Sphinctoplasty_Cavernous : Recipe_Surgery_Sphinctoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.9f, true); + } + } +} \ No newline at end of file diff --git a/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Vaginoplasty.cs b/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Vaginoplasty.cs new file mode 100644 index 0000000..f9a457f --- /dev/null +++ b/Source/RJW_PlasticSurgeries/1.6/Recipe_Surgery_Vaginoplasty.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using rjw; +using Verse; + +namespace RJW_PlasticSurgeries +{ + public abstract class Recipe_Surgery_Vaginoplasty : Recipe_Plastic_Surgery + { + protected override BodyPartRecord GetPartCandidate(Pawn pawn) + { + return Genital_Helper.get_genitalsBPR(pawn); + } + + protected override bool HasPart(Pawn pawn, List hediffs) + { + return Genital_Helper.has_vagina(pawn, hediffs); + } + + protected override List GetHediffs(Pawn pawn) + { + return pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina); + } + } + + public class Recipe_Surgery_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.1f, true); + } + } + + public class Recipe_Surgery_Vaginoplasty_Tight : Recipe_Surgery_Vaginoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.3f, true); + } + } + + public class Recipe_Surgery_Vaginoplasty_Average : Recipe_Surgery_Vaginoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.5f, true); + } + } + + public class Recipe_Surgery_Vaginoplasty_Accomodating : Recipe_Surgery_Vaginoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.7f, true); + } + } + + public class Recipe_Surgery_Vaginoplasty_Cavernous : Recipe_Surgery_Vaginoplasty + { + protected override void SurgeryResult(Pawn pawn) + { + SurgeryX(pawn, 0.9f, true); + } + } +} \ No newline at end of file diff --git a/Source/RJW_PlasticSurgeries/1.6/VanillaTraitDefOf.cs b/Source/RJW_PlasticSurgeries/1.6/VanillaTraitDefOf.cs new file mode 100644 index 0000000..918c7ca --- /dev/null +++ b/Source/RJW_PlasticSurgeries/1.6/VanillaTraitDefOf.cs @@ -0,0 +1,26 @@ +using Verse; +using RimWorld; + +namespace rjw +{ + [DefOf] + public static class VanillaTraitDefOf + { + public static TraitDef Tough; + + public static TraitDef Nerves; + + public static TraitDef Beauty; + + public static TraitDef TooSmart; + + public static TraitDef NaturalMood; + + public static TraitDef Cannibal; + + static VanillaTraitDefOf() + { + DefOfHelper.EnsureInitializedInCtor(typeof(VanillaTraitDefOf)); + } + } +} \ No newline at end of file diff --git a/Source/RJW_PlasticSurgeries/About/About.xml b/Source/RJW_PlasticSurgeries/About/About.xml index 55aab1b..6cdb3b7 100644 --- a/Source/RJW_PlasticSurgeries/About/About.xml +++ b/Source/RJW_PlasticSurgeries/About/About.xml @@ -7,6 +7,7 @@
  • 1.3
  • 1.4
  • 1.5
  • +
  • 1.6
  • Stardust3D.RJW.PlasticSurgeries Surgically alter pawn's genitals. diff --git a/Source/RJW_PlasticSurgeries/About/Manifest.xml b/Source/RJW_PlasticSurgeries/About/Manifest.xml index cb4e292..5a51cbc 100644 --- a/Source/RJW_PlasticSurgeries/About/Manifest.xml +++ b/Source/RJW_PlasticSurgeries/About/Manifest.xml @@ -2,5 +2,5 @@ RJW PlasticSurgeries - 5400.0.1.8 - \ No newline at end of file + 6010.0.1.8 + diff --git a/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.3.csproj b/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.3.csproj index 71b95a0..03cd9ff 100644 --- a/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.3.csproj +++ b/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.3.csproj @@ -13,10 +13,10 @@ 11 - ©2024 Stardust3D + ©2025 Stardust3D Stardust3D - 5400.0.1.8 - 5400.0.1.8 + 6010.0.1.8 + 6010.0.1.8 true RJW_PlasticSurgeries.snk Surgically alter pawn's genitals. @@ -28,6 +28,7 @@ + @@ -37,18 +38,20 @@ - ..\..\..\licentia-labs\Assemblies\LicentiaLabs.dll + ..\dependencies\licentia-labs\Assemblies\LicentiaLabs.dll - ..\..\..\rjw-base\1.3\Assemblies\RJW.dll + ..\dependencies\rjw\1.3\Assemblies\RJW.dll + + - \ No newline at end of file + diff --git a/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.4.csproj b/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.4.csproj index ea6ba56..a78de7e 100644 --- a/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.4.csproj +++ b/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.4.csproj @@ -13,10 +13,10 @@ 11 - ©2024 Stardust3D + ©2025 Stardust3D Stardust3D - 5400.0.1.8 - 5400.0.1.8 + 6010.0.1.8 + 6010.0.1.8 true RJW_PlasticSurgeries.snk Surgically alter pawn's genitals. @@ -28,6 +28,7 @@ + @@ -37,19 +38,21 @@ - ..\..\..\licentia-labs\Assemblies\LicentiaLabs.dll + ..\dependencies\licentia-labs\Assemblies\LicentiaLabs.dll - ..\..\..\rjw-base\1.4\Assemblies\RJW.dll + ..\dependencies\rjw\1.4\Assemblies\RJW.dll + + diff --git a/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.5.csproj b/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.5.csproj index 925f7cc..ebe37b1 100644 --- a/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.5.csproj +++ b/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.5.csproj @@ -13,10 +13,10 @@ 11 - ©2024 Stardust3D + ©2025 Stardust3D Stardust3D - 5400.0.1.8 - 5400.0.1.8 + 6010.0.1.8 + 6010.0.1.8 true RJW_PlasticSurgeries.snk Surgically alter pawn's genitals. @@ -28,29 +28,33 @@ + - + - ..\..\..\licentia-labs\Assemblies\LicentiaLabs.dll + ..\dependencies\licentia-labs\Assemblies\LicentiaLabs.dll - ..\..\..\rjw-base\1.5\Assemblies\RJW.dll + ..\dependencies\rjw\1.5\Assemblies\RJW.dll + + + diff --git a/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.6.csproj b/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.6.csproj new file mode 100644 index 0000000..f62c814 --- /dev/null +++ b/Source/RJW_PlasticSurgeries/RJW_PlasticSurgeries_1.6.csproj @@ -0,0 +1,59 @@ + + + + Debug + AnyCPU + {a543e968-6ecf-46de-8e76-1050188a4050} + Library + Properties + RJW_PlasticSurgeries + RJW_PlasticSurgeries + net48 + 512 + + + 11 + ©2025 Stardust3D + Stardust3D + 6010.0.1.8 + 6010.0.1.8 + true + RJW_PlasticSurgeries.snk + Surgically alter pawn's genitals. + + + bin\Release\1.6\ + + + + + + + + + + + + + + + ..\dependencies\rjw\1.6\Assemblies\RJW.dll + + + + + + + + + + + + + + + + + + + diff --git a/Source/build.gradle.kts b/Source/build.gradle.kts index f803ceb..82195ed 100644 --- a/Source/build.gradle.kts +++ b/Source/build.gradle.kts @@ -1,9 +1,9 @@ plugins { - alias(libs.plugins.msbuild) + alias(libs.plugins.msbuild) alias(libs.plugins.versions) } -version = "5400.0.1.8" +version = "6010.0.1.8" val friendlyName = "rjw-plasticsurgeries" tasks.register("buildC#_1.3") { @@ -42,10 +42,22 @@ tasks.register("buildC#_1.5") { // destinationDir = "build/msbuild/bin" } +tasks.register("buildC#_1.6") { + // either a solution file + // solutionFile = "${rootProject.name}.sln" + // or a project file (.csproj or .vbproj) + projectFile = file("${rootProject.name}/${rootProject.name}_1.6.csproj") + + targets = listOf("Restore", "Clean", "Rebuild") + configuration = "Release" + + // destinationDir = "build/msbuild/bin" +} + tasks.register("sign_1.3") { dependsOn("buildC#_1.3") workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.3/net472") - executable = "H:\\Windows Kits\\10\\bin\\10.0.22621.0\\x64\\signtool.exe" + executable = "C:\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\\signtool.exe" args = listOf( "sign", "/seal", @@ -63,7 +75,7 @@ tasks.register("sign_1.3") { tasks.register("sign_1.4") { dependsOn("buildC#_1.4") workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.4/net472") - executable = "H:\\Windows Kits\\10\\bin\\10.0.22621.0\\x64\\signtool.exe" + executable = "C:\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\\signtool.exe" args = listOf( "sign", "/seal", @@ -81,7 +93,25 @@ tasks.register("sign_1.4") { tasks.register("sign_1.5") { dependsOn("buildC#_1.5") workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.5/net48") - executable = "H:\\Windows Kits\\10\\bin\\10.0.22621.0\\x64\\signtool.exe" + executable = "C:\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\\signtool.exe" + args = listOf( + "sign", + "/seal", + "/t", + "http://timestamp.digicert.com", + "/a", + "/n", + "Stardust3D", + "/fd", + "certHash", + "${rootProject.name}.dll" + ) +} + +tasks.register("sign_1.6") { + dependsOn("buildC#_1.6") + workingDir = project.projectDir.resolve("${rootProject.name}/bin/Release/1.6/net48") + executable = "C:\\Windows Kits\\10\\bin\\10.0.26100.0\\x64\\signtool.exe" args = listOf( "sign", "/seal", @@ -97,7 +127,7 @@ tasks.register("sign_1.5") { } tasks.register("copy") { - dependsOn("copy_1.3", "copy_1.4", "copy_1.5", "copy_about") + dependsOn("copy_1.3", "copy_1.4", "copy_1.5", "copy_1.6", "copy_about") } tasks.register("copy_about") { @@ -108,8 +138,8 @@ tasks.register("copy_about") { tasks.register("copy_1.3") { dependsOn("copyDll_1.3") dependsOn("copyDefs_1.3") - - from(project.projectDir.resolve("${rootProject.name}/1.3")){ + + from(project.projectDir.resolve("${rootProject.name}/1.3")) { exclude("**/*.cs") } into(project.projectDir.parentFile.resolve("1.3")) @@ -118,8 +148,8 @@ tasks.register("copy_1.3") { tasks.register("copy_1.4") { dependsOn("copyDll_1.4") dependsOn("copyDefs_1.4") - - from(project.projectDir.resolve("${rootProject.name}/1.4")){ + + from(project.projectDir.resolve("${rootProject.name}/1.4")) { exclude("**/*.cs") } into(project.projectDir.parentFile.resolve("1.4")) @@ -128,13 +158,23 @@ tasks.register("copy_1.4") { tasks.register("copy_1.5") { dependsOn("copyDll_1.5") dependsOn("copyDefs_1.5") - - from(project.projectDir.resolve("${rootProject.name}/1.5")){ + + from(project.projectDir.resolve("${rootProject.name}/1.5")) { exclude("**/*.cs") } into(project.projectDir.parentFile.resolve("1.5")) } +tasks.register("copy_1.6") { + dependsOn("copyDll_1.6") + dependsOn("copyDefs_1.6") + + from(project.projectDir.resolve("${rootProject.name}/1.6")) { + exclude("**/*.cs") + } + into(project.projectDir.parentFile.resolve("1.6")) +} + tasks.register("copyDll_1.3") { dependsOn("sign_1.3") from(project.projectDir.resolve("${rootProject.name}/bin/Release/1.3/net472/${rootProject.name}.dll")) @@ -153,6 +193,12 @@ tasks.register("copyDll_1.5") { into(project.projectDir.parentFile.resolve("1.5/Assemblies")) } +tasks.register("copyDll_1.6") { + dependsOn("sign_1.6") + from(project.projectDir.resolve("${rootProject.name}/bin/Release/1.6/net48/${rootProject.name}.dll")) + into(project.projectDir.parentFile.resolve("1.6/Assemblies")) +} + tasks.register("copyDefs_1.3") { from(project.projectDir.resolve("${rootProject.name}/Defs")) into(project.projectDir.parentFile.resolve("1.3/Defs")) @@ -168,6 +214,11 @@ tasks.register("copyDefs_1.5") { into(project.projectDir.parentFile.resolve("1.5/Defs")) } +tasks.register("copyDefs_1.6") { + from(project.projectDir.resolve("${rootProject.name}/Defs")) + into(project.projectDir.parentFile.resolve("1.6/Defs")) +} + tasks.register("buildZip") { dependsOn("clean", ":copy") into("$friendlyName/1.3") { @@ -179,6 +230,9 @@ tasks.register("buildZip") { into("$friendlyName/1.5") { from(project.projectDir.parentFile.resolve("1.5")) } + into("$friendlyName/1.6") { + from(project.projectDir.parentFile.resolve("1.6")) + } into("$friendlyName/About") { from(project.projectDir.parentFile.resolve("About")) } @@ -196,6 +250,7 @@ tasks.clean { delete.add(project.projectDir.parentFile.resolve("1.3")) delete.add(project.projectDir.parentFile.resolve("1.4")) delete.add(project.projectDir.parentFile.resolve("1.5")) + delete.add(project.projectDir.parentFile.resolve("1.6")) delete.add(project.projectDir.parentFile.resolve("About")) } diff --git a/Source/dependencies/licentia-labs b/Source/dependencies/licentia-labs new file mode 160000 index 0000000..938d073 --- /dev/null +++ b/Source/dependencies/licentia-labs @@ -0,0 +1 @@ +Subproject commit 938d073bb2617c5f11b2807ba5444f6b127ae495 diff --git a/Source/dependencies/rjw b/Source/dependencies/rjw new file mode 160000 index 0000000..05ce596 --- /dev/null +++ b/Source/dependencies/rjw @@ -0,0 +1 @@ +Subproject commit 05ce5962c765cbb4368cec4913fac1a5b20c2773 diff --git a/Source/global.json b/Source/global.json index 2ddda36..93681ff 100644 --- a/Source/global.json +++ b/Source/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.0", + "version": "9.0.0", "rollForward": "latestMinor", "allowPrerelease": false } diff --git a/Source/gradle.properties b/Source/gradle.properties new file mode 100644 index 0000000..4418fa6 --- /dev/null +++ b/Source/gradle.properties @@ -0,0 +1 @@ +org.gradle.configuration-cache=false \ No newline at end of file diff --git a/Source/gradle/libs.versions.toml b/Source/gradle/libs.versions.toml index de22e81..2bad09b 100644 --- a/Source/gradle/libs.versions.toml +++ b/Source/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] -versions = "0.51.0" -msbuild = "4.6" +versions = "0.53.0" +msbuild = "4.7" [libraries] diff --git a/Source/gradle/wrapper/gradle-wrapper.jar b/Source/gradle/wrapper/gradle-wrapper.jar index e644113..8bdaf60 100644 Binary files a/Source/gradle/wrapper/gradle-wrapper.jar and b/Source/gradle/wrapper/gradle-wrapper.jar differ diff --git a/Source/gradle/wrapper/gradle-wrapper.properties b/Source/gradle/wrapper/gradle-wrapper.properties index a441313..d4081da 100644 --- a/Source/gradle/wrapper/gradle-wrapper.properties +++ b/Source/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/Source/gradlew b/Source/gradlew index b740cf1..adff685 100644 --- a/Source/gradlew +++ b/Source/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -84,7 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -112,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -170,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -203,15 +203,14 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/Source/gradlew.bat b/Source/gradlew.bat index 25da30d..c4bdd3a 100644 --- a/Source/gradlew.bat +++ b/Source/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -68,11 +70,10 @@ goto fail :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* :end @rem End local scope for the variables with windows NT shell