private static void InitSpawner(SpawnSystem __instance)
 {
     try
     {
         WorldSpawnerManager.ConfigureSpawnList(__instance);
         WorldSpawnSessionManager.StartSession(__instance);
     }
     catch (Exception e)
     {
         Log.LogError("Error during Spawn That world spawner init", e);
     }
 }
    private static bool CheckValidPositionConditions(SpawnSystem.SpawnData spawn, Vector3 spawnPoint, ref bool __result)
    {
        if (spawn is null)
        {
            return(true);
        }

        if (!WorldSpawnSessionManager.ValidSpawnPosition(spawnPoint))
        {
            // Early stop. Return immediately and don't try vanilla positional requirements.
            __result = false;
            return(false);
        }

        return(true);
    }
    private static bool FixSpawnCount(GameObject prefab, Vector3 center, float maxRange, ref int __result)
    {
        //Fish and birds all seem to have this tag assigned. It will be counted by the standard method.
        if (prefab.CompareTag("spawned"))
        {
            return(true);
        }

        BaseAI baseAI = ComponentCache.Get <BaseAI>(prefab);

        if (baseAI && baseAI is not null)
        {
            return(true);
        }

        __result = WorldSpawnSessionManager.CountEntitiesInArea(prefab, center, maxRange);
        return(true);
    }
    private static bool FixSpawnsInRangeForNonAI(GameObject prefab, Vector3 centerPoint, float minDistance, ref bool __result)
    {
        //Fish and birds all seem to have this tag assigned. It will be counted by the standard method.
        if (prefab.CompareTag("spawned"))
        {
            return(true);
        }

        BaseAI baseAI = ComponentCache.Get <BaseAI>(prefab);

        if (baseAI && baseAI is not null)
        {
            return(true);
        }

        __result = WorldSpawnSessionManager.AnyInRange(prefab, centerPoint, (int)minDistance);

        return(false);
    }