private void RefreshInventoryPanel() { for (int i = 0; i < inventoryResources.Count; i++) { ResourceEntry resourceEntry = inventoryResources[i]; for (int j = 0; j < productionData.resources.Count; j++) { Resource resource = productionData.resources[j]; if (resource.ResourceType == resourceEntry.resourceType) { resourceEntry.SetAmount(resource.Amount); resourceEntry.SetIncrement(settlement.Production.LevelModule.Level * 5); break; } } } }