Fix folders and namespaces (except for the Rituals)

This commit is contained in:
amevarashi 2022-10-14 21:35:31 +05:00
parent 17a8264b49
commit 075260f091
47 changed files with 46 additions and 138 deletions

View File

@ -288,7 +288,7 @@
<defName>Sex_Promiscuous</defName>
<durationDays>1</durationDays>
<stackLimit>1</stackLimit>
<thoughtClass>RJWSexperience.Thought_IncreaseRecord</thoughtClass>
<thoughtClass>RJWSexperience.Ideology.Thought_IncreaseRecord</thoughtClass>
<stages>
<li>
<label>promiscuous sex</label>
@ -297,7 +297,7 @@
</li>
</stages>
<modExtensions>
<li Class="RJWSexperience.ThoughtDefExtension_IncreaseRecord" MayRequire="rjw.sexperience">
<li Class="RJWSexperience.Ideology.ThoughtDefExtension_IncreaseRecord" MayRequire="rjw.sexperience">
<recordDef>Lust</recordDef>
<increment>3.0</increment>
</li>

View File

@ -1,54 +0,0 @@
using RimWorld;
using Verse;
namespace RJWSexperience.Ideology
{
public class Thought_IncreaseRecord : Thought_Recordbased
{
protected float recordIncrement;
public override void ExposeData()
{
base.ExposeData();
Scribe_Values.Look(ref recordIncrement, "recordIncrement", recordIncrement, true);
}
public override void ThoughtInterval()
{
base.ThoughtInterval();
if (recordIncrement != 0)
{
pawn.records.AddTo(RecordDef, recordIncrement);
recordIncrement = 0;
}
}
public override bool TryMergeWithExistingMemory(out bool showBubble)
{
ThoughtHandler thoughts = pawn.needs.mood.thoughts;
if (thoughts.memories.NumMemoriesInGroup(this) >= def.stackLimit)
{
Thought_IncreaseRecord thought_Memory = (Thought_IncreaseRecord)thoughts.memories.OldestMemoryInGroup(this);
if (thought_Memory != null)
{
showBubble = (thought_Memory.age > thought_Memory.def.DurationTicks / 2);
thought_Memory.Merged();
return true;
}
}
showBubble = true;
return false;
}
public override void Init()
{
base.Init();
recordIncrement = Def.increment;
}
protected virtual void Merged()
{
age = 0;
recordIncrement += Def.increment;
}
}
}

View File

@ -1,38 +0,0 @@
using RimWorld;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace RJWSexperience.Ideology
{
/// <summary>
/// ThoughtDef using opinion
/// </summary>
public class ThoughtDef_Opinionbased : ThoughtDef
{
[SuppressMessage("Minor Code Smell", "S1104:Fields should not have public accessibility", Justification = "Field value loaded from XML")]
public List<float> minimumValueforStage = new List<float>();
}
/// <summary>
/// Thought class using record.
/// </summary>
public class Thought_Opinionbased : Thought_Memory
{
protected ThoughtDef_Opinionbased Def => (ThoughtDef_Opinionbased)def;
protected List<float> MinimumValueforStage => Def.minimumValueforStage;
public override int CurStageIndex
{
get
{
float value = 0f;
if (otherPawn != null) value = pawn.relations?.OpinionOf(otherPawn) ?? 0f;
for (int i = MinimumValueforStage.Count - 1; i > 0; i--)
{
if (MinimumValueforStage[i] < value) return i;
}
return 0;
}
}
}
}

View File

