Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions Common/AssetManager.cs

This file was deleted.

5 changes: 0 additions & 5 deletions Common/Common.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,12 @@
<Import_RootNamespace>Common</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)AssetManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)ConfigurationManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CreatureManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)CreatureManager_v2.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DebugUtils.cs" />
<Compile Include="$(MSBuildThisFileDirectory)LocationConfiguration.cs" />
<Compile Include="$(MSBuildThisFileDirectory)LocationManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)LootManager_v2.cs" />
<Compile Include="$(MSBuildThisFileDirectory)PieceManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)TraderManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)WarpLocation.cs" />
<Compile Include="$(MSBuildThisFileDirectory)WarpLogger.cs" />
<Compile Include="$(MSBuildThisFileDirectory)LootManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)YAMLManager.cs" />
Expand Down
17 changes: 0 additions & 17 deletions Common/DebugUtils.cs

This file was deleted.

34 changes: 0 additions & 34 deletions Common/PieceManager.cs

This file was deleted.

80 changes: 0 additions & 80 deletions Common/TraderManager.cs

This file was deleted.

29 changes: 0 additions & 29 deletions Common/WarpLocation.cs

This file was deleted.

22 changes: 11 additions & 11 deletions Common/YAMLManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ public void ParseCustomYamls(ConfigurationManager.Toggle useCustomLocationYAML)
try
{
customCreatureYamlContent = File.ReadAllText(customCreatureListYamlFilePath);
WarpLogger.Logger.LogInfo("Successfully loaded warpalicious.More_World_Locations_CreatureLists.yml from BepInEx config folder");
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogInfo("Successfully loaded warpalicious.More_World_Locations_CreatureLists.yml from BepInEx config folder");
}
catch (System.Exception ex)
{
WarpLogger.Logger.LogError("Failed to load custom creature YAML: " + ex.Message);
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogError("Failed to load custom creature YAML: " + ex.Message);
}
}

Expand All @@ -65,11 +65,11 @@ public void ParseCustomYamls(ConfigurationManager.Toggle useCustomLocationYAML)
try
{
customlootYamlContent = File.ReadAllText(customLootListYamlFilePath);
WarpLogger.Logger.LogInfo("Successfully loaded warpalicious.More_World_Locations_LootLists.yml from BepInEx config folder");
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogInfo("Successfully loaded warpalicious.More_World_Locations_LootLists.yml from BepInEx config folder");
}
catch (System.Exception ex)
{
WarpLogger.Logger.LogError("Failed to load custom loot YAML: " + ex.Message);
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogError("Failed to load custom loot YAML: " + ex.Message);
}
}
}
Expand All @@ -82,7 +82,7 @@ public void ParseCreatureYaml(string filename)
if (File.Exists(customCreatureListYamLFilePath))
{
customCreatureYamlContent = File.ReadAllText(customCreatureListYamLFilePath);
WarpLogger.Logger.LogInfo("Successfully loaded + " + filename + "_CreatureLists.yml file from BepinEx config folder");;
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogInfo("Successfully loaded + " + filename + "_CreatureLists.yml file from BepinEx config folder");;
}
}

Expand All @@ -98,11 +98,11 @@ public void ParseTraderYaml(string filename, ConfigurationManager.Toggle useCust
try
{
File.WriteAllText(customTraderListYamlFilePath, defaultTraderYamlContent);
WarpLogger.Logger.LogInfo("Auto-extracted " + filename + " to BepInEx config folder");
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogInfo("Auto-extracted " + filename + " to BepInEx config folder");
}
catch (System.Exception ex)
{
WarpLogger.Logger.LogError("Failed to extract " + filename + ": " + ex.Message);
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogError("Failed to extract " + filename + ": " + ex.Message);
}
}

Expand All @@ -111,11 +111,11 @@ public void ParseTraderYaml(string filename, ConfigurationManager.Toggle useCust
try
{
customTraderYamlContent = File.ReadAllText(customTraderListYamlFilePath);
WarpLogger.Logger.LogInfo("Successfully loaded " + filename + " from BepInEx config folder");
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogInfo("Successfully loaded " + filename + " from BepInEx config folder");
}
catch (System.Exception ex)
{
WarpLogger.Logger.LogError("Failed to load custom trader YAML: " + ex.Message);
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogError("Failed to load custom trader YAML: " + ex.Message);
}
}
}
Expand All @@ -128,7 +128,7 @@ public void ParseContainerYaml(string filename)
if (File.Exists(customCreatureListYamLFilePath))
{
customlootYamlContent = File.ReadAllText(customCreatureListYamLFilePath);
WarpLogger.Logger.LogInfo("Successfully loaded + " + filename + "_ContainerLists.yml file from BepinEx config folder");;
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogInfo("Successfully loaded + " + filename + "_ContainerLists.yml file from BepinEx config folder");;
}
}

Expand All @@ -140,7 +140,7 @@ public void ParsePickableItemYaml(string filename)
if (File.Exists(customCreatureListYamLFilePath))
{
customPickableItemContent = File.ReadAllText(customCreatureListYamLFilePath);
WarpLogger.Logger.LogInfo("Successfully loaded + " + filename + "_PickableItemLists.yml file from BepinEx config folder");;
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogInfo("Successfully loaded + " + filename + "_PickableItemLists.yml file from BepinEx config folder");;
}
}

Expand Down
17 changes: 13 additions & 4 deletions More World Locations_AIO/Src/Traders/TraderPrefabs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private static void BuildAllTraderItemsFromYAML()
{
if (kvp.Key == "version") continue;

var itemsYaml = deserializer.Deserialize<List<TraderManager.TradeItemYAML>>(
var itemsYaml = deserializer.Deserialize<List<TradeItemYAML>>(
new SerializerBuilder().Build().Serialize(kvp.Value));

List<Trader.TradeItem> items = new List<Trader.TradeItem>();
Expand All @@ -117,8 +117,8 @@ private static void BuildAllTraderItemsFromYAML()
}
catch (Exception ex)
{
WarpLogger.Logger.LogError("Failed to parse trader YAML: " + ex.Message);
WarpLogger.Logger.LogWarning("Falling back to hardcoded trader items");
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogError("Failed to parse trader YAML: " + ex.Message);
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogWarning("Falling back to hardcoded trader items");
}
}

Expand All @@ -129,7 +129,7 @@ private static void BuildAllTraderItemsFromYAML()
return items;
}

WarpLogger.Logger.LogWarning($"No YAML data for {traderName}, using hardcoded fallback");
More_World_Locations_AIOPlugin.More_World_Locations_AIOLogger.LogWarning($"No YAML data for {traderName}, using hardcoded fallback");

switch (traderName)
{
Expand Down Expand Up @@ -279,5 +279,14 @@ private static void AddItem(List<Trader.TradeItem> items, string prefabName, int
if (item != null)
items.Add(item);
}

public class TradeItemYAML
{
public string PrefabName { get; set; }
public int Stack { get; set; } = 1;
public int Price { get; set; }
public string RequiredGlobalKey { get; set; } = "";
public string NotRequiredGlobalKey { get; set; } = "";
}

}