/// <summary> /// Adds in a custom entry into the Loot Distribution of the game. /// </summary> /// <param name="classId">The classId of the prefab.</param> /// <param name="prefabPath">The prefab path of the prefab.</param> /// <param name="biomeDistribution">The <see cref="LootDistributionData.BiomeData"/> dictating how the prefab should spawn in the world.</param> /// <param name="info">The WorldEntityInfo of the prefab. For more information on how to set this up, see <see cref="WorldEntityDatabaseHandler"/>.</param> void ILootDistributionHandler.AddLootDistributionData(string classId, string prefabPath, IEnumerable <LootDistributionData.BiomeData> biomeDistribution, WorldEntityInfo info) { Main.AddLootDistributionData(classId, new LootDistributionData.SrcData() { distribution = new List <LootDistributionData.BiomeData>(biomeDistribution), prefabPath = prefabPath }); WorldEntityDatabaseHandler.AddCustomInfo(classId, info); }
/// <summary> /// Adds in a custom entry into the Loot Distribution of the game. /// </summary> /// <param name="prefab">The custom prefab which you want to spawn naturally in the game.</param> /// <param name="biomeDistribution">The <see cref="LootDistributionData.BiomeData"/> dictating how the prefab should spawn in the world.</param> /// <param name="info">The WorldEntityInfo of the prefab. For more information on how to set this up, see <see cref="WorldEntityDatabaseHandler"/>.</param> void ILootDistributionHandler.AddLootDistributionData(ModPrefab prefab, IEnumerable <LootDistributionData.BiomeData> biomeDistribution, WorldEntityInfo info) { Main.AddLootDistributionData(prefab.ClassID, prefab.PrefabFileName, biomeDistribution); WorldEntityDatabaseHandler.AddCustomInfo(prefab.ClassID, info); }
/// <summary> /// Adds in a custom entry into the Loot Distribution of the game. /// You must also add the <see cref="WorldEntityInfo"/> into the <see cref="WorldEntityDatabase"/> using <see cref="WorldEntityDatabaseHandler"/>. /// </summary> /// <param name="data">The <see cref="LootDistributionData.SrcData"/> that contains data related to the spawning of a prefab, also contains the path to the prefab.</param> /// <param name="classId">The classId of the prefab.</param> /// <param name="info">The WorldEntityInfo of the prefab. For more information on how to set this up, see <see cref="WorldEntityDatabaseHandler"/>.</param> void ILootDistributionHandler.AddLootDistributionData(string classId, LootDistributionData.SrcData data, WorldEntityInfo info) { Main.AddLootDistributionData(classId, data); WorldEntityDatabaseHandler.AddCustomInfo(classId, info); }