Skip to content

Commit

Permalink
Update Alpha mods (#485)
Browse files Browse the repository at this point in the history
- Removed the System RNG from all related mods, as they all replaced it with Verse RNG
  - This means that Alpha Mythology patch was removed, as it's no longer needed
- Removed current map usage from Alpha Memes, as the mod no longer uses it in an unsafe manner/fixed the code using it to check all maps
  • Loading branch information
SokyranTheDragon authored Oct 20, 2024
1 parent 5570ac0 commit 14fb79a
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 71 deletions.
25 changes: 0 additions & 25 deletions Source/Mods/AlphaAnimals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,31 +24,6 @@ public AlphaAnimals(ModContentPack mod)
{
LongEventHandler.ExecuteWhenFinished(LatePatch);

#region RNG

{
var rngFixConstructors = new[]
{
"AlphaBehavioursAndEvents.DeathActionWorker_ExplodeAndSpawnEggs",
"AlphaBehavioursAndEvents.Hediff_Crushing",

// Ocular plant conversion
"AlphaBehavioursAndEvents.Gas_Ocular",
};

PatchingUtilities.PatchSystemRandCtor(rngFixConstructors, false);

var fixSystemRngMethods = new[]
{
"AlphaBehavioursAndEvents.Ability_SpawnOnRadius:Cast",
"AlphaBehavioursAndEvents.CompCreateOcularPlants:CompTick",
"AlphaBehavioursAndEvents.CompCreateOcularPlants:ConvertRandomPlantInRadius",
};
PatchingUtilities.PatchSystemRand(fixSystemRngMethods, false);
}

#endregion

#region MP unsafe method patching

// Only apply if VFE-I2 is inactive.
Expand Down
7 changes: 0 additions & 7 deletions Source/Mods/AlphaBiomes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ public AlphaBiomes(ModContentPack mod)
"AlphaBiomes.GameCondition_AcidRain:DoCellSteadyEffects",
};

var systemRngFixConstructor = new[]
{
"AlphaBiomes.CompGasProducer",
"AlphaBiomes.HediffComp_GangreneWounds",
}.Select(x => AccessTools.DeclaredConstructor(AccessTools.TypeByName(x)));

PatchingUtilities.PatchSystemRand(systemRngFixConstructor, false);
PatchingUtilities.PatchPushPopRand(rngFixMethods);
}

Expand Down
25 changes: 0 additions & 25 deletions Source/Mods/AlphaMemes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,6 @@ public AlphaMemes(ModContentPack mod)
LongEventHandler.ExecuteWhenFinished(LatePatch);
MpCompatPatchLoader.LoadPatch(this);

#region RNG

{
PatchingUtilities.PatchSystemRand("AlphaMemes.AlphaMemes_DamageWorker_AddInjury_Apply_Patch:SendHistoryIfMelee", false);
PatchingUtilities.PatchPushPopRand("AlphaMemes.RitualBehaviorWorker_FuneralFramework:TryExecuteOn");
PatchingUtilities.PatchSystemRandCtor("AlphaMemes.CompAbilityOcularConversion");
// The following method is seeded, so it should be fine
// If not, then patching it as well should fix it
//"AlphaMemes.GameComponent_RandomMood:GameComponentTick",

// Need to push/pop for RNG used in interface.
}

#endregion

#region Gizmos

{
Expand Down Expand Up @@ -90,16 +75,6 @@ public AlphaMemes(ModContentPack mod)

#endregion

#region Current map

{
// Current map usage
var type = AccessTools.TypeByName("AlphaMemes.AlphaMemesIdeo_Notify_Patches");
PatchingUtilities.ReplaceCurrentMapUsage(AccessTools.Inner(type, "FuneralFramework_Ideo_MemberCorpseDestroyed"), "Prefix");
}

#endregion

#region Funeral ritual dialog

{
Expand Down
14 changes: 0 additions & 14 deletions Source/Mods/AlphaMythology.cs

This file was deleted.

0 comments on commit 14fb79a

Please sign in to comment.