Fixed Androombas not being released properly
This commit is contained in:
1 parent
58c9851cc2
commit
6ab0799689
3 files changed
+8
-28
No files matched your search
@@ -29,27 +29,8 @@ namespace CalamityMod.Items.Critters
|
||||
Item.value = Item.buyPrice(0, 0, 30, 0);
|
||||
Item.width = 36;
|
||||
Item.height = 16;
|
||||
//Item.makeNPC = (short)ModContent.NPCType<AndroombaFriendly>(); This doesn't work apparently
|
||||
Item.makeNPC = (short)ModContent.NPCType<AndroombaFriendly>();
|
||||
Item.rare = ModContent.RarityType<DarkOrange>();
|
||||
}
|
||||
|
||||
public override bool? UseItem(Player player)
|
||||
{
|
||||
if (Main.LocalPlayer.Distance(Main.MouseWorld) < 300)
|
||||
{
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
NPC.NewNPC(new EntitySource_BossSpawn(player), (int)Main.MouseWorld.X, (int)Main.MouseWorld.Y, ModContent.NPCType<AndroombaFriendly>(), 1);
|
||||
}
|
||||
else
|
||||
NetMessage.SendData(MessageID.SpawnBoss, -1, -1, null, player.whoAmI, ModContent.NPCType<AndroombaFriendly>());
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ namespace CalamityMod.NPCs.DraedonLabThings
|
||||
DisplayName.SetDefault("Androomba");
|
||||
Main.npcFrameCount[NPC.type] = 22;
|
||||
NPCID.Sets.CountsAsCritter[NPC.type] = true;
|
||||
Main.npcCatchable[NPC.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
{
|
||||
DisplayName.SetDefault("Androomba Pal");
|
||||
Main.npcFrameCount[NPC.type] = 9;
|
||||
Main.npcCatchable[NPC.type] = true;
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
@@ -44,17 +45,14 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
NPC.dontTakeDamage = true;
|
||||
}
|
||||
|
||||
public override bool CanChat()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool CanChat() => false;
|
||||
|
||||
public override void SetBestiary(BestiaryDatabase database, BestiaryEntry bestiaryEntry)
|
||||
{
|
||||
bestiaryEntry.Info.AddRange(new IBestiaryInfoElement[] {
|
||||
|
||||
// Will move to localization whenever that is cleaned up.
|
||||
new FlavorTextBestiaryInfoElement("Easily reversed engineered, these robots can be made to spread whatever you put into them, giving them a new purpose.")
|
||||
// Will move to localization whenever that is cleaned up.
|
||||
new FlavorTextBestiaryInfoElement("Easily reversed engineered, these robots can be made to spread whatever you put into them, giving them a new purpose.")
|
||||
});
|
||||
}
|
||||
|
||||
@@ -213,8 +211,8 @@ namespace CalamityMod.NPCs.TownNPCs
|
||||
{
|
||||
/*
|
||||
-Frame 0: Asleep
|
||||
-Frames 1-4: Moving
|
||||
-Frames 5-9: Turning
|
||||
-Frames 1-4: Moving
|
||||
-Frames 5-9: Turning
|
||||
*/
|
||||
NPC.frameCounter += 1.0;
|
||||
if (NPC.frameCounter > 6.0)
|
||||
|
||||
Reference in new issue
Block a user