Fixes for orgy job, made psychic arouse incidentworker fireable

This commit is contained in:
c0ffee 2024-04-30 22:43:50 -07:00
parent ea886df513
commit 84be102c0f
11 changed files with 26 additions and 59 deletions

Binary file not shown.

View file

@ -8,6 +8,7 @@
<li>1.2</li>
<li>1.3</li>
<li>1.4</li>
<li>1.5</li>
</supportedVersions>
<packageId>c0ffee.rjw.events</packageId>
<modDependencies>

View file

@ -18,7 +18,7 @@
<DebugSymbols>false</DebugSymbols>
<DebugType>none</DebugType>
<Optimize>false</Optimize>
<OutputPath>1.4\Assemblies\</OutputPath>
<OutputPath>1.5\Assemblies\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@ -33,7 +33,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>..\..\..\..\workshop\content\294100\839005762\1.4\Assemblies\0Harmony.dll</HintPath>
<HintPath>..\..\..\..\workshop\content\294100\839005762\1.5\Assemblies\0Harmony.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Assembly-CSharp">
@ -41,7 +41,7 @@
<Private>False</Private>
</Reference>
<Reference Include="RJW">
<HintPath>..\rjw\1.4\Assemblies\RJW.dll</HintPath>
<HintPath>..\rjw\1.5\Assemblies\RJW.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
@ -52,6 +52,14 @@
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>..\..\RimWorldWin64_Data\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\RimWorldWin64_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Source\DefOfs\GameConditionDefOf.cs" />
@ -79,6 +87,7 @@
<ItemGroup>
<Folder Include="1.2\" />
<Folder Include="1.4\" />
<Folder Include="1.5\Assemblies\" />
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>

View file

@ -16,32 +16,18 @@ namespace RJW_Events
{
if (base.TryExecuteWorker(parms))
{
SoundDefOf.PsychicSootheGlobal.PlayOneShotOnCamera((Map)parms.target);
return true;
SoundDefOf.PsychicSootheGlobal.PlayOneShotOnCamera(null);
return true;
}
return false;
}
protected override void DoConditionAndLetter(IncidentParms parms, Map map, int duration, Gender gender, float points)
{
PsychicDroneLevel level;
if (points < 800f)
{
level = PsychicDroneLevel.BadLow;
}
else if (points < 2000f)
{
level = PsychicDroneLevel.BadMedium;
}
else
{
level = PsychicDroneLevel.BadHigh;
}
GameCondition_PsychicArouse gameCondition_PsychicEmanation = (GameCondition_PsychicArouse)GameConditionMaker.MakeCondition(GameConditionDefOf.PsychicArouse, duration);
GameCondition_PsychicEmanation gameCondition_PsychicEmanation = (GameCondition_PsychicEmanation)GameConditionMaker.MakeCondition(GameConditionDefOf.PsychicArouse, duration);
gameCondition_PsychicEmanation.gender = gender;
gameCondition_PsychicEmanation.level = level;
map.gameConditionManager.RegisterCondition(gameCondition_PsychicEmanation);
base.SendStandardLetter(gameCondition_PsychicEmanation.LabelCap, gameCondition_PsychicEmanation.LetterText, gameCondition_PsychicEmanation.def.letterDef, parms, LookTargets.Invalid, Array.Empty<NamedArgument>());

View file

@ -20,7 +20,6 @@ namespace RJW_Events
{
Toil t = new Toil();
t.AddFinishAction(() => {
GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(pawn);
SexUtility.DrawNude(pawn);
});

View file

@ -73,11 +73,6 @@ namespace RJW_Events
return base.VoluntaryJoinPriorityFor(p);
}
public new bool IsGatheringAboutToEnd()
{
return timeoutTrigger.TicksLeft < 300;
}
public override void Notify_PawnAdded(Pawn p)
{
if(participants == null)
@ -93,14 +88,8 @@ namespace RJW_Events
foreach(Pawn participant in participants)
{
if (participant != null)
{
participant.mindState.Notify_OutfitChanged();
GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(participant);
if (xxx.is_human(participant))
participant.Drawer.renderer.graphics.ResolveAllGraphics();
}
participant.TryGetComp<CompRJW>().drawNude = false;
participant.Drawer.renderer.SetAllGraphicsDirty();
}
participants = null;

View file

@ -33,7 +33,7 @@ namespace RJW_Events
case PsychicDroneLevel.None:
break;
case PsychicDroneLevel.GoodMedium:
__result *= 3;
__result *= 1.5f;
break;
case PsychicDroneLevel.BadLow:
__result *= 3;
@ -45,7 +45,7 @@ namespace RJW_Events
__result *= 9;
break;
case PsychicDroneLevel.BadExtreme:
__result *= 9;
__result *= 12;
break;
default:
throw new NotImplementedException();

View file

@ -17,7 +17,7 @@ namespace RJW_Events
List<Pawn> ownedPawns = toil.lord.ownedPawns;
for (int i = 0; i < ownedPawns.Count; i++)
{
ownedPawns[i].Drawer.renderer.graphics.ResolveApparelGraphics();
ownedPawns[i].Drawer.renderer.SetAllGraphicsDirty();
}
}
}

View file

@ -16,7 +16,7 @@ namespace RJW_Events
{
if(__instance?.LordJob != null && __instance.LordJob is LordJob_Joinable_Orgy)
{
p.Drawer.renderer.graphics.ResolveApparelGraphics();
p.Drawer.renderer.SetAllGraphicsDirty();
}
}
}

View file

@ -9,7 +9,7 @@ using Verse.AI.Group;
namespace RJW_Events
{
/*
[HarmonyPatch(typeof(PawnGraphicSet), "ResolveApparelGraphics")]
public static class HarmonyPatch_StayNudeForOrgy
{
@ -24,4 +24,6 @@ namespace RJW_Events
return true;
}
}
*/
}

View file

@ -16,27 +16,8 @@ namespace RJW_Events
protected override bool Satisfied(Pawn pawn)
{
//if pawn is rendering apparel they shouldn't be,
if (pawn.Drawer.renderer.graphics.apparelGraphics.Any((x) => {
if (
x.sourceApparel.def is bondage_gear_def
|| x.sourceApparel.def.defName.ToLower().ContainsAny(new string[]
{
"vibrator",
"piercing",
"strapon"
})
|| x.sourceApparel.def.apparel.bodyPartGroups.Contains(BodyPartGroupDefOf.UpperHead)
)
return false;
Log.Message("[c0ffee] " + x.sourceApparel.def.defName + " does not count as nude for Pawn " + pawn.Name.ToStringSafe());
return true;
}))
if (!pawn.TryGetComp<CompRJW>().drawNude)
{
//they aren't nude
return false;
}