@ -44,53 +44,53 @@
<ItemGroup>
<Compile Include="DebugAction.cs" />
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="Ideology\HistoryEvents\DefExtension_SecondaryEvents.cs" />
<Compile Include="Ideology\HistoryEvents\DefExtension_EventOverrides.cs" />
<Compile Include="Ideology\HistoryEvents\TwoPawnEventRule.cs" />
<Compile Include="Ideology\InteractionDefExtension_HistoryEvents.cs" />
<Compile Include="Ideology\GoodwillSituationWorker_MemeCompatibility.cs" />
<Compile Include="HistoryEvents\DefExtension_SecondaryEvents.cs" />
<Compile Include="HistoryEvents\DefExtension_EventOverrides.cs" />
<Compile Include="HistoryEvents\TwoPawnEventRule.cs" />
<Compile Include="InteractionDefExtension_HistoryEvents.cs" />
<Compile Include="GoodwillSituationWorker_MemeCompatibility.cs" />
<Compile Include="Harmony.cs" />
<Compile Include="Ideology\HistoryEvents\ArgsNamesCustom.cs" />
<Compile Include="Ideology\Keyed.cs" />
<Compile Include="Ideology\PreceptWorkers\ThoughtWorker_Precept_GenitalSize.cs" />
<Compile Include="Ideology\PreceptWorkers\ThoughtWorker_Precept_GenitalSize_Social.cs" />
<Compile Include="Ideology\PreceptWorkers\ThoughtWorker_Precept_NonPregnant.cs" />
<Compile Include="Ideology\PreceptWorkers\ThoughtWorker_Precept_NonPregnant_Social.cs" />
<Compile Include="Ideology\PreceptWorkers\ThoughtWorker_Precept_Pregnant.cs" />
<Compile Include="Ideology\PreceptWorkers\ThoughtWorker_Precept_Pregnant_Social.cs" />
<Compile Include="Ideology\RelationFilter.cs" />
<Compile Include="Ideology\RsiHistoryEventDefOf.cs" />
<Compile Include="Ideology\TwoPawnFilter.cs" />
<Compile Include="Ideology\SinglePawnFilter.cs" />
<Compile Include="Ideology\Precepts\Comp_SelfTookMemoryThought_Gendered.cs" />
<Compile Include="Ideology\Precepts\Comp_KnowsMemoryThought_Gendered.cs" />
<Compile Include="Ideology\HistoryEvents\HistoryEventDefExtensionMethods.cs" />
<Compile Include="Ideology\Patches\RJW_Patch_ChancePerHour.cs" />
<Compile Include="Ideology\Precepts\DefExtension_ModifyMtb.cs" />
<Compile Include="Ideology\Precepts\DefExtension_ModifyFappinMtb.cs" />
<Compile Include="Ideology\Precepts\DefExtension_ModifyRapeCPMtb.cs" />
<Compile Include="Ideology\Precepts\DefExtension_ModifyNecroMtb.cs" />
<Compile Include="Ideology\Precepts\DefExtension_ModifyBestialityMtb.cs" />
<Compile Include="Ideology\Precepts\DefExtension_ModifyPreference.cs" />
<Compile Include="Ideology\Precepts\DefExtension_MultipleMemesRequired.cs" />
<Compile Include="Ideology\Rituals\JobGiver_GangbangConsensual.cs" />
<Compile Include="Ideology\Rituals\LordJob_Rituals.cs" />
<Compile Include="Ideology\Patches\RJW_Patch_Ideo.cs" />
<Compile Include="Ideology\Patches\Sexperience_Patch.cs" />
<Compile Include="HistoryEvents\ArgsNamesCustom.cs" />
<Compile Include="Keyed.cs" />
<Compile Include="PreceptWorkers\ThoughtWorker_Precept_GenitalSize.cs" />
<Compile Include="PreceptWorkers\ThoughtWorker_Precept_GenitalSize_Social.cs" />
<Compile Include="PreceptWorkers\ThoughtWorker_Precept_NonPregnant.cs" />
<Compile Include="PreceptWorkers\ThoughtWorker_Precept_NonPregnant_Social.cs" />
<Compile Include="PreceptWorkers\ThoughtWorker_Precept_Pregnant.cs" />
<Compile Include="PreceptWorkers\ThoughtWorker_Precept_Pregnant_Social.cs" />
<Compile Include="RelationFilter.cs" />
<Compile Include="RsiHistoryEventDefOf.cs" />
<Compile Include="TwoPawnFilter.cs" />
<Compile Include="SinglePawnFilter.cs" />
<Compile Include="Precepts\Comp_SelfTookMemoryThought_Gendered.cs" />
<Compile Include="Precepts\Comp_KnowsMemoryThought_Gendered.cs" />
<Compile Include="HistoryEvents\HistoryEventDefExtensionMethods.cs" />
<Compile Include="Patches\RJW_Patch_ChancePerHour.cs" />
<Compile Include="Precepts\DefExtension_ModifyMtb.cs" />
<Compile Include="Precepts\DefExtension_ModifyFappinMtb.cs" />
<Compile Include="Precepts\DefExtension_ModifyRapeCPMtb.cs" />
<Compile Include="Precepts\DefExtension_ModifyNecroMtb.cs" />
<Compile Include="Precepts\DefExtension_ModifyBestialityMtb.cs" />
<Compile Include="Precepts\DefExtension_ModifyPreference.cs" />
<Compile Include="Precepts\DefExtension_MultipleMemesRequired.cs" />
<Compile Include="Rituals\JobGiver_GangbangConsensual.cs" />
<Compile Include="Rituals\LordJob_Rituals.cs" />
<Compile Include="Patches\RJW_Patch_Ideo.cs" />
<Compile Include="Patches\Sexperience_Patch.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Ideology\Patches\Rimworld_Patch.cs" />
<Compile Include="Ideology\Rituals\JobGiver_DrugOrgy.cs" />
<Compile Include="Ideology\Rituals\JobGiver_GangbangVictim.cs" />
<Compile Include="Ideology\Rituals\RitualBehaviorWorkers.cs" />
<Compile Include="Ideology\Rituals\RitualOutcomeComps.cs" />
<Compile Include="Ideology\Rituals\RitualRoles.cs" />
<Compile Include="Ideology\StatParts.cs" />
<Compile Include="Ideology\IdeoUtility.cs" />
<Compile Include="Patches\Rimworld_Patch.cs" />
<Compile Include="Rituals\JobGiver_DrugOrgy.cs" />
<Compile Include="Rituals\JobGiver_GangbangVictim.cs" />
<Compile Include="Rituals\RitualBehaviorWorkers.cs" />
<Compile Include="Rituals\RitualOutcomeComps.cs" />
<Compile Include="Rituals\RitualRoles.cs" />
<Compile Include="StatParts.cs" />
<Compile Include="IdeoUtility.cs" />
<Compile Include="Thoughts\ThoughtDefExtension_IncreaseRecord.cs" />
<Compile Include="Thoughts\ThoughtDefExtension_StageFromValue.cs" />
<Compile Include="Thoughts\Thought_IncreaseRecord.cs" />
<Compile Include="Thoughts\Thought_Opinionbased.cs" />
<Compile Include="Ideology\VariousDefOf.cs" />
<Compile Include="VariousDefOf.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Krafs.Rimworld.Ref">

View File

@ -1,6 +1,6 @@
using Verse;
namespace RJWSexperience
namespace RJWSexperience.Ideology
{
public static class Keyed
{

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Verse;
namespace RJWSexperience
namespace RJWSexperience.Ideology
{
public class ThoughtDefExtension_IncreaseRecord : DefModExtension
{

View File

@ -1,6 +1,6 @@
using RimWorld;
namespace RJWSexperience
namespace RJWSexperience.Ideology
{
/// <summary>
/// Increments record every time the thought is added