misc fixes

This commit is contained in:
GinYuH authored and Cameron Ewell committed 2022-09-26 22:18:11 -04:00
1 parent c9d33d29d2
commit b4e5ed79b4
5 files changed
+45 -15

No files matched your search

@@ -6,13 +6,13 @@ using Terraria.ModLoader;
namespace CalamityMod.Items.Critters
{
public class CleaningRoomba : ModItem
public class AndroombaItem : ModItem
{
public override void SetStaticDefaults()
{
SacrificeTotal = 5;
DisplayName.SetDefault("Cleaning Roomba");
Tooltip.SetDefault("Right click the roomba with a solution to insert it\n"+"While a solution is inserted, the roomba will activate and start spreading the contents of the solution");
DisplayName.SetDefault("Androomba");
Tooltip.SetDefault("Right click the roomba with a solution to insert it\n"+"While a solution is inserted, the roomba will start spreading its contents");
}
public override void SetDefaults()
File renamed without changes.

Before

Width:  |  Height:  |  Size: 383 B

After

Width:  |  Height:  |  Size: 383 B

+2 -2
View File
@@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.DraedonLabThings
NPC.chaseable = false;
NPC.HitSound = SoundID.NPCHit4;
NPC.DeathSound = SoundID.NPCDeath44;
NPC.catchItem = (short)ModContent.ItemType<CleaningRoomba>();
NPC.catchItem = (short)ModContent.ItemType<AndroombaItem>();
SpawnModBiomes = new int[1] { ModContent.GetInstance<ArsenalLabBiome>().Type };
DrawOffsetY = -17;
}
@@ -45,7 +45,7 @@ namespace CalamityMod.NPCs.DraedonLabThings
bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("Slowly moving back and forth, these contraptions endlessly operate with the fruitless goal of cleaning the long abandoned labs.")
new FlavorTextBestiaryInfoElement("Slowly moving back and forth, these contraptions operate endlessly with the fruitless goal of cleaning the long, now abandoned labs.")
});
}
+1 -1
View File
@@ -33,7 +33,7 @@ namespace CalamityMod.NPCs.DraedonLabThings
bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("Not every creation has to be large and flashy to be a success, sometimes it's good to take a step back and appreciate how much the smaller things contribute.")
new FlavorTextBestiaryInfoElement("Not every creation has to be large and flashy to be a success, sometimes it's good to take a step back and appreciate how much that smaller things such as these devices contribute.")
});
}
+39 -9
View File
@@ -15,10 +15,9 @@ namespace CalamityMod.NPCs.TownNPCs
{
public class AndroombaFriendly : ModNPC
{
public static Rectangle MouseScreenArea => Utils.CenteredRectangle(Main.MouseScreen, Vector2.One * 2f);
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Androomba");
DisplayName.SetDefault("Androomba Pal");
Main.npcFrameCount[NPC.type] = 9;
NPCID.Sets.CountsAsCritter[NPC.type] = true;
}
@@ -31,13 +30,14 @@ namespace CalamityMod.NPCs.TownNPCs
NPC.width = 36;
NPC.height = 16;
NPC.lifeMax = 80;
NPC.friendly = true;
NPC.knockBackResist = 0f;
NPC.noGravity = true;
NPC.noTileCollide = false;
NPC.chaseable = false;
NPC.HitSound = SoundID.NPCHit4;
NPC.DeathSound = SoundID.NPCDeath44;
NPC.catchItem = (short)ModContent.ItemType<CleaningRoomba>();
NPC.catchItem = (short)ModContent.ItemType<AndroombaItem>();
SpawnModBiomes = new int[1] { ModContent.GetInstance<ArsenalLabBiome>().Type };
}
@@ -46,7 +46,7 @@ namespace CalamityMod.NPCs.TownNPCs
bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
// Will move to localization whenever that is cleaned up.
new FlavorTextBestiaryInfoElement("placeholdertext")
new FlavorTextBestiaryInfoElement("Easily reversed engineered, these robots can be made to spread whatever you put into them, giving them a new purpose.")
});
}
@@ -105,8 +105,6 @@ namespace CalamityMod.NPCs.TownNPCs
if (Main.mouseRight && Main.mouseRightRelease && Main.LocalPlayer.Distance(NPC.Center) < 300)
{
NPC.netUpdate = true;
Main.LocalPlayer.ConsumeItem(Main.LocalPlayer.HeldItem.type);
SoundEngine.PlaySound(SoundID.Item87);
int soltype = 0;
if (Main.LocalPlayer.HeldItem.type == ModContent.ItemType<AstralSolution>())
@@ -134,10 +132,15 @@ namespace CalamityMod.NPCs.TownNPCs
break;
}
}
NPC.ai[3] = soltype;
if (reset)
if (NPC.ai[3] != soltype || NPC.ai[0] == 0)
{
ChangeAI(1);
Main.LocalPlayer.ConsumeItem(Main.LocalPlayer.HeldItem.type);
SoundEngine.PlaySound(SoundID.Item87);
NPC.ai[3] = soltype;
if (reset)
{
ChangeAI(1);
}
}
}
}
@@ -153,6 +156,32 @@ namespace CalamityMod.NPCs.TownNPCs
int y = (int)(NPC.Center.Y / 16f);
if (conversionType <= 4)
{
ConvertType type = ConvertType.Pure;
switch (conversionType)
{
case 0:
type = ConvertType.Pure;
break;
case 1:
type = ConvertType.Corrupt;
break;
case 2:
type = ConvertType.Hallow;
break;
case 4:
type = ConvertType.Crimson;
break;
}
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
AstralBiome.ConvertFromAstral(x + i, y + j, type);
AstralBiome.ConvertFromAstral(x - i, y - j, type);
AstralBiome.ConvertFromAstral(x + i, y - j, type);
AstralBiome.ConvertFromAstral(x - i, y + j, type);
}
}
WorldGen.Convert(x, y, conversionType, 2);
}
else
@@ -204,6 +233,7 @@ namespace CalamityMod.NPCs.TownNPCs
}
if (NPC.frame.Y > frameHeight * 8)
{
NPC.frame.Y = frameHeight;
NPC.ai[2] *= -1;
ChangeAI(1);
}