From 9f1c4549345ba20d799cf46ee44851a1f61f561e Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Fri, 3 Sep 2021 18:35:23 -0400 Subject: remove asset propagation for Data/Bundles --- src/SMAPI/Metadata/CoreAssetPropagator.cs | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'src/SMAPI/Metadata/CoreAssetPropagator.cs') diff --git a/src/SMAPI/Metadata/CoreAssetPropagator.cs b/src/SMAPI/Metadata/CoreAssetPropagator.cs index a8686ca4..708673c3 100644 --- a/src/SMAPI/Metadata/CoreAssetPropagator.cs +++ b/src/SMAPI/Metadata/CoreAssetPropagator.cs @@ -4,7 +4,6 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using Microsoft.Xna.Framework.Graphics; -using Netcode; using StardewModdingAPI.Framework.ContentManagers; using StardewModdingAPI.Framework.Reflection; using StardewModdingAPI.Internal; @@ -16,7 +15,6 @@ using StardewValley.Characters; using StardewValley.GameData.Movies; using StardewValley.Locations; using StardewValley.Menus; -using StardewValley.Network; using StardewValley.Objects; using StardewValley.Projectiles; using StardewValley.TerrainFeatures; @@ -283,32 +281,6 @@ namespace StardewModdingAPI.Metadata Game1.bigCraftablesInformation = content.Load>(key); return true; - case "data\\bundles": // NetWorldState constructor - if (Context.IsMainPlayer && Game1.netWorldState != null) - { - var bundles = this.Reflection.GetField(Game1.netWorldState.Value, "bundles").GetValue(); - var rewards = this.Reflection.GetField>(Game1.netWorldState.Value, "bundleRewards").GetValue(); - foreach (var pair in content.Load>(key)) - { - int bundleKey = int.Parse(pair.Key.Split('/')[1]); - int rewardsCount = pair.Value.Split('/')[2].Split(' ').Length; - - // add bundles - if (!bundles.TryGetValue(bundleKey, out bool[] values) || values.Length < rewardsCount) - { - values ??= new bool[0]; - - bundles.Remove(bundleKey); - bundles[bundleKey] = values.Concat(Enumerable.Repeat(false, rewardsCount - values.Length)).ToArray(); - } - - // add bundle rewards - if (!rewards.ContainsKey(bundleKey)) - rewards[bundleKey] = false; - } - } - break; - case "data\\clothinginformation": // Game1.LoadContent Game1.clothingInformation = content.Load>(key); return true; -- cgit