mechanic abandoned shed, tooltip stuff

-added gen for the mechanics abandoned shed
-fixed all instances of LMB and RMB to left click and right click respectively in the shortened tooltips
This commit is contained in:
Mortis3 committed 2023-02-19 22:45:39 -05:00
1 parent 8694c1be9c
commit ae26fd1257
11 files changed
+106 -22

No files matched your search

+2 -2
View File
@@ -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;
}
+5 -5
View File
@@ -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);
+7 -7
View File
@@ -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;
}
+4 -4
View File
@@ -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()
+2 -2
View File
@@ -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()
{
+2 -2
View File
@@ -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;
Binary file not shown.
+4
View File
@@ -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),
Binary file not shown.
+11
View File
@@ -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)
+69
View File
@@ -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<Chest, int, bool>(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<ChestItem> contents = new List<ChestItem>()
{
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;
}
}
}
}