From 967b146d87104f93c61d90d249c4743e160471c6 Mon Sep 17 00:00:00 2001 From: hyperion51 Date: Thu, 30 Apr 2020 00:12:41 +0100 Subject: [PATCH] Fixed Resources Zone generator was attempting to distribute all simple commodities, now it only distributes those with map layers Blueprints can now also produce simple commodities --- Assets/Scripts/ServerShared/BlueprintData.cs | 2 +- Assets/Scripts/StrategyGameManager.cs | 2 +- Economy.Server/Program.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/ServerShared/BlueprintData.cs b/Assets/Scripts/ServerShared/BlueprintData.cs index 7b20f873c..8aa6f0fad 100644 --- a/Assets/Scripts/ServerShared/BlueprintData.cs +++ b/Assets/Scripts/ServerShared/BlueprintData.cs @@ -15,7 +15,7 @@ public class BlueprintData : DatabaseEntry, INamedEntry [InspectableDatabaseLink(typeof(ItemData)), JsonProperty("ingredients"), Key(2)] public Dictionary Ingredients = new Dictionary(); - [InspectableDatabaseLink(typeof(CraftedItemData)), JsonProperty("item"), Key(3)] + [InspectableDatabaseLink(typeof(ItemData)), JsonProperty("item"), Key(3)] public Guid Item; [InspectableField, JsonProperty("quantity"), Key(4)] diff --git a/Assets/Scripts/StrategyGameManager.cs b/Assets/Scripts/StrategyGameManager.cs index 09edbc40a..8197bb519 100644 --- a/Assets/Scripts/StrategyGameManager.cs +++ b/Assets/Scripts/StrategyGameManager.cs @@ -425,7 +425,7 @@ public class StrategyGameManager : MonoBehaviour global: _context.GlobalData, zone: zoneData, mapLayers: _context.MapLayers.Values, - resources: _cache.GetAll(), + resources: _cache.GetAll().Where(i=>i.ResourceDensity.Any()), orbitData: out orbits, planetsData: out planets); _cache.AddAll(orbits); diff --git a/Economy.Server/Program.cs b/Economy.Server/Program.cs index 414b483d7..584873baa 100644 --- a/Economy.Server/Program.cs +++ b/Economy.Server/Program.cs @@ -160,7 +160,7 @@ namespace ChatApp.Server global: context.GlobalData, zone: zone, mapLayers: context.MapLayers.Values, - resources: cache.GetAll(), + resources: cache.GetAll().Where(i=>i.ResourceDensity.Any()), orbitData: out orbits, planetsData: out planets); cache.AddAll(orbits);