Skip to content

Commit

Permalink
1.6.0: Try to make workers behave better; update CVL to 2.1.0 to prep…
Browse files Browse the repository at this point in the history
…are for upcoming changes
  • Loading branch information
jpw1991 committed Jul 14, 2023
1 parent 15953bc commit f8216ca
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions ChebsMercenaries/BasePlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public class BasePlugin : BaseUnityPlugin
{
public const string PluginGuid = "com.chebgonaz.chebsmercenaries";
public const string PluginName = "ChebsMercenaries";
public const string PluginVersion = "1.5.1";
public const string PluginVersion = "1.6.0";
private const string ConfigFileName = PluginGuid + ".cfg";
private static readonly string ConfigFileFullPath = Path.Combine(Paths.ConfigPath, ConfigFileName);

public readonly System.Version ChebsValheimLibraryVersion = new("2.0.0");
public readonly System.Version ChebsValheimLibraryVersion = new("2.1.0");

private readonly Harmony harmony = new(PluginGuid);

Expand Down
4 changes: 3 additions & 1 deletion ChebsMercenaries/Minions/HumanMinerMinion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ public static void SyncInternalsWithConfigs()
MinerAI.RockInternalIDsList = RockInternalIDsList.Value;
}

public void Awake()
public override void Awake()
{
base.Awake();

canBeCommanded = false;

if (!TryGetComponent(out MinerAI _)) gameObject.AddComponent<MinerAI>();
Expand Down
9 changes: 6 additions & 3 deletions ChebsMercenaries/Minions/HumanMinion.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Security.Permissions;
using BepInEx.Configuration;
using ChebsMercenaries.Structure;
using ChebsValheimLibrary.Common;
Expand Down Expand Up @@ -121,12 +122,14 @@ public enum MercenaryType
{ MercenaryType.Miner, "ChebGonaz_HumanMinerFemale" },
{ MercenaryType.Woodcutter, "ChebGonaz_HumanWoodcutterFemale" },
};

private void Awake()
public override void Awake()
{
base.Awake();

_hairs ??= ObjectDB.instance.GetAllItems(ItemDrop.ItemData.ItemType.Customization, "Hair");
_beards ??= ObjectDB.instance.GetAllItems(ItemDrop.ItemData.ItemType.Customization, "Beard");

StartCoroutine(WaitForZNet());
}

Expand Down
3 changes: 2 additions & 1 deletion ChebsMercenaries/Minions/HumanWoodcutterMinion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ public static void SyncInternalsWithConfigs()
WoodcutterAI.RoamRange = RoamRange.Value;
}

public void Awake()
public override void Awake()
{
base.Awake();
canBeCommanded = false;

if (!TryGetComponent(out WoodcutterAI _)) gameObject.AddComponent<WoodcutterAI>();
Expand Down
1 change: 1 addition & 0 deletions ChebsMercenaries/Package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ You can find the github [here](https://github.com/jpw1991/chebs-mercenaries).

Date | Version | Notes
--- | --- | ---
13/07/2023 | 1.6.0 | Try to make workers behave better; update CVL to 2.1.0 to prepare for upcoming changes
17/06/2023 | 1.5.1 | Fix roam distance not working; fix missing localizations
12/06/2023 | 1.5.0 | Update for new Valheim version; mercs should now swim
31/05/2023 | 1.3.3 | Add weapons of command
Expand Down
2 changes: 1 addition & 1 deletion ChebsMercenaries/Package/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"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": "1.5.1",
"version_number": "1.6.0",
"website_url": "https://github.com/jpw1991/chebs-mercenaries",
"dependencies": [
"ValheimModding-Jotunn-2.11.0"
Expand Down
4 changes: 2 additions & 2 deletions ChebsMercenaries/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.1.0")]
[assembly: AssemblyFileVersion("1.5.1.0")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ You can find the github [here](https://github.com/jpw1991/chebs-mercenaries).

Date | Version | Notes
--- | --- | ---
13/07/2023 | 1.6.0 | Try to make workers behave better; update CVL to 2.1.0 to prepare for upcoming changes
17/06/2023 | 1.5.1 | Fix roam distance not working; fix missing localizations
12/06/2023 | 1.5.0 | Update for new Valheim version; mercs should now swim
31/05/2023 | 1.3.3 | Add weapons of command
Expand Down
2 changes: 1 addition & 1 deletion publish_debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

DEBUGDIR=ChebsMercenaries/bin/Debug
DLL=$DEBUGDIR/ChebsMercenaries.dll
LIB=$DEBUGDIR/ChebsValheimLibrary.dll
LIB=../chebs-valheim-library/ChebsValheimLibrary/bin/Release/ChebsValheimLibrary.dll
BUN=../chebs-necromancy/ChebsNecromancyUnity/Assets/AssetBundles/chebgonaz
PLUGINS=/home/joshua/.local/share/Steam/steamapps/common/Valheim/BepInEx/plugins
BEPINEX=ChebsMercenaries/libs/BepInEx.dll
Expand Down
2 changes: 1 addition & 1 deletion publish_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

RELEASEDIR=ChebsMercenaries/bin/Release
DLL=$RELEASEDIR/ChebsMercenaries.dll
LIB=$RELEASEDIR/ChebsValheimLibrary.dll
LIB=../chebs-valheim-library/ChebsValheimLibrary/bin/Release/ChebsValheimLibrary.dll
BUN=../chebs-necromancy/ChebsNecromancyUnity/Assets/AssetBundles/chebgonaz
PLUGINS=ChebsMercenaries/Package/plugins
README=README.md
Expand Down

0 comments on commit f8216ca

Please sign in to comment.