mirror of
https://gitgud.io/Stardust3D/rjw-plasticsurgeries.git
synced 2024-08-14 23:57:25 +00:00
Compare commits
No commits in common. "c428ee52eab6be1ab345fad8fcf98a767acd559c" and "efc6576db115e6c40aaa580e1e53c5c70ddd22bc" have entirely different histories.
c428ee52ea
...
efc6576db1
18 changed files with 32 additions and 215 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -6,7 +6,6 @@
|
|||
<supportedVersions>
|
||||
<li>1.3</li>
|
||||
<li>1.4</li>
|
||||
<li>1.5</li>
|
||||
</supportedVersions>
|
||||
<packageId>Stardust3D.RJW.PlasticSurgeries</packageId>
|
||||
<description>Surgically alter pawn's genitals.</description>
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
<Manifest>
|
||||
<identifier>RJW PlasticSurgeries</identifier>
|
||||
<version>5400.0.1.7</version>
|
||||
<version>5390.0.1.6</version>
|
||||
</Manifest>
|
|
@ -1,61 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using RimWorld;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_PlasticSurgeries
|
||||
{
|
||||
public abstract class Recipe_Plastic_Surgery : Recipe_Surgery
|
||||
{
|
||||
protected readonly bool HasDyspareunia = false; // ModLister.HasActiveModWithName("Dyspareunia");
|
||||
protected readonly bool HasLicentia = ModLister.HasActiveModWithName("RimJobWorld - Licentia Labs");
|
||||
|
||||
public override IEnumerable<BodyPartRecord> 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<Hediff> hediffs);
|
||||
|
||||
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients,
|
||||
Bill bill)
|
||||
{
|
||||
if (billDoer != null)
|
||||
{
|
||||
TaleRecorder.RecordTale(TaleDefOf.DidSurgery, billDoer, pawn);
|
||||
SurgeryResult(pawn);
|
||||
}
|
||||
}
|
||||
|
||||
protected abstract void SurgeryResult(Pawn pawn);
|
||||
|
||||
|
||||
/// <Compatibility />
|
||||
private static void DamageHediff(Hediff hed)
|
||||
{
|
||||
}
|
||||
|
||||
protected void SurgeryX(Pawn pawn, float severity, bool damagePart = false)
|
||||
{
|
||||
GetHediffs(pawn).ForEach(hed =>
|
||||
{
|
||||
hed.Severity = severity;
|
||||
if (damagePart && HasDyspareunia) DamageHediff(hed);
|
||||
if (damagePart && HasLicentia)
|
||||
{
|
||||
var (type, damage) = GetLicentiaDamage();
|
||||
LicentiaLabs.DamageHelper.ApplyDamage(pawn, hed.Part, type, damage);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected abstract List<Hediff> GetHediffs(Pawn pawn);
|
||||
protected abstract (HediffDef, float) GetLicentiaDamage();
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
using RimWorld;
|
||||
using Verse;
|
||||
using static rjw.VanillaTraitDefOf;
|
||||
|
||||
namespace RJW_PlasticSurgeries
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public abstract class Recipe_Surgery_Beautify : Recipe_Surgery
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override IEnumerable<BodyPartRecord> 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;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients,
|
||||
Bill bill)
|
||||
{
|
||||
if (billDoer != null)
|
||||
{
|
||||
TaleRecorder.RecordTale(TaleDefOf.DidSurgery, billDoer, pawn);
|
||||
SurgeryResult(pawn);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pawn"></param>
|
||||
public abstract void SurgeryResult(Pawn pawn);
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="pawn">the pawn to modify</param>
|
||||
/// <param name="severity">the new severity of the pawn's Beautiful trait</param>
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public class Recipe_Surgery_Beautify_Beautiful : Recipe_Surgery_Beautify
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void SurgeryResult(Pawn pawn) => SurgeryX(pawn, 2);
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@
|
|||
<supportedVersions>
|
||||
<li>1.3</li>
|
||||
<li>1.4</li>
|
||||
<li>1.5</li>
|
||||
</supportedVersions>
|
||||
<packageId>Stardust3D.RJW.PlasticSurgeries</packageId>
|
||||
<description>Surgically alter pawn's genitals.</description>
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
<Manifest>
|
||||
<identifier>RJW PlasticSurgeries</identifier>
|
||||
<version>5400.0.1.7</version>
|
||||
<version>5390.0.1.6</version>
|
||||
</Manifest>
|
|
@ -15,8 +15,8 @@
|
|||
<LangVersion>11</LangVersion>
|
||||
<Copyright>©2024 Stardust3D</Copyright>
|
||||
<Company>Stardust3D</Company>
|
||||
<AssemblyVersion>5400.0.1.7</AssemblyVersion>
|
||||
<FileVersion>5400.0.1.7</FileVersion>
|
||||
<AssemblyVersion>5390.0.1.6</AssemblyVersion>
|
||||
<FileVersion>5390.0.1.6</FileVersion>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>RJW_PlasticSurgeries.snk</AssemblyOriginatorKeyFile>
|
||||
<Description>Surgically alter pawn's genitals.</Description>
|
||||
|
@ -31,7 +31,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lib.Harmony" Version="2.3.3" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.2" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.3.3389" />
|
||||
<PackageReference Include="UnlimitedHugs.Rimworld.HugsLib" Version="11.0.3" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
<LangVersion>11</LangVersion>
|
||||
<Copyright>©2024 Stardust3D</Copyright>
|
||||
<Company>Stardust3D</Company>
|
||||
<AssemblyVersion>5400.0.1.7</AssemblyVersion>
|
||||
<FileVersion>5400.0.1.7</FileVersion>
|
||||
<AssemblyVersion>5390.0.1.6</AssemblyVersion>
|
||||
<FileVersion>5390.0.1.6</FileVersion>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>RJW_PlasticSurgeries.snk</AssemblyOriginatorKeyFile>
|
||||
<Description>Surgically alter pawn's genitals.</Description>
|
||||
|
@ -31,7 +31,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lib.Harmony" Version="2.3.3" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.2" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.4.3901" />
|
||||
<PackageReference Include="UnlimitedHugs.Rimworld.HugsLib" Version="11.0.3" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
<LangVersion>11</LangVersion>
|
||||
<Copyright>©2024 Stardust3D</Copyright>
|
||||
<Company>Stardust3D</Company>
|
||||
<AssemblyVersion>5400.0.1.7</AssemblyVersion>
|
||||
<FileVersion>5400.0.1.7</FileVersion>
|
||||
<AssemblyVersion>5390.0.1.6</AssemblyVersion>
|
||||
<FileVersion>5390.0.1.6</FileVersion>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>RJW_PlasticSurgeries.snk</AssemblyOriginatorKeyFile>
|
||||
<Description>Surgically alter pawn's genitals.</Description>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<OutputPath>bin\Release\1.5\</OutputPath>
|
||||
<OutputPath>bin\Release\1.4\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="RJW_PlasticSurgeries.snk" />
|
||||
|
@ -31,14 +31,14 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Lib.Harmony" Version="2.3.3" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.2" />
|
||||
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.5.4104" />
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.5.4055-beta" />
|
||||
<PackageReference Include="UnlimitedHugs.Rimworld.HugsLib" Version="11.0.3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!--<Reference Include="Dyspareunia">
|
||||
<Reference Include="Dyspareunia">
|
||||
<HintPath>..\..\..\dyspareunia\1.5\Assemblies\Dyspareunia.dll</HintPath>
|
||||
</Reference>-->
|
||||
</Reference>
|
||||
<Reference Include="LicentiaLabs">
|
||||
<HintPath>..\..\..\licentia-labs\Assemblies\LicentiaLabs.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -49,8 +49,6 @@
|
|||
<ItemGroup>
|
||||
<Compile Remove="1.3\**" />
|
||||
<Compile Remove="1.4\**" />
|
||||
<Compile Remove="Recipe_Plastic_Surgery.cs" />
|
||||
<Compile Remove="Recipe_Surgery_Beautify.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Remove="1.3\**" />
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using LicentiaLabs;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
@ -24,15 +23,8 @@ namespace RJW_PlasticSurgeries
|
|||
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_penis);
|
||||
}
|
||||
|
||||
protected override (HediffDef, float) GetLicentiaDamage()
|
||||
{
|
||||
if (HasLicentia)
|
||||
{
|
||||
return (Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
}
|
||||
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
protected override (HediffDef, float) GetLicentiaDamage() =>
|
||||
(Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Penoplasty_Micro : Recipe_Surgery_Penoplasty
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using LicentiaLabs;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
@ -22,16 +21,9 @@ namespace RJW_PlasticSurgeries
|
|||
{
|
||||
return pawn.GetAnusList();
|
||||
}
|
||||
|
||||
protected override (HediffDef, float) GetLicentiaDamage()
|
||||
{
|
||||
if (HasLicentia)
|
||||
{
|
||||
return (Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
}
|
||||
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
protected override (HediffDef, float) GetLicentiaDamage() =>
|
||||
(Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Sphinctoplasty_Micro : Recipe_Surgery_Sphinctoplasty
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using LicentiaLabs;
|
||||
using rjw;
|
||||
using Verse;
|
||||
|
@ -22,16 +21,9 @@ namespace RJW_PlasticSurgeries
|
|||
{
|
||||
return pawn.GetGenitalsList().FindAll(Genital_Helper.is_vagina);
|
||||
}
|
||||
|
||||
protected override (HediffDef, float) GetLicentiaDamage()
|
||||
{
|
||||
if (HasLicentia)
|
||||
{
|
||||
return (Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
}
|
||||
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
protected override (HediffDef, float) GetLicentiaDamage() =>
|
||||
(Licentia.HediffDefs.StretchTear, 0.2f);
|
||||
}
|
||||
|
||||
public class Recipe_Surgery_Vaginoplasty_Micro : Recipe_Surgery_Vaginoplasty
|
||||
|
|
|
@ -11,7 +11,7 @@ plugins {
|
|||
alias(libs.plugins.versions)
|
||||
}
|
||||
|
||||
version = "5400.0.1.7"
|
||||
version = "5390.0.1.6"
|
||||
val friendlyName = "rjw-plasticsurgeries"
|
||||
|
||||
tasks.register<com.ullink.Msbuild>("buildC#_1.3") {
|
||||
|
@ -105,7 +105,7 @@ tasks.register<Exec>("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_about")
|
||||
}
|
||||
|
||||
tasks.register<Copy>("copy_about") {
|
||||
|
@ -115,25 +115,19 @@ tasks.register<Copy>("copy_about") {
|
|||
|
||||
tasks.register<Copy>("copy_1.3") {
|
||||
dependsOn("copyDll_1.3")
|
||||
from(project.projectDir.resolve("${rootProject.name}/1.3")){
|
||||
exclude("**/*.cs")
|
||||
}
|
||||
from(project.projectDir.resolve("${rootProject.name}/1.3"))
|
||||
into(project.projectDir.parentFile.resolve("1.3"))
|
||||
}
|
||||
|
||||
tasks.register<Copy>("copy_1.4") {
|
||||
dependsOn("copyDll_1.4")
|
||||
from(project.projectDir.resolve("${rootProject.name}/1.4")){
|
||||
exclude("**/*.cs")
|
||||
}
|
||||
from(project.projectDir.resolve("${rootProject.name}/1.4"))
|
||||
into(project.projectDir.parentFile.resolve("1.4"))
|
||||
}
|
||||
|
||||
tasks.register<Copy>("copy_1.5") {
|
||||
dependsOn("copyDll_1.5")
|
||||
from(project.projectDir.resolve("${rootProject.name}/1.5")){
|
||||
exclude("**/*.cs")
|
||||
}
|
||||
from(project.projectDir.resolve("${rootProject.name}/1.5"))
|
||||
into(project.projectDir.parentFile.resolve("1.5"))
|
||||
}
|
||||
|
||||
|
@ -175,7 +169,6 @@ tasks.register<Zip>("buildZip") {
|
|||
into("$friendlyName/Source/${rootProject.name}") {
|
||||
from(project.projectDir.parentFile.resolve("Source/${rootProject.name}"))
|
||||
excludes.add("**/obj/**")
|
||||
excludes.add("**/bin/**")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "8.0.0",
|
||||
"version": "6.0.0",
|
||||
"rollForward": "latestMinor",
|
||||
"allowPrerelease": false
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue