Sulph Sea Reformation 2.0 (Also see description)

Changed IL Editing changes to not use a constant index set, fixed the mechworm UUID implementation, added a wulfrum droid summon projectile clone, and added some items/chests alongside the new worldgen changes.
This commit is contained in:
DominicKarma42 committed 2020-04-12 03:13:32 -05:00
1 parent b333d832eb
commit eabfa51179
103 files changed
+3021 -557

No files matched your search

+624 -442
View File
File diff suppressed because it is too large. Load diff
+16 -11
View File
@@ -742,7 +742,7 @@ namespace CalamityMod.World
calamityTiles = tileCounts[ModContent.TileType<CharredOre>()] + tileCounts[ModContent.TileType<BrimstoneSlag>()];
sunkenSeaTiles = tileCounts[ModContent.TileType<EutrophicSand>()] + tileCounts[ModContent.TileType<Navystone>()] + tileCounts[ModContent.TileType<SeaPrism>()];
abyssTiles = tileCounts[ModContent.TileType<AbyssGravel>()] + tileCounts[ModContent.TileType<Voidstone>()];
sulphurTiles = tileCounts[ModContent.TileType<SulphurousSand>()];
sulphurTiles = tileCounts[ModContent.TileType<SulphurousSand>()] + tileCounts[ModContent.TileType<SulphurousSandstone>()] + tileCounts[ModContent.TileType<HardenedSulphurousSandstone>()];
#region Astral Stuff
int astralDesertTiles = tileCounts[ModContent.TileType<AstralSand>()] + tileCounts[ModContent.TileType<AstralSandstone>()] + tileCounts[ModContent.TileType<HardenedAstralSand>()] + tileCounts[ModContent.TileType<AstralFossil>()];
@@ -864,6 +864,16 @@ namespace CalamityMod.World
}));
#endregion
int SulphurIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes"));
if (SulphurIndex != -1)
{
tasks.Insert(SulphurIndex + 1, new PassLegacy("Sulphur", delegate (GenerationProgress progress)
{
progress.Message = "Sulphur Sea";
Abyss.PlaceSulphurSea();
}));
}
tasks.Insert(FinalIndex + 2, new PassLegacy("SpecialShrines", delegate (GenerationProgress progress)
{
progress.Message = "Special Shrines";
@@ -876,18 +886,13 @@ namespace CalamityMod.World
Abyss.PlaceAbyss();
}));
// Moved to prevent the sulf sea caverns from being swallowed by the abyss opening
int SulphurIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Micro Biomes"));
if (SulphurIndex != -1)
tasks.Insert(FinalIndex + 4, new PassLegacy("Sulphur2", delegate (GenerationProgress progress)
{
tasks.Insert(SulphurIndex + 1, new PassLegacy("Sulphur", delegate (GenerationProgress progress)
{
progress.Message = "Sulphur Sea";
Abyss.PlaceSulphurSea();
}));
}
progress.Message = "Finishing Sulphur Sea";
Abyss.FinishGeneratingSulphurSea();
}));
tasks.Insert(FinalIndex + 4, new PassLegacy("IWannaRock", delegate (GenerationProgress progress)
tasks.Insert(FinalIndex + 5, new PassLegacy("IWannaRock", delegate (GenerationProgress progress)
{
progress.Message = "I Wanna Rock";
WorldGenerationMethods.PlaceRoxShrine();
+20 -2
View File
@@ -75,7 +75,7 @@ namespace CalamityMod.World
}
}
private static Chest AddChestWithLoot(int i, int j, ushort type = TileID.Containers, uint startingSlot = 1, int tileStyle = 0)
internal static Chest AddChestWithLoot(int i, int j, ushort type = TileID.Containers, uint startingSlot = 1, int tileStyle = 0)
{
int chestIndex = -1;
@@ -100,7 +100,7 @@ namespace CalamityMod.World
return chest;
}
private static void PlaceLootInChest(ref Chest chest, ushort type, uint startingSlot)
internal static void PlaceLootInChest(ref Chest chest, ushort type, uint startingSlot)
{
uint itemIndex = startingSlot;
@@ -139,7 +139,25 @@ namespace CalamityMod.World
}
PutItemInChest(ref chest, ItemID.GoldCoin, goldCoins);
}
else if (type == ModContent.TileType<RustyChestLocked>())
{
// 15-29 torches (in accordence with vanilla)
PutItemInChest(ref chest, ItemID.Torch, 15, 29);
// 50% chance of 1 or 2 of the following potions
int[] potions = new int[]
{
ModContent.ItemType<SunkenStew>(), ItemID.WaterWalkingPotion, ItemID.ShinePotion, ItemID.GillsPotion, ItemID.FlipperPotion
};
PutItemInChest(ref chest, WorldGen.genRand.Next(potions), 1, 2, WorldGen.genRand.NextBool());
PutItemInChest(ref chest, WorldGen.genRand.Next(potions), 1, 2, WorldGen.genRand.NextBool());
// 33% chance of flippers
PutItemInChest(ref chest, ItemID.Flipper, condition: WorldGen.genRand.NextBool(3));
// Typical coins
PutItemInChest(ref chest, ItemID.GoldCoin, 2, 4);
}
// Default loot
else
{