diff --git a/Items/Critters/CleaningRoomba.cs b/Items/Critters/AndroombaItem.cs similarity index 86% rename from Items/Critters/CleaningRoomba.cs rename to Items/Critters/AndroombaItem.cs index 75dccf2f6f..aa8c35b389 100644 --- a/Items/Critters/CleaningRoomba.cs +++ b/Items/Critters/AndroombaItem.cs @@ -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() diff --git a/Items/Critters/CleaningRoomba.png b/Items/Critters/AndroombaItem.png similarity index 100% rename from Items/Critters/CleaningRoomba.png rename to Items/Critters/AndroombaItem.png diff --git a/NPCs/DraedonLabThings/Androomba.cs b/NPCs/DraedonLabThings/Androomba.cs index 28e98393b5..8a79fc9eca 100644 --- a/NPCs/DraedonLabThings/Androomba.cs +++ b/NPCs/DraedonLabThings/Androomba.cs @@ -35,7 +35,7 @@ namespace CalamityMod.NPCs.DraedonLabThings NPC.chaseable = false; NPC.HitSound = SoundID.NPCHit4; NPC.DeathSound = SoundID.NPCDeath44; - NPC.catchItem = (short)ModContent.ItemType(); + NPC.catchItem = (short)ModContent.ItemType(); SpawnModBiomes = new int[1] { ModContent.GetInstance().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.") }); } diff --git a/NPCs/DraedonLabThings/Nanodroid.cs b/NPCs/DraedonLabThings/Nanodroid.cs index 7e89709ab6..ec37040409 100644 --- a/NPCs/DraedonLabThings/Nanodroid.cs +++ b/NPCs/DraedonLabThings/Nanodroid.cs @@ -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.") }); } diff --git a/NPCs/TownNPCs/AndroombaFriendly.cs b/NPCs/TownNPCs/AndroombaFriendly.cs index 5850d1c7d0..b37df585c3 100644 --- a/NPCs/TownNPCs/AndroombaFriendly.cs +++ b/NPCs/TownNPCs/AndroombaFriendly.cs @@ -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(); + NPC.catchItem = (short)ModContent.ItemType(); SpawnModBiomes = new int[1] { ModContent.GetInstance().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()) @@ -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); }