Skip to content

Commit 3da4a78

Browse files
authored
Merge pull request #264 from jpw1991/263-prepare-for-ashlands
263 prepare for ashlands
2 parents 37f2e34 + 7f831c3 commit 3da4a78

13 files changed

+33
-28
lines changed

ChebsNecromancy/BasePlugin.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ internal class BasePlugin : BaseUnityPlugin
3434
{
3535
public const string PluginGuid = "com.chebgonaz.ChebsNecromancy";
3636
public const string PluginName = "ChebsNecromancy";
37-
public const string PluginVersion = "4.9.1";
37+
public const string PluginVersion = "4.10.0";
3838
private const string ConfigFileName = PluginGuid + ".cfg";
3939
private static readonly string ConfigFileFullPath = Path.Combine(Paths.ConfigPath, ConfigFileName);
4040

41-
public readonly System.Version ChebsValheimLibraryVersion = new("2.5.4");
41+
public readonly System.Version ChebsValheimLibraryVersion = new("2.6.1");
4242

4343
private readonly Harmony harmony = new(PluginGuid);
4444

ChebsNecromancy/ChebsNecromancy.csproj

+4-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<Guid>e3243d22-4307-4008-ba36-9f326008cde5</Guid>
2525

2626
<!-- Version Information -->
27-
<Version>4.9.1.0</Version>
27+
<Version>4.10.0.0</Version>
2828
<FileVersion>$(Version)</FileVersion>
2929
<AssemblyVersion>$(Version)</AssemblyVersion>
3030

@@ -36,13 +36,12 @@
3636
</PropertyGroup>
3737

3838
<ItemGroup>
39-
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1">
39+
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.2">
4040
<PrivateAssets>all</PrivateAssets>
4141
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4242
</PackageReference>
43-
<PackageReference Include="ChebsValheimLibrary" Version="2.5.4"/>
44-
<PackageReference Include="HarmonyX" Version="2.10.2"/>
45-
<PackageReference Include="JotunnLib" Version="2.16.2"/>
43+
<PackageReference Include="ChebsValheimLibrary" Version="2.6.1" />
44+
<PackageReference Include="JotunnLib" Version="2.19.3" />
4645
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3">
4746
<PrivateAssets>all</PrivateAssets>
4847
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

ChebsNecromancy/Items/Armor/Player/NecromancerHood.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public override void UpdateRecipe()
5151
UpdateRecipe(CraftingStationRequired, CraftingCost, CraftingStationLevel);
5252
}
5353

54-
public override CustomItem GetCustomItemFromPrefab(GameObject prefab)
54+
public override CustomItem GetCustomItemFromPrefab(GameObject prefab, bool fixReference = true)
5555
{
5656
ItemConfig config = new ItemConfig();
5757
config.Name = "$item_chebgonaz_necromancerhood";

ChebsNecromancy/Items/Armor/Player/SpectralShroud.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public override void UpdateRecipe()
9393
UpdateRecipe(CraftingStationRequired, CraftingCost, CraftingStationLevel);
9494
}
9595

96-
public override CustomItem GetCustomItemFromPrefab(GameObject prefab)
96+
public override CustomItem GetCustomItemFromPrefab(GameObject prefab, bool fixReference = true)
9797
{
9898
ItemConfig config = new ItemConfig();
9999
config.Name = "$item_friendlyskeletonwand_spectralshroud";

ChebsNecromancy/Items/Wands/DraugrWand.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public override void UpdateRecipe()
125125
UpdateRecipe(CraftingStationRequired, CraftingCost, CraftingStationLevel);
126126
}
127127

128-
public override CustomItem GetCustomItemFromPrefab(GameObject prefab)
128+
public override CustomItem GetCustomItemFromPrefab(GameObject prefab, bool fixReference = true)
129129
{
130130
var config = new ItemConfig();
131131
config.Name = "$item_friendlyskeletonwand_draugrwand";

ChebsNecromancy/Items/Wands/OrbOfBeckoning.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public override void UpdateRecipe()
7777
UpdateRecipe(CraftingStationRequired, CraftingCost, CraftingStationLevel);
7878
}
7979

80-
public override CustomItem GetCustomItemFromPrefab(GameObject prefab)
80+
public override CustomItem GetCustomItemFromPrefab(GameObject prefab, bool fixReference = true)
8181
{
8282
ItemConfig config = new();
8383
config.Name = NameLocalization;

ChebsNecromancy/Items/Wands/SkeletonWand.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public override void UpdateRecipe()
128128
UpdateRecipe(CraftingStationRequired, CraftingCost, CraftingStationLevel);
129129
}
130130

131-
public override CustomItem GetCustomItemFromPrefab(GameObject prefab)
131+
public override CustomItem GetCustomItemFromPrefab(GameObject prefab, bool fixReference = true)
132132
{
133133
ItemConfig config = new ItemConfig();
134134
config.Name = "$item_friendlyskeletonwand";

ChebsNecromancy/Items/Wands/Wand.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public virtual void CreateButtons()
148148
Name = ItemName + "Follow",
149149
Config = FollowConfig,
150150
GamepadConfig = FollowGamepadConfig,
151-
HintToken = "$friendlyskeletonwand_follow",
151+
HintToken = "$chebgonaz_follow",
152152
BlockOtherInputs = true
153153
};
154154
InputManager.Instance.AddButton(BasePlugin.PluginGuid, FollowButton);
@@ -161,7 +161,7 @@ public virtual void CreateButtons()
161161
Name = ItemName + "Wait",
162162
Config = WaitConfig,
163163
GamepadConfig = WaitGamepadConfig,
164-
HintToken = "$friendlyskeletonwand_wait",
164+
HintToken = "$chebgonaz_wait",
165165
BlockOtherInputs = true
166166
};
167167
InputManager.Instance.AddButton(BasePlugin.PluginGuid, WaitButton);
@@ -263,7 +263,7 @@ public void MakeNearbyMinionsFollow(float radius, bool follow)
263263
if (distance > radius && !minionFollowingOrb) continue;
264264

