mirror of
				https://gitgud.io/c0ffeeeeeeee/rjw-events.git
				synced 2024-08-14 23:57:42 +00:00 
			
		
		
		
	Fixes for orgy job, made psychic arouse incidentworker fireable
This commit is contained in:
		
							parent
							
								
									ea886df513
								
							
						
					
					
						commit
						84be102c0f
					
				
					 11 changed files with 26 additions and 59 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								1.5/Assemblies/RJW-Events.dll
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								1.5/Assemblies/RJW-Events.dll
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
						 | 
				
			
			@ -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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,7 +16,7 @@ namespace RJW_Events
 | 
			
		|||
		{
 | 
			
		||||
			if (base.TryExecuteWorker(parms))
 | 
			
		||||
			{
 | 
			
		||||
				SoundDefOf.PsychicSootheGlobal.PlayOneShotOnCamera((Map)parms.target);
 | 
			
		||||
				SoundDefOf.PsychicSootheGlobal.PlayOneShotOnCamera(null);
 | 
			
		||||
                return true;
 | 
			
		||||
			}
 | 
			
		||||
			return false;
 | 
			
		||||
| 
						 | 
				
			
			@ -24,24 +24,10 @@ namespace RJW_Events
 | 
			
		|||
 | 
			
		||||
		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>());
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,7 +20,6 @@ namespace RJW_Events
 | 
			
		|||
        {
 | 
			
		||||
            Toil t = new Toil();
 | 
			
		||||
            t.AddFinishAction(() => {
 | 
			
		||||
                GlobalTextureAtlasManager.TryMarkPawnFrameSetDirty(pawn);
 | 
			
		||||
                SexUtility.DrawNude(pawn);
 | 
			
		||||
            
 | 
			
		||||
            });
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    */
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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[]
 | 
			
		||||
            if (!pawn.TryGetComp<CompRJW>().drawNude)
 | 
			
		||||
            {
 | 
			
		||||
                            "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;
 | 
			
		||||
            
 | 
			
		||||
            }))
 | 
			
		||||
            {
 | 
			
		||||
                //they aren't nude
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue