Skip to content

Commit

Permalink
Merge pull request #52 from jpw1991/51-prepare-for-ashlands
Browse files Browse the repository at this point in the history
51 prepare for ashlands
  • Loading branch information
jpw1991 committed May 14, 2024
2 parents eb48cdd + 0f77963 commit db0eece
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 27 deletions.
4 changes: 2 additions & 2 deletions ChebsMercenaries/BasePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public class BasePlugin : BaseUnityPlugin
{
public const string PluginGuid = "com.chebgonaz.chebsmercenaries";
public const string PluginName = "ChebsMercenaries";
public const string PluginVersion = "2.3.8";
public const string PluginVersion = "2.4.0";
private const string ConfigFileName = PluginGuid + ".cfg";
private static readonly string ConfigFileFullPath = Path.Combine(Paths.ConfigPath, ConfigFileName);

public readonly System.Version ChebsValheimLibraryVersion = new("2.5.2");
public readonly System.Version ChebsValheimLibraryVersion = new("2.6.1");

private readonly Harmony harmony = new(PluginGuid);

Expand Down
9 changes: 4 additions & 5 deletions ChebsMercenaries/ChebsMercenaries.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<AssemblyCulture>$(NeutralLanguage)</AssemblyCulture>

<!-- Version Information -->
<Version>2.3.8.0</Version>
<Version>2.4.0.0</Version>
<FileVersion>$(Version)</FileVersion>
<AssemblyVersion>$(Version)</AssemblyVersion>

Expand All @@ -32,13 +32,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1">
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ChebsValheimLibrary" Version="2.5.4"/>
<PackageReference Include="HarmonyX" Version="2.10.2"/>
<PackageReference Include="JotunnLib" Version="2.16.2"/>
<PackageReference Include="ChebsValheimLibrary" Version="2.6.1" />
<PackageReference Include="JotunnLib" Version="2.19.3" />
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
2 changes: 1 addition & 1 deletion ChebsMercenaries/Items/AxeOfCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public override void UpdateRecipe()
UpdateRecipe(CraftingStationRequired, CraftingCost, CraftingStationLevel);
}

public override CustomItem GetCustomItemFromPrefab(GameObject prefab)
public override CustomItem GetCustomItemFromPrefab(GameObject prefab, bool fixReferences = true)
{
var config = new ItemConfig();
config.Name = NameLocalization;
Expand Down
2 changes: 1 addition & 1 deletion ChebsMercenaries/Items/MaceOfCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public override void UpdateRecipe()
UpdateRecipe(CraftingStationRequired, CraftingCost, CraftingStationLevel);
}

public override CustomItem GetCustomItemFromPrefab(GameObject prefab)
public override CustomItem GetCustomItemFromPrefab(GameObject prefab, bool fixReferences = true)
{
var config = new ItemConfig();
config.Name = NameLocalization;
Expand Down
2 changes: 1 addition & 1 deletion ChebsMercenaries/Items/SwordOfCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public override void UpdateRecipe()
UpdateRecipe(CraftingStationRequired, CraftingCost, CraftingStationLevel);
}

public override CustomItem GetCustomItemFromPrefab(GameObject prefab)
public override CustomItem GetCustomItemFromPrefab(GameObject prefab, bool fixReferences = true)
{
var config = new ItemConfig();
config.Name = NameLocalization;
Expand Down
4 changes: 2 additions & 2 deletions ChebsMercenaries/Package/manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "ChebsMercenaries",
"description": "Cheb's Mercenaries adds mercenaries to Valheim that you can purchase with gold and upgrade with materials to fight (warriors, archers) or perform work (lumberjacks, miners).",
"version_number": "2.3.8",
"version_number": "2.4.0",
"website_url": "https://github.com/jpw1991/chebs-mercenaries",
"dependencies": [
"ValheimModding-Jotunn-2.16.1"
"ValheimModding-Jotunn-2.19.3"
]
}
10 changes: 2 additions & 8 deletions publish_debug.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/bin/bash

DEBUGDIR=ChebsMercenaries/bin/Debug
DEBUGDIR=ChebsMercenaries/bin/Debug/net48
DLL=$DEBUGDIR/ChebsMercenaries.dll
LIB=../chebs-valheim-library/ChebsValheimLibrary/bin/Release/ChebsValheimLibrary.dll
LIB=$DEBUGDIR/ChebsValheimLibrary.dll
BUN=../chebs-necromancy/ChebsNecromancyUnity/Assets/AssetBundles/chebgonaz
#PLUGINS=/home/joshua/.local/share/Steam/steamapps/common/Valheim/BepInEx/plugins
PLUGINS=/home/$USER/.config/r2modmanPlus-local/Valheim/profiles/cheb-development/BepInEx/plugins/ChebGonaz-ChebsMercenaries
BEPINEX=ChebsMercenaries/libs/BepInEx.dll

# Check that source files exist and are readable
if [ ! -f "$DLL" ]; then
Expand Down Expand Up @@ -35,11 +34,6 @@ if [ ! -w "$PLUGINS" ]; then
exit 1
fi

if [ ! -f "$BEPINEX" ]; then
echo "Error: $BEPINEX does not exist or is not readable."
exit 1
fi


cp -f "$DLL" "$PLUGINS" || { echo "Error: Failed to copy $DLL"; exit 1; }
cp -f "$LIB" "$PLUGINS" || { echo "Error: Failed to copy $LIB"; exit 1; }
Expand Down
9 changes: 2 additions & 7 deletions publish_release.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/bin/bash

RELEASEDIR=ChebsMercenaries/bin/Release
RELEASEDIR=ChebsMercenaries/bin/Release/net48
DLL=$RELEASEDIR/ChebsMercenaries.dll
LIB=../chebs-valheim-library/ChebsValheimLibrary/bin/Release/ChebsValheimLibrary.dll
LIB=$RELEASEDIR/ChebsValheimLibrary.dll
BUN=../chebs-necromancy/ChebsNecromancyUnity/Assets/AssetBundles/chebgonaz
PLUGINS=ChebsMercenaries/Package/plugins
README=README.md
TRANSLATIONS=Translations
BEPINEX=ChebsMercenaries/libs/BepInEx.dll

VERSION=$1

Expand Down Expand Up @@ -43,10 +42,6 @@ if [ ! -f "$README" ]; then
exit 1
fi

if [ ! -f "$BEPINEX" ]; then
echo "Error: $BEPINEX does not exist or is not readable."
exit 1
fi

cp -f "$DLL" "$PLUGINS" || { echo "Error: Failed to copy $DLL"; exit 1; }
cp -f "$LIB" "$PLUGINS" || { echo "Error: Failed to copy $LIB"; exit 1; }
Expand Down

0 comments on commit db0eece

Please sign in to comment.