265265
MessageHud.instance.ShowMessage(MessageHud.MessageType.Center,
266-
follow ? "$friendlyskeletonwand_skeletonfollowing" : "$friendlyskeletonwand_skeletonwaiting");
266+
follow ? "$chebgonaz_skeletonfollowing" : "$chebgonaz_skeletonwaiting");
267267
if (follow)
268268
{
269269
minion.Follow(player.gameObject);

ChebsNecromancy/Package/manifest.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "ChebsNecromancy",
33
"description": "Cheb's Necromancy adds Necromancy to Valheim via craftable wands and structures. Minions will follow you, guard your base, and perform menial tasks.",
4-
"version_number": "4.9.1",
4+
"version_number": "4.10.0",
55
"website_url": "https://github.com/jpw1991/chebs-necromancy",
66
"dependencies": [
7-
"ValheimModding-Jotunn-2.16.2"
7+
"ValheimModding-Jotunn-2.19.3"
88
]
99
}

ChebsNecromancy/Structures/TreasurePylon.cs

+8-8
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ IEnumerator LookForPieces()
8888
while (true)
8989
{
9090
yield return new WaitForSeconds(UpdateInterval.Value + Random.value);
91-
92-
if (!piece.m_nview.IsOwner()) continue;
91+
92+
if (!piece || !piece.m_nview.IsOwner()) continue;
9393

9494
var playersInRange = new List<Player>();
9595
Player.GetPlayersInRange(transform.position, PlayerDetectionDistance, playersInRange);
@@ -102,7 +102,7 @@ IEnumerator LookForPieces()
102102
c => c.m_piece != null && c.m_piece.IsPlacedByPlayer()
103103
&& allowedContainers.Contains(c.m_piece.m_nview.GetPrefabName()), true);
104104

105-
for (int i = 0; i < nearbyContainers.Count; i++)
105+
for (var i = 0; i < nearbyContainers.Count; i++)
106106
{
107107
yield return new WaitWhile(() => playersInRange[0].IsSleeping());
108108

@@ -123,19 +123,19 @@ IEnumerator LookForPieces()
123123
var currentContainerInventory = nearbyContainers[i].GetInventory();
124124
//var currentContainerItems = currentContainerInventory.GetAllItems();
125125

126-
for (int j = 0; j < nearbyContainers.Count; j++)
126+
for (var j = 0; j < nearbyContainers.Count; j++)
127127
{
128128
if (j == i) continue; // skip over self
129129

130130
var otherInventory = nearbyContainers[j].GetInventory();
131131
var otherItems = otherInventory.GetAllItems();
132132

133-
for (int k = otherItems.Count - 1; k > -1; k--)
133+
for (var k = otherItems.Count - 1; k > -1; k--)
134134
{
135-
ItemDrop.ItemData jItem = otherItems[k];
135+
var jItem = otherItems[k];
136136

137-
int currentContainerItemCount = currentContainerInventory.CountItems(jItem.m_shared.m_name);
138-
int otherContainerItemCount = otherInventory.CountItems(jItem.m_shared.m_name);
137+
var currentContainerItemCount = currentContainerInventory.CountItems(jItem.m_shared.m_name);
138+
var otherContainerItemCount = otherInventory.CountItems(jItem.m_shared.m_name);
139139

140140
if (currentContainerItemCount > otherContainerItemCount)
141141
{

Friendly-Skeleton-Wand.wiki

Submodule Friendly-Skeleton-Wand.wiki updated from 9dc2099 to f040d3c

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ A special thanks to the people who've helped me along the way:
154154

155155
Date | Version | Notes
156156
--- | --- | ---
157+
25/04/2024 | 4.10.0 | Prepare for ashlands; upgrade CVL
157158
28/01/2024 | 4.9.1 | Reduce logging in case of missing bone color data
158159
27/01/2024 | 4.9.0 | Add different healing levels & spells to the priests; fix a bug that erased some default equipment set in Unity
159160
25/01/2024 | 4.8.0 | Add skeleton priest to heal other minions

Translations/Russian/chebsnecromancy.russian.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,10 @@
8383
"chebgonaz_miniontype_poison": "Ядовитого скелета",
8484
"chebgonaz_miniontype_mage": "Мага",
8585
"chebgonaz_miniontype_leech": "Пиявку",
86-
"chebgonaz_miniontype_battleneckro": "Боевого никса"
87-
}
86+
"chebgonaz_miniontype_priest": "Жреца",
87+
"chebgonaz_miniontype_battleneckro": "Боевого никса",
88+
"chebgonaz_worker_target": "Цель",
89+
"chebgonaz_worker_cantfindtarget": "Не могу найти цель.",
90+
"chebgonaz_phylactery_name": "Филактерий",
91+
"chebgonaz_phylactery_desc": "Некроманту не составит труда избежать смерти. Все что требуется, это другая душа, которую нужно принести в жертву богам вместо своей собственной."
92+
}

0 commit comments

Comments
 (0)