diff --git a/BiomeManagers/SulphurousSeaBiome.cs b/BiomeManagers/SulphurousSeaBiome.cs index af163eb129..ad63c36d7c 100644 --- a/BiomeManagers/SulphurousSeaBiome.cs +++ b/BiomeManagers/SulphurousSeaBiome.cs @@ -60,14 +60,14 @@ namespace CalamityMod.BiomeManagers if (Abyss.AtLeftSideOfWorld) { - if (point.X < 380) + if (point.X < 435) { sulphurPosX = true; } } else { - if (point.X > Main.maxTilesX - 380) + if (point.X > Main.maxTilesX - 435) { sulphurPosX = true; } diff --git a/DataStructures/Attunement.cs b/DataStructures/Attunement.cs index f2c271dde9..4488f4a01a 100644 --- a/DataStructures/Attunement.cs +++ b/DataStructures/Attunement.cs @@ -683,8 +683,8 @@ namespace CalamityMod.DataStructures { id = AttunementID.Phoenix; name = "Phoenix's Pride"; - function_description = "Hold LMB to swing Galaxia around you, accelerating over time\nThe swirling nebula constantly emits homing cosmic bolts"; - function_description_extra = "Release LMB to hurl Galaxia toward the cursor alongside 6 gigantic cosmic bolts"; + function_description = "Hold left click to swing Galaxia around you, accelerating over time\nThe swirling nebula constantly emits homing cosmic bolts"; + function_description_extra = "Release left click to hurl Galaxia toward the cursor alongside 6 gigantic cosmic bolts"; tooltipColor = new Color(255, 87, 0); tooltipColor2 = new Color(255, 143, 0); @@ -762,8 +762,8 @@ namespace CalamityMod.DataStructures { id = AttunementID.Polaris; name = "Polaris' Gaze"; //It carries the mark of the Northern Star - function_description = "Hold LMB to channel Galaxia's power into a tight vortex of galactic energies\nThe vortex powers up over time and when hitting enemies"; - function_description_extra = "Release LMB to fire off the charged star in straight line\nPress LMB again immediately to dash towards the star and release cosmic bolts"; + function_description = "Hold left click to channel Galaxia's power into a tight vortex of galactic energies\nThe vortex powers up over time and when hitting enemies"; + function_description_extra = "Release left click to fire off the charged star in straight line\nPress left click again immediately to dash towards the star and release cosmic bolts"; tooltipColor = new Color(128, 189, 255); tooltipColor2 = new Color(255, 128, 140); @@ -801,7 +801,7 @@ namespace CalamityMod.DataStructures { id = AttunementID.Andromeda; name = "Andromeda's Stride"; - function_description = "Hold LMB to charge a god-erasing lunge, release to unleash the devastating blow\nGalaxia emits cosmic bolts while charging"; + function_description = "Hold left click to charge a god-erasing lunge, release to unleash the devastating blow\nGalaxia emits cosmic bolts while charging"; function_description_extra = "Lunging into the ground will cause a shockwave which summons a storm of cosmic energies"; tooltipColor = new Color(132, 128, 255); tooltipColor2 = new Color(194, 166, 255); diff --git a/Items/Weapons/Melee/ArkoftheCosmos.cs b/Items/Weapons/Melee/ArkoftheCosmos.cs index b3a43ac972..0dda896488 100644 --- a/Items/Weapons/Melee/ArkoftheCosmos.cs +++ b/Items/Weapons/Melee/ArkoftheCosmos.cs @@ -39,16 +39,16 @@ namespace CalamityMod.Items.Weapons.Melee public static float SwirlBoltAmount = 6f; //The amount of cosmic bolts produced during hte swirl attack public static float SwirlBoltDamageMultiplier = 0.7f; //This is the damage multiplier for ALL THE BOLTS: Aka, said damage multiplier is divided by the amount of bolts in a swirl and the full damage multiplier is gotten if you hit all the bolts - const string ComboTooltip = "Using LMB performs a 5-swing combo that ends by throwing the blade\n" + + const string ComboTooltip = "Using left click performs a 5-swing combo that ends by throwing the blade\n" + "The thrown blade will follow your cursor\n" + - "Releasing LMB while the blade is out will cause an exploding snap"; + "Releasing left click while the blade is out will cause an exploding snap"; - const string ParryTooltip = "Using RMB will snip out the scissor blades in front of you\n" + + const string ParryTooltip = "Using right click will snip out the scissor blades in front of you\n" + "Hitting an enemy with it will parry them, granting you brief invulnerability\n" + "You can parry projectiles to make them deal 200 less damage for a short period\n" + "Parrying anything will empower the next 10 swings of the sword"; - const string BlastTooltip = "Using RMB while pressing UP with empowered charges will provoke a Big Rip in spacetime and use all charges\n" + + const string BlastTooltip = "Using right click while pressing UP with empowered charges will provoke a Big Rip in spacetime and use all charges\n" + "If more than 5 charges were used, you can dash across the rip by holding UP"; @@ -56,9 +56,9 @@ namespace CalamityMod.Items.Weapons.Melee { DisplayName.SetDefault("Ark of the Cosmos"); Tooltip.SetDefault("This line gets set in ModifyTooltips\n" + - "This line also gets set in ModifyTooltips\n" + - "This line also gets set in ModifyTooltips\n" + - "The physical culmination of your journey, capable of rending gods asunder"); + "This line also gets set in ModifyTooltips\n" + + "This line also gets set in ModifyTooltips\n" + + "The physical culmination of your journey, capable of rending gods asunder"); SacrificeTotal = 1; } diff --git a/Items/Weapons/Melee/ArkoftheElements.cs b/Items/Weapons/Melee/ArkoftheElements.cs index 2ba0a2f44c..a85ef0f5e5 100644 --- a/Items/Weapons/Melee/ArkoftheElements.cs +++ b/Items/Weapons/Melee/ArkoftheElements.cs @@ -31,15 +31,15 @@ namespace CalamityMod.Items.Weapons.Melee public static float blastFalloffStrenght = 0.75f; //Value between 0 and 1 that determines how much falloff increases affect the damage : Closer to 0 = damage falls off less intensely, closer to 1 : damage falls off way harder - const string ComboTooltip = "Using LMB performs a 5-swing combo that ends by throwing the blade\n" + - "Releasing LMB while the blade is out will deal extra damage and give 2 charges"; + const string ComboTooltip = "Using left click performs a 5-swing combo that ends by throwing the blade\n" + + "Releasing left click while the blade is out will deal extra damage and give 2 charges"; - const string ParryTooltip = "Using RMB will snip out the scissor blades in front of you\n" + + const string ParryTooltip = "Using right click will snip out the scissor blades in front of you\n" + "Hitting an enemy with it will parry them, granting you brief invulnerability\n" + "You can also parry projectiles to make them deal 200 less damage for a short period\n" + "Parrying will empower the next 10 swings of the sword, letting you use both blades at once"; - const string BlastTooltip = "Using RMB while pressing UP with empowered charges will provoke a Big Rip in spacetime and use all charges\n" + + const string BlastTooltip = "Using right click while pressing UP with empowered charges will provoke a Big Rip in spacetime and use all charges\n" + "If more than 5 charges were used, you can dash across the rip by holding UP"; public override void SetStaticDefaults() diff --git a/Items/Weapons/Melee/TrueArkoftheAncients.cs b/Items/Weapons/Melee/TrueArkoftheAncients.cs index 9e610b0738..fb028ab79d 100644 --- a/Items/Weapons/Melee/TrueArkoftheAncients.cs +++ b/Items/Weapons/Melee/TrueArkoftheAncients.cs @@ -26,11 +26,11 @@ namespace CalamityMod.Items.Weapons.Melee public static float blastFalloffSpeed = 0.1f; //How much the blast damage falls off as you hit more and more targets public static float blastFalloffStrenght = 0.75f; //Value between 0 and 1 that determines how much falloff increases affect the damage : Closer to 0 = damage falls off less intensely, closer to 1 : damage falls off way harder - const string ParryTooltip = "Using RMB will extend the Ark out in front of you." + + const string ParryTooltip = "Using right click will extend the Ark out in front of you." + "Hitting an enemy with it will parry them, granting you brief invulnerability\n" + "You can also parry projectiles to make them deal 160 less damage for a short period\n" + "Parrying empowers the next 10 swings of the sword, letting them throw stronger projectiles\n" + - "Using RMB and pressing UP will release all empowered charges in a powerful burst of energy"; + "Using right click and pressing UP will release all empowered charges in a powerful burst of energy"; public override void SetStaticDefaults() { diff --git a/Items/Weapons/Summon/AtlasMunitionsBeacon.cs b/Items/Weapons/Summon/AtlasMunitionsBeacon.cs index 7df6977eba..3070ca37f0 100644 --- a/Items/Weapons/Summon/AtlasMunitionsBeacon.cs +++ b/Items/Weapons/Summon/AtlasMunitionsBeacon.cs @@ -49,10 +49,10 @@ namespace CalamityMod.Items.Weapons.Summon "If an enemy is in close proximity, it will enter Overdrive mode\n" + "When in Overdrive mode the cannon uses three barrels that each collectively fire\n" + "The cannon also heats up the more it fires in overdrive mode\n" + - "Press RMB while holding this item to pick up the cannon and use it for yourself\n" + + "Press right click while holding this item to pick up the cannon and use it for yourself\n" + "When held, the cannon will always be in Overdrive mode\n" + "If the held cannon overheats due to Overdrive mode, you are forced to drop it\n" + - "Pressing RMB allows you to drop it manually\n" + + "Pressing right click allows you to drop it manually\n" + "If the held cannon is dropped near the mount, it will re-attach automatically\n" + "It's surprisingly easy to pick up"); SacrificeTotal = 1; diff --git a/Schematics/MechanicShed.csch b/Schematics/MechanicShed.csch new file mode 100644 index 0000000000..0ef5059d12 Binary files /dev/null and b/Schematics/MechanicShed.csch differ diff --git a/Schematics/SchematicManager.cs b/Schematics/SchematicManager.cs index 3b5098dd17..1c31ce8f70 100644 --- a/Schematics/SchematicManager.cs +++ b/Schematics/SchematicManager.cs @@ -64,6 +64,8 @@ namespace CalamityMod.Schematics internal const string VernalKey = "Vernal Pass"; internal const string VernalFilename = "Schematics/VernalPass.csch"; + internal const string MechanicShedKey = "Mechanic Key"; + internal const string MechanicShedFilename = "Schematics/MechanicShed.csch"; internal const string AstralBeaconKey = "Astral Beacon"; internal const string AstralBeaconFilename = "Schematics/AstralBeacon.csch"; @@ -121,6 +123,8 @@ namespace CalamityMod.Schematics [VernalKey] = CalamitySchematicIO.LoadSchematic(VernalFilename), + [MechanicShedKey] = CalamitySchematicIO.LoadSchematic(MechanicShedFilename), + // Astral world gen structures [AstralBeaconKey] = CalamitySchematicIO.LoadSchematic(AstralBeaconFilename), diff --git a/Schematics/SurfaceHouse_Snow_Mechanic.csch b/Schematics/SurfaceHouse_Snow_Mechanic.csch deleted file mode 100644 index 8e66175a34..0000000000 Binary files a/Schematics/SurfaceHouse_Snow_Mechanic.csch and /dev/null differ diff --git a/Systems/WorldgenManagementSystem.cs b/Systems/WorldgenManagementSystem.cs index fc3e17c815..ea305cf9f9 100644 --- a/Systems/WorldgenManagementSystem.cs +++ b/Systems/WorldgenManagementSystem.cs @@ -92,6 +92,17 @@ namespace CalamityMod.Systems })); } + //mechanic shed + int mechanicIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Sunflowers")); + if (mechanicIndex != -1) + { + tasks.Insert(mechanicIndex + 1, new PassLegacy("Mechanic Shed", (progress, config) => + { + progress.Message = "Placing mechanic shed"; + MechanicShed.PlaceMechanicShed(WorldGen.structures); + })); + } + //Vernal pass int vernalIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Muds Walls In Jungle")); if (vernalIndex != -1) diff --git a/World/MechanicShed.cs b/World/MechanicShed.cs new file mode 100644 index 0000000000..fc28be909d --- /dev/null +++ b/World/MechanicShed.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using CalamityMod.Schematics; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.WorldBuilding; +using static CalamityMod.Schematics.SchematicManager; + +namespace CalamityMod.World +{ + public class MechanicShed + { + public static void PlaceMechanicShed(StructureMap structures) + { + string mapKey = MechanicShedKey; + var schematic = TileMaps[mapKey]; + + int placementPositionX = WorldGen.genRand.Next(WorldGen.snowOriginLeft + 100, WorldGen.snowOriginRight - 100); + int placementPositionY = (int)Main.worldSurface - (Main.maxTilesY / 8); + + bool foundValidGround = false; + int attempts = 0; + while (!foundValidGround && attempts++ < 100000) + { + while (!WorldGen.SolidTile(placementPositionX, placementPositionY) && placementPositionY <= Main.worldSurface) + { + placementPositionY++; + } + + if (Main.tile[placementPositionX, placementPositionY].HasTile || Main.tile[placementPositionX, placementPositionY].WallType > 0) + { + foundValidGround = true; + } + } + + Point placementPoint = new Point(placementPositionX, placementPositionY + 3); + + Vector2 schematicSize = new Vector2(schematic.GetLength(0), schematic.GetLength(1)); + SchematicAnchor anchorType = SchematicAnchor.BottomCenter; + + bool place = true; + PlaceSchematic(mapKey, placementPoint, anchorType, ref place, new Action(FillMechanicChest)); + + Rectangle protectionArea = CalamityUtils.GetSchematicProtectionArea(schematic, placementPoint, anchorType); + structures.AddProtectedStructure(protectionArea, 30); + } + + public static void FillMechanicChest(Chest chest, int Type, bool place) + { + int gizmoGoobabGadgets = Utils.SelectRandom(WorldGen.genRand, ItemID.Stopwatch, ItemID.LifeformAnalyzer, ItemID.DPSMeter); + List contents = new List() + { + new ChestItem(ItemID.Toolbox, 1), + new ChestItem(ItemID.ActuationAccessory, 1), + new ChestItem(gizmoGoobabGadgets, 1), + new ChestItem(ItemID.BuilderPotion, WorldGen.genRand.Next(1, 3)), + new ChestItem(ItemID.GoldCoin, WorldGen.genRand.Next(1, 3)), + }; + + for (int i = 0; i < contents.Count; i++) + { + chest.item[i].SetDefaults(contents[i].Type); + chest.item[i].stack = contents[i].Stack; + } + } + } +}