Added Stohne

This commit is contained in:
GinYuH authored and Cameron Ewell committed 2024-09-27 11:32:19 -04:00
1 parent 0ed0277351
commit 84b19a79e8
10 files changed
+131 -2

No files matched your search

+1
View File
@@ -178,6 +178,7 @@ namespace CalamityMod.ILEditing
On_WorldGen.MakeDungeon += LimitDungeonEntranceXPosition;
IL_WorldGen.DungeonHalls += LimitDungeonHallsXPosition;
IL_WorldGen.MakeDungeon += ChangeDungeonSpikeQuantities;
Terraria.GameContent.Biomes.On_JunglePass.GenerateFinishingTouches += AddStohne;
// Removal of vanilla stupidity
IL_Player.UpdateBuffs += RemoveFeralBiteRandomDebuffs;
+59
View File
@@ -41,6 +41,7 @@ using Terraria.Chat;
using Terraria.DataStructures;
using Terraria.GameContent;
using Terraria.GameContent.Achievements;
using Terraria.GameContent.Biomes;
using Terraria.GameContent.Drawing;
using Terraria.GameContent.Events;
using Terraria.GameContent.Liquid;
@@ -56,6 +57,7 @@ using Terraria.Localization;
using Terraria.ModLoader;
using Terraria.ModLoader.IO;
using Terraria.UI.Gamepad;
using Terraria.WorldBuilding;
using static Terraria.WaterfallManager;
namespace CalamityMod.ILEditing
@@ -1895,5 +1897,62 @@ namespace CalamityMod.ILEditing
}
}
#endregion
#region Add Stohne to the Jungle
public static void AddStohne(Terraria.GameContent.Biomes.On_JunglePass.orig_GenerateFinishingTouches orig, JunglePass self, GenerationProgress progress, int oldX, int oldY)
{
int anchorX = oldX;
int anchorY = oldY;
double worldScale = (double)Main.maxTilesX / 4200.0 * 1.5;
// Generate mud
for (int i = 0; (double)i <= 20.0 * worldScale; i++)
{
progress.Set((60.0 + (double)i / worldScale) * 0.01);
anchorX += WorldGen.genRand.Next((int)(-5.0 * worldScale), (int)(6.0 * worldScale));
anchorY += WorldGen.genRand.Next((int)(-5.0 * worldScale), (int)(6.0 * worldScale));
WorldGen.TileRunner(anchorX, anchorY, WorldGen.genRand.Next(40, 100), WorldGen.genRand.Next(300, 500), TileID.Mud);
}
for (int j = 0; (double)j <= 10.0 * worldScale; j++)
{
progress.Set((80.0 + (double)j / worldScale * 2.0) * 0.01);
anchorX = oldX + WorldGen.genRand.Next((int)(-600.0 * worldScale), (int)(600.0 * worldScale));
anchorY = oldY + WorldGen.genRand.Next((int)(-200.0 * worldScale), (int)(200.0 * worldScale));
while (anchorX < 1 || anchorX >= Main.maxTilesX - 1 || anchorY < 1 || anchorY >= Main.maxTilesY - 1 || Main.tile[anchorX, anchorY].TileType != TileID.Mud)
{
anchorX = oldX + WorldGen.genRand.Next((int)(-600.0 * worldScale), (int)(600.0 * worldScale));
anchorY = oldY + WorldGen.genRand.Next((int)(-200.0 * worldScale), (int)(200.0 * worldScale));
}
for (int k = 0; (double)k < 8.0 * worldScale; k++)
{
anchorX += WorldGen.genRand.Next(-30, 31);
anchorY += WorldGen.genRand.Next(-30, 31);
int type = -1;
if (WorldGen.genRand.NextBool(7))
{
type = -2;
}
WorldGen.TileRunner(anchorX, anchorY, WorldGen.genRand.Next(10, 20), WorldGen.genRand.Next(30, 70), type);
}
}
int stoneType = ModContent.TileType<Stohne>();
for (int l = 0; (double)l <= 300.0 * worldScale; l++)
{
anchorX = oldX + WorldGen.genRand.Next((int)(-600.0 * worldScale), (int)(600.0 * worldScale));
anchorY = oldY + WorldGen.genRand.Next((int)(-200.0 * worldScale), (int)(200.0 * worldScale));
while (anchorX < 1 || anchorX >= Main.maxTilesX - 1 || anchorY < 1 || anchorY >= Main.maxTilesY - 1 || Main.tile[anchorX, anchorY].TileType != 59)
{
anchorX = oldX + WorldGen.genRand.Next((int)(-600.0 * worldScale), (int)(600.0 * worldScale));
anchorY = oldY + WorldGen.genRand.Next((int)(-200.0 * worldScale), (int)(200.0 * worldScale));
}
WorldGen.TileRunner(anchorX, anchorY, WorldGen.genRand.Next(4, 10), WorldGen.genRand.Next(5, 30), stoneType);
// Generate Gems
if (WorldGen.genRand.NextBool(4))
{
int gem = WorldGen.genRand.Next(63, 69);
WorldGen.TileRunner(anchorX + WorldGen.genRand.Next(-1, 2), anchorY + WorldGen.genRand.Next(-1, 2), WorldGen.genRand.Next(3, 7), WorldGen.genRand.Next(4, 8), gem);
}
}
}
#endregion
}
}
+16
View File
@@ -0,0 +1,16 @@
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Items.Placeables
{
public class Stohne : ModItem, ILocalizedModType
{
public new string LocalizationCategory => "Items.Placeables";
public override void SetStaticDefaults()
{
Item.ResearchUnlockCount = 100;
}
public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType<Tiles.Stohne>());
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

@@ -3320,6 +3320,11 @@ SpineSapling: {
Tooltip: Plants Giant Spine saplings on Brimstone Slag
}
Stohne: {
DisplayName: Stohne
Tooltip: ""
}
SulphurousSand: {
DisplayName: Sulphurous Sand
Tooltip: ""
+3 -1
View File
@@ -1,4 +1,5 @@
using CalamityMod.Items.Placeables.Banners;
using CalamityMod.Items.Placeables;
using CalamityMod.Items.Placeables.Banners;
using CalamityMod.Items.SummonItems;
using CalamityMod.NPCs.CalamityAIs.CalamityRegularEnemyAIs;
using CalamityMod.NPCs.Other;
@@ -99,6 +100,7 @@ namespace CalamityMod.NPCs.NormalNPCs
public override void ModifyNPCLoot(NPCLoot npcLoot)
{
npcLoot.Add(ItemID.LihzahrdBrick, 1, 10, 26);
npcLoot.Add(ModContent.ItemType<Stohne>(), 1, 10, 26);
npcLoot.Add(ItemID.LunarTabletFragment, 7, 10, 26);
npcLoot.Add(ItemID.LihzahrdPowerCell, 50);
npcLoot.AddIf(() => DownedBossSystem.downedCalamitas && DownedBossSystem.downedExoMechs && Main.zenithWorld, ModContent.ItemType<NO>(), 2, ui: false);
+8 -1
View File
@@ -258,7 +258,8 @@ namespace CalamityMod.Systems
ItemID.EbonstoneBlock,
ItemID.CrimstoneBlock,
ItemID.PearlstoneBlock,
ItemType<AstralStone>()
ItemType<AstralStone>(),
ItemType<Stohne>()
});
AnyStoneBlock = RecipeGroup.RegisterGroup("AnyStoneBlock", group);
@@ -502,6 +503,12 @@ namespace CalamityMod.Systems
AddTile(TileID.DyeVat).
Register();
// Stohne smelts into Lihzahrd Bricks
Recipe.Create(ItemID.LihzahrdBrick).
AddIngredient(ItemType<Stohne>()).
AddTile(TileID.LihzahrdFurnace).
Register();
// Earlier Rocket Is for early rocket weapons
Recipe.Create(ItemID.RocketI, 100).
AddRecipeGroup("IronBar").
+38
View File
@@ -0,0 +1,38 @@
using CalamityMod.Systems;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Tiles
{
public class Stohne : ModTile
{
public override void SetStaticDefaults()
{
Main.tileSolid[Type] = true;
Main.tileBlockLight[Type] = true;
HitSound = SoundID.Tink;
AddMapEntry(new Color(117, 42, 14));
DustType = DustID.Lihzahrd;
CalamityUtils.MergeWithGeneral(Type);
CalamityUtils.MergeWithOres(Type);
TileID.Sets.Stone[Type] = true;
TileID.Sets.Conversion.Stone[Type] = true;
TileID.Sets.CanBeClearedDuringOreRunner[Type] = true;
TileID.Sets.HasSlopeFrames[Type] = true;
this.RegisterUniversalMerge(TileID.Dirt, "CalamityMod/Tiles/Merges/DirtMerge");
this.RegisterUniversalMerge(TileID.Stone, "CalamityMod/Tiles/Merges/StoneMerge");
this.RegisterUniversalMerge(TileID.Mud, "CalamityMod/Tiles/Merges/MudMerge");
}
public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak)
{
return TileFramingSystem.BetterGemsparkFraming(i, j, resetFrame);
}
}
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

+1
View File
@@ -387,6 +387,7 @@ namespace CalamityMod
TileType<SulphurousShale>(),
TileType<AbyssGravel>(),
TileType<Voidstone>(),
TileType<Stohne>(),
});
/// <summary>