Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loot distribution dependency on the prefab database #501

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Nautilus/Handlers/LootDistributionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ public static void AddLootDistributionData(string classId, LootDistributionData.
/// <param name="biomeDistribution">The <see cref="LootDistributionData.BiomeData"/> dictating how the prefab should spawn in the world.</param>
public static void AddLootDistributionData(string classId, params LootDistributionData.BiomeData[] biomeDistribution)
{
CraftData.PreparePrefabIDCache();

if (!PrefabDatabase.TryGetPrefabFilename(classId, out var filename))
{
InternalLogger.Error($"Could not find prefab file path for class ID '{classId}'. Cancelling loot distribution addition.");
Expand All @@ -112,6 +114,8 @@ public static void AddLootDistributionData(string classId, params LootDistributi
/// <param name="biomeDistribution">The <see cref="LootDistributionData.BiomeData"/> dictating how the prefab should spawn in the world.</param>
public static void AddLootDistributionData(string classId, WorldEntityInfo info, params LootDistributionData.BiomeData[] biomeDistribution)
{
CraftData.PreparePrefabIDCache();

if (!PrefabDatabase.TryGetPrefabFilename(classId, out var filename))
{
InternalLogger.Error($"Could not find prefab file path for class ID '{classId}'. Cancelling loot distribution addition.");
Expand Down