Skip to content

Commit

Permalink
v0.4.4, update to Terraria v1.4.3.6 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JavidPack committed Mar 2, 2022
1 parent 2509983 commit ce1d8b6
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
3 changes: 2 additions & 1 deletion HEROsModNetwork/GeneralMessages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,8 @@ private static void ProcessSpawnNPCRequest(ref BinaryReader reader, int playerNu
}
}
}
NPC.NewNPC((int)player.GameInstance.position.X, (int)player.GameInstance.position.Y, npcType);
// Natural, Debug, or Custom IEntitySource?
NPC.NewNPC(NPC.GetSpawnSourceForNaturalSpawn(), (int)player.GameInstance.position.X, (int)player.GameInstance.position.Y, npcType);
}
}

Expand Down
2 changes: 1 addition & 1 deletion HEROsModNetwork/Network.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ public static void SpawnNPC(int type, Vector2 position)
break;
}
}
if (!npcFound) NPC.NewNPC((int)position.X, (int)position.Y, type);
if (!npcFound) NPC.NewNPC(NPC.GetSpawnSourceForNaturalSpawn(), (int)position.X, (int)position.Y, type);
}

public static void ResetAllPlayers()
Expand Down
4 changes: 2 additions & 2 deletions HEROsModServices/InfiniteReach.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ public override void ResetEffects()
Player.tileRangeX = int.MaxValue / 32 - 20;
Player.tileRangeY = int.MaxValue / 32 - 20;

if (Main.SmartCursorEnabled)
if (Main.SmartCursorWanted) // Check out SmartCursorIsUsed as well.
{
Main.SmartCursorEnabled = false;
Main.SmartCursorWanted = false;
Main.NewText(HEROsMod.HeroText("SmartCursorAutomaticallyDisabledInfinteReachMod"));
}
}
Expand Down
4 changes: 2 additions & 2 deletions HEROsModServices/MobSpawner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ public virtual void Spawn(int playerIndex)
}
}

int index = NPC.NewNPC((int)player.position.X, (int)player.position.Y, Type);
int index = NPC.NewNPC(NPC.GetSpawnSourceForNaturalSpawn(), (int)player.position.X, (int)player.position.Y, Type);
if (NetID < 0)
{
Main.npc[index].SetDefaults(NetID);
Expand Down Expand Up @@ -877,7 +877,7 @@ public override void Spawn(int playerIndex)
}
IL_162:
num3 = num5 * 16;
int num7 = NPC.NewNPC(num2, num3, 113, 0);
int num7 = NPC.NewNPC(NPC.GetSpawnSourceForNaturalSpawn(), num2, num3, 113, 0);
if (Main.netMode == 0)
{
Main.NewText(Language.GetTextValue("Announcement.HasAwoken", Main.npc[num7].TypeName), 175, 75, 255);
Expand Down
2 changes: 1 addition & 1 deletion HEROsModServices/PrefixEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ internal void ClearOutItemSlots()
Item item2 = player.GetItem(player.whoAmI, item, GetItemSettings.GetItemInDropItemCheck);
if (item2.stack > 0)
{
int num = Item.NewItem((int)player.position.X, (int)player.position.Y, player.width, player.height, item2.type, item2.stack, false, (int)item.prefix, true, false);
int num = Item.NewItem(player.GetItemSource_Misc(ItemSourceID.PlayerDropItemCheck), (int)player.position.X, (int)player.position.Y, player.width, player.height, item2.type, item2.stack, false, (int)item.prefix, true, false);
Main.item[num].newAndShiny = false;
if (Main.netMode == 1)
{
Expand Down
3 changes: 2 additions & 1 deletion UIKit/UIComponents/Slot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.GameContent;

namespace HEROsMod.UIKit.UIComponents
Expand Down Expand Up @@ -120,7 +121,7 @@ private void Slot2_onLeftClick(object sender, EventArgs e)
{
if (Main.keyState.IsKeyDown(Keys.LeftShift))
{
Main.player[Main.myPlayer].QuickSpawnItem(this.item.type, this.item.maxStack);
Main.player[Main.myPlayer].QuickSpawnItem(new EntitySource_DebugCommand(), this.item.type, this.item.maxStack);
return;
}
Main.mouseItem = item.Clone();
Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
author = HERO, jopojelly, Matt Thompson, Panini
version = 0.4.3
version = 0.4.4
versionScheme = ?.?.Fix.Quickfix
displayName = HERO's Mod
homepage = http://forums.terraria.org/index.php?threads/heros-mod-creative-mode-server-management-and-over-25-tools-1-3-1-1-compatible.44650/
Expand Down

0 comments on commit ce1d8b6

Please sign in to comment.