Skip to content

Commit ce1d8b6

Browse files
committed
v0.4.4, update to Terraria v1.4.3.6 changes
1 parent 2509983 commit ce1d8b6

File tree

7 files changed

+11
-9
lines changed

7 files changed

+11
-9
lines changed

HEROsModNetwork/GeneralMessages.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,8 @@ private static void ProcessSpawnNPCRequest(ref BinaryReader reader, int playerNu
11861186
}
11871187
}
11881188
}
1189-
NPC.NewNPC((int)player.GameInstance.position.X, (int)player.GameInstance.position.Y, npcType);
1189+
// Natural, Debug, or Custom IEntitySource?
1190+
NPC.NewNPC(NPC.GetSpawnSourceForNaturalSpawn(), (int)player.GameInstance.position.X, (int)player.GameInstance.position.Y, npcType);
11901191
}
11911192
}
11921193

HEROsModNetwork/Network.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ public static void SpawnNPC(int type, Vector2 position)
10281028
break;
10291029
}
10301030
}
1031-
if (!npcFound) NPC.NewNPC((int)position.X, (int)position.Y, type);
1031+
if (!npcFound) NPC.NewNPC(NPC.GetSpawnSourceForNaturalSpawn(), (int)position.X, (int)position.Y, type);
10321032
}
10331033

10341034
public static void ResetAllPlayers()

HEROsModServices/InfiniteReach.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ public override void ResetEffects()
128128
Player.tileRangeX = int.MaxValue / 32 - 20;
129129
Player.tileRangeY = int.MaxValue / 32 - 20;
130130

131-
if (Main.SmartCursorEnabled)
131+
if (Main.SmartCursorWanted) // Check out SmartCursorIsUsed as well.
132132
{
133-
Main.SmartCursorEnabled = false;
133+
Main.SmartCursorWanted = false;
134134
Main.NewText(HEROsMod.HeroText("SmartCursorAutomaticallyDisabledInfinteReachMod"));
135135
}
136136
}

HEROsModServices/MobSpawner.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ public virtual void Spawn(int playerIndex)
802802
}
803803
}
804804

805-
int index = NPC.NewNPC((int)player.position.X, (int)player.position.Y, Type);
805+
int index = NPC.NewNPC(NPC.GetSpawnSourceForNaturalSpawn(), (int)player.position.X, (int)player.position.Y, Type);
806806
if (NetID < 0)
807807
{
808808
Main.npc[index].SetDefaults(NetID);
@@ -877,7 +877,7 @@ public override void Spawn(int playerIndex)
877877
}
878878
IL_162:
879879
num3 = num5 * 16;
880-
int num7 = NPC.NewNPC(num2, num3, 113, 0);
880+
int num7 = NPC.NewNPC(NPC.GetSpawnSourceForNaturalSpawn(), num2, num3, 113, 0);
881881
if (Main.netMode == 0)
882882
{
883883
Main.NewText(Language.GetTextValue("Announcement.HasAwoken", Main.npc[num7].TypeName), 175, 75, 255);

HEROsModServices/PrefixEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ internal void ClearOutItemSlots()
158158
Item item2 = player.GetItem(player.whoAmI, item, GetItemSettings.GetItemInDropItemCheck);
159159
if (item2.stack > 0)
160160
{
161-
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);
161+
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);
162162
Main.item[num].newAndShiny = false;
163163
if (Main.netMode == 1)
164164
{

UIKit/UIComponents/Slot.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System;
66
using Terraria;
77
using Terraria.Audio;
8+
using Terraria.DataStructures;
89
using Terraria.GameContent;
910

1011
namespace HEROsMod.UIKit.UIComponents
@@ -120,7 +121,7 @@ private void Slot2_onLeftClick(object sender, EventArgs e)
120121
{
121122
if (Main.keyState.IsKeyDown(Keys.LeftShift))
122123
{
123-
Main.player[Main.myPlayer].QuickSpawnItem(this.item.type, this.item.maxStack);
124+
Main.player[Main.myPlayer].QuickSpawnItem(new EntitySource_DebugCommand(), this.item.type, this.item.maxStack);
124125
return;
125126
}
126127
Main.mouseItem = item.Clone();

build.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
author = HERO, jopojelly, Matt Thompson, Panini
2-
version = 0.4.3
2+
version = 0.4.4
33
versionScheme = ?.?.Fix.Quickfix
44
displayName = HERO's Mod
55
homepage = http://forums.terraria.org/index.php?threads/heros-mod-creative-mode-server-management-and-over-25-tools-1-3-1-1-compatible.44650/

0 commit comments

Comments
 (0)