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
3 changes: 1 addition & 2 deletions AdvancedPortals/AdvancedPortal.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using UnityEngine;

namespace AdvancedPortals
Expand Down
2 changes: 1 addition & 1 deletion AdvancedPortals/AdvancedPortals.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class AdvancedPortals : BaseUnityPlugin
{
public const string PluginId = "randyknapp.mods.advancedportals";
public const string DisplayName = "Advanced Portals";
public const string Version = "1.0.8";
public const string Version = "1.0.10";
public static readonly string[] _portalPrefabs = { "portal_ancient", "portal_obsidian", "portal_blackmarble" };

public static readonly List<GameObject> RegisteredPrefabs = new List<GameObject>();
Expand Down
4 changes: 2 additions & 2 deletions AdvancedPortals/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,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.0.8")]
[assembly: AssemblyFileVersion("1.0.8")]
[assembly: AssemblyVersion("1.0.10")]
[assembly: AssemblyFileVersion("1.0.10")]
2 changes: 1 addition & 1 deletion AdvancedPortals/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AdvancedPortals",
"version_number": "1.0.8",
"version_number": "1.0.10",
"website_url": "https://github.com/RandyKnapp/ValheimMods/tree/main/AdvancedPortals",
"description": "Add new, lore-friendly and balanced portals to allow some items to be teleported.",
"dependencies": []
Expand Down
32 changes: 32 additions & 0 deletions CreatureLevelAndLootControl/API.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,43 @@
using HarmonyLib;
using System.Reflection;
using System.Reflection.Emit;
using CreatureLevelControl;


#nullable enable
namespace CreatureLevelControl
{
public enum CreatureInfusion
{
None,
Lightning,
Fire,
Frost,
Poison,
Chaos,
Spirit,
}
public enum CreatureExtraEffect
{
None,
Aggressive,
Quick,
Regenerating,
Curious,
Splitting,
Armored,
}
public enum BossAffix
{
None,
Reflective,
Shielded,
Mending,
Summoner,
Elementalist,
Enraged,
Twin,
}
public static class API
{
private static readonly Assembly? targetAssembly;
Expand Down
15 changes: 11 additions & 4 deletions CreatureLevelAndLootControl/CreatureLevelAndLootControl.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,23 @@
<HintPath>M:\Code\VapokModBase\References\BepInEx\5.4.2101\BepInEx\core\0Harmony.dll</HintPath>
</Reference>
<Reference Include="assembly_guiutils_publicized">
<HintPath>M:\Code\VapokModBase\References\Valheim\0.216.8\assembly_guiutils_publicized.dll</HintPath>
<HintPath>M:\Code\VapokModBase\References\Valheim\0.217.14\assembly_guiutils_publicized.dll</HintPath>
</Reference>
<Reference Include="assembly_utils_publicized">
<HintPath>M:\Code\VapokModBase\References\Valheim\0.216.8\assembly_utils_publicized.dll</HintPath>
<HintPath>M:\Code\VapokModBase\References\Valheim\0.217.14\assembly_utils_publicized.dll</HintPath>
</Reference>
<Reference Include="assembly_valheim_publicized">
<HintPath>M:\Code\VapokModBase\References\Valheim\0.216.8\assembly_valheim_publicized.dll</HintPath>
<HintPath>M:\Code\VapokModBase\References\Valheim\0.217.14\assembly_valheim_publicized.dll</HintPath>
<HintPath>M:\Code\VapokModBase\References\Valheim\0.217.14\assembly_guiutils_publicized.dll</HintPath>
</Reference>
<Reference Include="assembly_utils_publicized">
<HintPath>M:\Code\VapokModBase\References\Valheim\0.217.14\assembly_utils_publicized.dll</HintPath>
</Reference>
<Reference Include="assembly_valheim_publicized">
<HintPath>M:\Code\VapokModBase\References\Valheim\0.217.14\assembly_valheim_publicized.dll</HintPath>
</Reference>
<Reference Include="CreatureLevelControl">
<HintPath>..\..\VapokModBase\References\CLLC\CreatureLevelControl.dll</HintPath>
<HintPath>..\..\VapokModBase\References\CLLC\newer\CreatureLevelControl.dll</HintPath>
</Reference>
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
Expand Down
2 changes: 1 addition & 1 deletion DvergerColor/DvergerColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace DvergerColor
{
[BepInPlugin(PluginId, "Dverger Color", "1.0.3")]
[BepInPlugin(PluginId, "Dverger Color", "1.0.6")]
[BepInProcess("valheim.exe")]
public class DvergerColor : BaseUnityPlugin
{
Expand Down
4 changes: 2 additions & 2 deletions DvergerColor/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,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.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.6.0")]
[assembly: AssemblyFileVersion("1.0.6.0")]
6 changes: 4 additions & 2 deletions DvergerColor/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"name": "ImprovedDvergerCirclet",
"version_number": "1.0.4",
"version_number": "1.0.6",
"website_url": "https://github.com/RandyKnapp/ValheimMods/tree/main/DvergerColor",
"description": "Changes the color of the light emitted by the Dverger circlet to white. Adds several beam width options, and a pool of radiance (point light) option.",
"dependencies": []
"dependencies": [
"denikson-BepInExPack_Valheim-5.4.2200"
]
}
15 changes: 12 additions & 3 deletions EpicLoot-UnityLib/ConvertUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,28 @@ public void OnModeChanged()
case MaterialConversionMode.Upgrade:
CostLabel.text = Localization.instance.Localize("$mod_epicloot_upgradecost");
_progressLabel.text = Localization.instance.Localize("$mod_epicloot_upgradeprogress");
_buttonLabel.text = Localization.instance.Localize("$mod_epicloot_upgrade");
if (_useTMP)
_tmpButtonLabel.text = Localization.instance.Localize("$mod_epicloot_upgrade");
else
_buttonLabel.text = Localization.instance.Localize("$mod_epicloot_upgrade");
break;

case MaterialConversionMode.Convert:
CostLabel.text = Localization.instance.Localize("$mod_epicloot_convertcost");
_progressLabel.text = Localization.instance.Localize("$mod_epicloot_convertprogress");
_buttonLabel.text = Localization.instance.Localize("$mod_epicloot_convert");
if (_useTMP)
_tmpButtonLabel.text = Localization.instance.Localize("$mod_epicloot_convert");
else
_buttonLabel.text = Localization.instance.Localize("$mod_epicloot_convert");
break;

case MaterialConversionMode.Junk:
CostLabel.text = Localization.instance.Localize("$mod_epicloot_junkcost");
_progressLabel.text = Localization.instance.Localize("$mod_epicloot_junkprogress");
_buttonLabel.text = Localization.instance.Localize("$mod_epicloot_junk");
if (_useTMP)
_tmpButtonLabel.text = Localization.instance.Localize("$mod_epicloot_junk");
else
_buttonLabel.text = Localization.instance.Localize("$mod_epicloot_junk");
break;

default:
Expand Down
22 changes: 19 additions & 3 deletions EpicLoot-UnityLib/EnchantingTableUIPanelBase.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

Expand All @@ -19,6 +20,8 @@ public abstract class EnchantingTableUIPanelBase : MonoBehaviour
protected bool _inProgress;
protected float _countdown;
protected Text _buttonLabel;
protected TMP_Text _tmpButtonLabel;
protected bool _useTMP = false;
protected string _defaultButtonLabelText;
protected bool _locked;

Expand All @@ -37,7 +40,13 @@ public virtual void Awake()
{
MainButton.onClick.AddListener(OnMainButtonClicked);
_buttonLabel = MainButton.GetComponentInChildren<Text>();
_defaultButtonLabelText = _buttonLabel.text;
if (_buttonLabel == null)
{
_tmpButtonLabel = MainButton.GetComponentInChildren<TMP_Text>();
_useTMP = true;
}

_defaultButtonLabelText = _useTMP ? _tmpButtonLabel.text : _buttonLabel.text;
}

var uiSFX = GameObject.Find("sfx_gui_button");
Expand Down Expand Up @@ -101,7 +110,10 @@ protected virtual AudioClip GetCompleteAudioClip()

public virtual void StartProgress()
{
_buttonLabel.text = Localization.instance.Localize("$menu_cancel");
if (_useTMP)
_tmpButtonLabel.text = Localization.instance.Localize("$menu_cancel");
else
_buttonLabel.text = Localization.instance.Localize("$menu_cancel");
_inProgress = true;
_countdown = CountdownTime;

Expand All @@ -125,7 +137,11 @@ public virtual bool CanCancel()

public virtual void Cancel()
{
_buttonLabel.text = Localization.instance.Localize(_defaultButtonLabelText);
if (_useTMP)
_tmpButtonLabel.text = Localization.instance.Localize(_defaultButtonLabelText);
else
_buttonLabel.text = Localization.instance.Localize(_defaultButtonLabelText);

_inProgress = false;
_countdown = 0;

Expand Down
2 changes: 0 additions & 2 deletions EpicLoot-UnityLib/EnchantingTableUpgrades.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using UnityEngine;

namespace EpicLoot_UnityLib
Expand Down
3 changes: 3 additions & 0 deletions EpicLoot-UnityLib/EpicLoot-UnityLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
<HintPath>..\Libs\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="Unity.TextMeshPro">
<HintPath>..\..\VapokModBase\References\BepInEx\5.4.2200\unstripped_corlib\Unity.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Valheim\unstripped_corlib\UnityEngine.dll</HintPath>
</Reference>
Expand Down
8 changes: 5 additions & 3 deletions EpicLoot-UnityLib/FeatureStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ public void Awake()

public void OnEnable()
{
EnchantingTableUI.instance.SourceTable.OnFeatureLevelChanged += OnFeatureLevelChanged;
if (EnchantingTableUI.instance != null && EnchantingTableUI.instance.SourceTable != null)
EnchantingTableUI.instance.SourceTable.OnFeatureLevelChanged += OnFeatureLevelChanged;
Refresh();
}

public void OnDisable()
{
EnchantingTableUI.instance.SourceTable.OnFeatureLevelChanged -= OnFeatureLevelChanged;
if (EnchantingTableUI.instance != null && EnchantingTableUI.instance.SourceTable != null)
EnchantingTableUI.instance.SourceTable.OnFeatureLevelChanged -= OnFeatureLevelChanged;
}

public void SetFeature(EnchantingFeature feature)
Expand Down Expand Up @@ -102,7 +104,7 @@ public void Refresh()
ManyStarsLabel.enabled = false;
}

if (UnlockedLabel != null)
if (UnlockedLabel != null )
UnlockedLabel.SetActive(level == 0);
}

Expand Down
8 changes: 6 additions & 2 deletions EpicLoot-UnityLib/SacrificeUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,17 @@ protected override void OnSelectedItemsChanged()
var selectedItems = AvailableItems.GetSelectedItems<IListElement>();
var sacrificeProducts = GetSacrificeProducts(selectedItems.Select(x => new Tuple<ItemDrop.ItemData, int>(x.Item1.GetItem(), x.Item2)).ToList());
SacrificeProducts.SetItems(sacrificeProducts.Cast<IListElement>().ToList());
var featureUnlocked = EnchantingTableUI.instance.SourceTable.IsFeatureUnlocked(EnchantingFeature.Sacrifice);
var featureUnlocked = EnchantingTableUI.instance != null && EnchantingTableUI.instance.SourceTable != null && EnchantingTableUI.instance.SourceTable.IsFeatureUnlocked(EnchantingFeature.Sacrifice);
MainButton.interactable = featureUnlocked && selectedItems.Count > 0;
}

public override void Cancel()
{
_buttonLabel.text = Localization.instance.Localize("$mod_epicloot_sacrifice");
if (_useTMP)
_tmpButtonLabel.text = Localization.instance.Localize("$mod_epicloot_sacrifice");
else
_buttonLabel.text = Localization.instance.Localize("$mod_epicloot_sacrifice");

base.Cancel();
}

Expand Down
28 changes: 24 additions & 4 deletions EpicLoot-UnityLib/SelectableTextColor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEngine;
using TMPro;
using UnityEngine;
using UnityEngine.UI;

namespace EpicLoot_UnityLib
Expand All @@ -9,20 +10,39 @@ public class SelectableTextColor : MonoBehaviour
public Color DisabledColor = Color.grey;
private Selectable _selectable;
private Text _text;
private TMP_Text _tmpText;
private bool useTMP = false;

public void Awake()
{
_selectable = GetComponent<Selectable>();
_text = GetComponentInChildren<Text>();
_defaultColor = _text.color;
if (_text != null)
{
_defaultColor = _text.color;
return;
}
_tmpText = GetComponentInChildren<TMP_Text>();
_defaultColor = _tmpText.color;
useTMP = true;
}

public void Update()
{
if (_selectable.IsInteractable())
_text.color = _defaultColor;
{
if (!useTMP)
_text.color = _defaultColor;
else
_tmpText.color = _defaultColor;
}
else
_text.color = DisabledColor;
{
if (!useTMP)
_text.color = DisabledColor;
else
_tmpText.color = DisabledColor;
}
}
}
}
13 changes: 11 additions & 2 deletions EpicLoot-UnityLib/UpgradeTableUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public override void Awake()
{
base.Awake();
_featureButtons.Clear();

for (var i = 0; i < ListContainer.childCount; ++ i)
{
var child = ListContainer.GetChild(i);
Expand Down Expand Up @@ -130,15 +131,23 @@ public void Refresh()
CostLabel.text = Localization.instance.Localize("$mod_epicloot_unlockcost");
CostList.SetItems(cost.Cast<IListElement>().ToList());
canAfford = LocalPlayerCanAffordCost(cost);
_buttonLabel.text = Localization.instance.Localize("$mod_epicloot_featureunlock");
var buttonText = Localization.instance.Localize("$mod_epicloot_featureunlock");
if (_useTMP)
_tmpButtonLabel.text = buttonText;
else
_buttonLabel.text = buttonText;
}
else
{
var cost = EnchantingTableUI.instance.SourceTable.GetFeatureUpgradeCost(feature);
CostLabel.text = Localization.instance.Localize("$mod_epicloot_upgradecost");
CostList.SetItems(cost.Cast<IListElement>().ToList());
canAfford = LocalPlayerCanAffordCost(cost);
_buttonLabel.text = Localization.instance.Localize("$mod_epicloot_upgrade");
var buttonText = Localization.instance.Localize("$mod_epicloot_upgrade");
if (_useTMP)
_tmpButtonLabel.text = buttonText;
else
_buttonLabel.text = buttonText;
}
}

Expand Down
Loading