internal static bool Prefix(object s, EventArgsActiveItemChanged e, object __instance) { if (e.OldItem != null && e.OldItem is AnywhereCustomFurniture) { CustomFurnitureAnywhereMod.modhelper.Reflection.GetMethod(__instance, "RestoreVanillaObjects").Invoke(); return(false); } return(true); }
private void MoreEvents_ActiveItemChanged(object s, EventArgsActiveItemChanged e) { try { if (e.OldItem is AnywhereFurniture) { this.RestoreVanillaObjects(); } if (e.NewItem is Furniture && !(Game1.currentLocation is DecoratableLocation) && Game1.activeClickableMenu == null) { this.InitSpecialObject(e.NewItem); } } catch (Exception err) { this.Monitor.Log("Failed to run logic check due to unexpected error", LogLevel.Error, err); } }
internal void MoreEvents_ActiveItemChanged(object s, EventArgsActiveItemChanged e) { try { if (e.OldItem != null && e.OldItem is AnywhereFurniture) { RestoreVanillaObjects(); } if (e.NewItem != null && e.NewItem is Furniture && !(Game1.currentLocation is StardewValley.Locations.DecoratableLocation) && Game1.activeClickableMenu == null) { InitSpecialObject(e.NewItem); } } catch (Exception err) { Monitor.Log(LogLevel.Error, "Failed to run logic check due to unexpected error", err); } }
private void MoreEvents_ActiveItemChanged(object s, EventArgsActiveItemChanged e) { }