Code updates
This commit is contained in:
parent
a430310324
commit
393de5e06a
14 changed files with 216 additions and 31 deletions
16
Patches/NPCTrafficManager_SpawnNPC_Patch.cs
Normal file
16
Patches/NPCTrafficManager_SpawnNPC_Patch.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
using HarmonyLib;
|
||||
using System.Linq;
|
||||
|
||||
namespace SpacemarketSimulator.Patches
|
||||
{
|
||||
[HarmonyPatch(typeof(NPCTrafficManager), "SpawnNPC")]
|
||||
public static class NPCTrafficManager_SpawnNPC_Patch
|
||||
{
|
||||
public static void Postfix(NPCTrafficManager __instance)
|
||||
{
|
||||
WaypointNavigator npc = __instance.m_ActiveNPCs.Last();
|
||||
|
||||
npc.gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue