Adding EntitySource parameter to the used at NewNPC and NewItem methods.

I've decided to use the DebugCommand entity source for anything server related, as it makes the most sense as source. Feel free to discuss.
This commit is contained in:
Patrikkk 2022-02-25 04:42:16 +01:00
parent 2f31322b5f
commit 1b96ed8992
2 changed files with 3 additions and 2 deletions

View file

@ -26,6 +26,7 @@ using TShockAPI;
using TShockAPI.DB;
using Terraria.Localization;
using System.Linq;
using Terraria.DataStructures;
namespace TShockAPI
{
@ -166,7 +167,7 @@ namespace TShockAPI
int spawnTileY;
TShock.Utils.GetRandomClearTileWithInRange(startTileX, startTileY, tileXRange, tileYRange, out spawnTileX,
out spawnTileY);
NPC.NewNPC(spawnTileX * 16, spawnTileY * 16, type);
NPC.NewNPC(new EntitySource_DebugCommand(), spawnTileX * 16, spawnTileY * 16, type);
}
}