(1.2.1) reverted to 1.2.0 due to ConfigSync problems
This commit is contained in:
10
MxValheim/ILRepack.targets
Normal file
10
MxValheim/ILRepack.targets
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Target Name="ILRepacker" AfterTargets="Build">
|
||||
<ItemGroup>
|
||||
<InputAssemblies Include="$(TargetPath)" />
|
||||
<InputAssemblies Include="$(OutputPath)\ServerSync.dll" />
|
||||
</ItemGroup>
|
||||
<ILRepack Parallel="true" DebugInfo="true" Internalize="true" InputAssemblies="@(InputAssemblies)" OutputFile="$(TargetPath)" TargetKind="SameAsPrimaryAssembly" LibraryPath="$(OutputPath)" />
|
||||
</Target>
|
||||
</Project>
|
||||
BIN
MxValheim/Libraries/ServerSync.dll
Normal file
BIN
MxValheim/Libraries/ServerSync.dll
Normal file
Binary file not shown.
@@ -1,7 +1,6 @@
|
||||
using BepInEx;
|
||||
using BepInEx.Configuration;
|
||||
using HarmonyLib;
|
||||
using ServerSync;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -10,14 +9,7 @@ public class MxValheimMod : BaseUnityPlugin
|
||||
{
|
||||
private const string ModGUID = "ovh.mxdev.mxvalheim";
|
||||
private const string ModName = "MxValheim";
|
||||
private const string ModVersion = "1.3.0";
|
||||
|
||||
private static readonly ConfigSync configSync = new ConfigSync(ModGUID)
|
||||
{
|
||||
DisplayName = ModName,
|
||||
CurrentVersion = ModVersion,
|
||||
MinimumRequiredVersion = ModVersion
|
||||
};
|
||||
private const string ModVersion = "1.2.1";
|
||||
|
||||
public static ConfigEntry<bool> Config_Locked;
|
||||
public static ConfigEntry<int> Config_OreMultiplier;
|
||||
@@ -28,28 +20,13 @@ public class MxValheimMod : BaseUnityPlugin
|
||||
|
||||
void Awake()
|
||||
{
|
||||
Config_Locked = BindSyncConfig("General", "Lock Configuration", true, "If obsession is on, only admins can change settings.");
|
||||
configSync.AddLockingConfigEntry(Config_Locked);
|
||||
Config_OreMultiplier = BindSyncConfig("General","OreMultiplier",3,"How many items should drop for every 1 ore/scrap found.");
|
||||
Config_rangeMultiplier = BindSyncConfig("General", "CraftingRangeMultiplier",2.0f,"Multiplier for the workbench build/crafting range. Default is 2x.");
|
||||
Config_bowDrawSpeedBonusPerLevel = BindSyncConfig("General", "BowDrawSpeedBonusPercentPerLevel", 1.0f, "Shorten the bow draw speed by this percent for every bow upgrade level.");
|
||||
Config_rainDamage = BindSyncConfig("General", "RainDamage", true, "Set to true to stop rain damage, false to return to vanilla behavior.");
|
||||
Config_boatSpeed = BindSyncConfig("General", "BoatSpeedMultiplier", 2.0f, "Your boat/raft will move without wind at a speed multiplied by this value.");
|
||||
Config_OreMultiplier = Config.Bind("General","OreMultiplier",3,"How many items should drop for every 1 ore/scrap found.");
|
||||
Config_rangeMultiplier = Config.Bind("General", "CraftingRangeMultiplier",2.0f,"Multiplier for the workbench build/crafting range. Default is 2x.");
|
||||
Config_bowDrawSpeedBonusPerLevel = Config.Bind("General", "BowDrawSpeedBonusPercentPerLevel", 1.0f, "Shorten the bow draw speed by this percent for every bow upgrade level.");
|
||||
Config_rainDamage = Config.Bind("General", "RainDamage", true, "Set to true to stop rain damage, false to return to vanilla behavior.");
|
||||
Config_boatSpeed = Config.Bind("General", "BoatSpeedMultiplier", 2.0f, "Your boat/raft will move without wind at a speed multiplied by this value.");
|
||||
|
||||
Harmony harmony = new Harmony(ModGUID);
|
||||
harmony.PatchAll();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper method to bind a config and register it for server syncing.
|
||||
/// </summary>
|
||||
private ConfigEntry<T> BindSyncConfig<T>(string group, string name, T value, string description, bool synchronizedSetting = true)
|
||||
{
|
||||
ConfigEntry<T> configEntry = this.Config.Bind(group, name, value, description);
|
||||
|
||||
SyncedConfigEntry<T> syncedConfigEntry = configSync.AddConfigEntry(configEntry);
|
||||
syncedConfigEntry.SynchronizedConfig = synchronizedSetting;
|
||||
|
||||
return configEntry;
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
<RootNamespace>MxValheim</RootNamespace>
|
||||
<AssemblyName>MxValheim</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
|
||||
<LangVersion>12.0</LangVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
@@ -43,9 +44,6 @@
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>E:\SteamLibrary\steamapps\common\Valheim\BepInEx\core\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ServerSync">
|
||||
<HintPath>C:\Users\blood\Downloads\ServerSync.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -73,5 +71,8 @@
|
||||
<Compile Include="Patch\WearNTear.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ILRepack.targets" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
Reference in New Issue
Block a user