Skip to content

Commit

Permalink
etc
Browse files Browse the repository at this point in the history
  • Loading branch information
aedenthorn committed Nov 17, 2023
1 parent f70a828 commit abf90f7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion FurnitureDisplayFramework/FurnitureDisplayFramework.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.0.0</Version>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<EnableHarmony>true</EnableHarmony>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
Expand Down
5 changes: 1 addition & 4 deletions FurnitureDisplayFramework/FurnitureDisplayFrameworkAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,7 @@ public List<Object> GetSlotObjects(Furniture f)
List<Object> list = new List<Object>();
for(int i = 0; i < data.slots.Length; i++)
{
if(f.modData.TryGetValue("aedenthorn.FurnitureDisplayFramework/" + i, out string slotString))
{
list.Add(ModEntry.GetObjectFromSlot(slotString));
}
list.Add(ModEntry.GetObjectFromSlot(f.modData.TryGetValue("aedenthorn.FurnitureDisplayFramework/" + i, out string slotString) ? slotString : null));
}
return list;
}
Expand Down
14 changes: 3 additions & 11 deletions FurnitureDisplayFramework/Methods.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Newtonsoft.Json.Serialization;
using StardewValley;
using System;
using Object = StardewValley.Object;

namespace FurnitureDisplayFramework
{
Expand All @@ -22,17 +24,7 @@ private static void HandleSerializationError(object sender, ErrorEventArgs e)

private static Object GetObjectFromID(string id, int amount, int quality)
{
if (int.TryParse(id, out int index))
{
//SMonitor.Log($"Spawning object with index {id}");
return new Object(index, amount, false, -1, quality);
}
foreach (var kvp in Game1.objectInformation)
{
if (kvp.Value.StartsWith(id + "/"))
return new Object(kvp.Key, amount, false, -1, quality);
}
return null;
return new Object(id, amount, false, -1, quality);
/*
//SMonitor.Log($"Trying to get object {id}, DGA {apiDGA != null}, JA {apiJA != null}");
Expand Down
1 change: 0 additions & 1 deletion FurnitureDisplayFramework/ModEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public partial class ModEntry : Mod
public static ModConfig Config;

public static ModEntry context;
private static IDynamicGameAssetsApi apiDGA;
private static IJsonAssetsApi apiJA;
public static Dictionary<string, FurnitureDisplayData> furnitureDisplayDict = new Dictionary<string, FurnitureDisplayData>();
public static readonly string frameworkPath = "Mods/aedenthorn.FurnitureDisplayFramework/dictionary";
Expand Down
2 changes: 1 addition & 1 deletion FurnitureDisplayFramework/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Name": "Furniture Display Framework",
"Author": "aedenthorn",
"Version": "0.4.0",
"Version": "0.5.0",
"Description": "FurnitureDisplayFramework.",
"UniqueID": "aedenthorn.FurnitureDisplayFramework",
"EntryDll": "FurnitureDisplayFramework.dll",
Expand Down

0 comments on commit abf90f7

Please sign in to comment.