diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..20760be --- /dev/null +++ b/.gitattributes @@ -0,0 +1,84 @@ +# Common settings that generally should always be used with your language specific settings + +# Auto detect text files and perform LF normalization +# https://www.davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/ +* text=auto + +# +# The above will handle all files NOT found below +# + +# CSharp Sources +*.cs text diff=csharp + +# Documents +*.bibtex text diff=bibtex +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain +*.md text +*.tex text diff=tex +*.adoc text +*.textile text +*.mustache text +*.csv text +*.tab text +*.tsv text +*.txt text +*.sql text +*.ps1 text + +# Graphics +*.png binary +*.jpg binary +*.jpeg binary +*.gif binary +*.tif binary +*.tiff binary +*.ico binary +# SVG treated as an asset (binary) by default. +*.svg text +# If you want to treat it as binary, +# use the following line instead. +# *.svg binary +*.eps binary + +# Scripts +*.bash text eol=lf +*.fish text eol=lf +*.sh text eol=lf +# These are explicitly windows files and should use crlf +*.bat text eol=crlf +*.cmd text eol=crlf + +# Serialisation +*.json text +*.toml text +*.xml text +*.yaml text +*.yml text + +# Archives +*.7z binary +*.gz binary +*.tar binary +*.tgz binary +*.zip binary + +# Text files where line endings should be preserved +*.patch -text + +# +# Exclude files from exporting +# + +.gitattributes export-ignore +.gitignore export-ignore +.gitkeep export-ignore \ No newline at end of file diff --git a/.gitignore b/.gitignore index 70676ab..64e2cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,13 +3,6 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore -# Don't package Valheim proprietary assets... -libs/*.dll - - -*.zip -AnyPortalRelease/* - # User-specific files *.rsuser *.suo @@ -367,3 +360,17 @@ MigrationBackup/ # Fody - auto-generated XML schema FodyWeavers.xsd + +# csproj.user file (for local environment) +*.csproj.user + +# not the libraries folder +!libraries/* +.idea/ + +# not the valheim path file +Environment.props + +# not the generated dll for thunderstore +*/Package/plugins/* +AnyPortal/Package/README.md \ No newline at end of file diff --git a/AnyPortal.csproj b/AnyPortal.csproj deleted file mode 100644 index 840b845..0000000 --- a/AnyPortal.csproj +++ /dev/null @@ -1,149 +0,0 @@ - - - - - Debug - AnyCPU - {11DB1F87-EBE7-49ED-A1A5-A0E31F9159F0} - Library - Properties - AnyPortal - AnyPortal - v4.7.2 - 512 - true - - - true - full - false - AnyPortalRelease\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - True - True - Resources.resx - - - - - libs\0Harmony.dll - False - - - libs\assembly_guiutils.dll - False - - - libs\assembly_utils.dll - False - - - libs\assembly_valheim.dll - False - - - libs\BepInEx.dll - False - - - libs\BepInEx.Harmony.dll - False - - - libs\Mono.Posix.dll - False - - - - libs\UnityEngine.dll - False - - - False - libs\UnityEngine.AssetBundleModule.dll - False - - - libs\UnityEngine.AudioModule.dll - False - - - libs\UnityEngine.CoreModule.dll - False - - - False - libs\UnityEngine.InputLegacyModule.dll - - - libs\UnityEngine.InputModule.dll - False - - - libs\UnityEngine.Physics2DModule.dll - False - - - libs\UnityEngine.PhysicsModule.dll - False - - - libs\UnityEngine.TerrainModule.dll - False - - - libs\UnityEngine.TextCoreModule.dll - False - - - libs\UnityEngine.TextRenderingModule.dll - False - - - libs\UnityEngine.UI.dll - False - - - libs\UnityEngine.UIElementsModule.dll - False - - - libs\UnityEngine.UIModule.dll - False - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/AnyPortal.sln b/AnyPortal.sln index 81ea7cd..d1cfdc9 100644 --- a/AnyPortal.sln +++ b/AnyPortal.sln @@ -1,11 +1,9 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.31019.35 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnyPortal", "AnyPortal.csproj", "{11DB1F87-EBE7-49ED-A1A5-A0E31F9159F0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnyPortalTests", "AnyPortalTests\AnyPortalTests.csproj", "{1EA5CCEB-1738-483C-AB85-056ABA59796E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnyPortal", "AnyPortal\AnyPortal.csproj", "{DEAF4438-8089-40ED-8175-398E1261D45B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,19 +11,16 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {11DB1F87-EBE7-49ED-A1A5-A0E31F9159F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {11DB1F87-EBE7-49ED-A1A5-A0E31F9159F0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {11DB1F87-EBE7-49ED-A1A5-A0E31F9159F0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {11DB1F87-EBE7-49ED-A1A5-A0E31F9159F0}.Release|Any CPU.Build.0 = Release|Any CPU - {1EA5CCEB-1738-483C-AB85-056ABA59796E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1EA5CCEB-1738-483C-AB85-056ABA59796E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1EA5CCEB-1738-483C-AB85-056ABA59796E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1EA5CCEB-1738-483C-AB85-056ABA59796E}.Release|Any CPU.Build.0 = Release|Any CPU + {DEAF4438-8089-40ED-8175-398E1261D45B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEAF4438-8089-40ED-8175-398E1261D45B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEAF4438-8089-40ED-8175-398E1261D45B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEAF4438-8089-40ED-8175-398E1261D45B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {3622EA89-855D-407E-9227-760F5F122139} + SolutionGuid = {04FA40AF-91D5-4CE8-92ED-7530C8DF0D5E} EndGlobalSection EndGlobal + diff --git a/AnyPortal.cs b/AnyPortal/AnyPortal.cs similarity index 80% rename from AnyPortal.cs rename to AnyPortal/AnyPortal.cs index e47c212..74fc326 100644 --- a/AnyPortal.cs +++ b/AnyPortal/AnyPortal.cs @@ -1,21 +1,36 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Reflection.Emit; +// AnyPortal +// a Valheim mod skeleton using Jötunn +// +// File: AnyPortal.cs +// Project: AnyPortal + using BepInEx; -using BepInEx.Configuration; +using Jotunn.Entities; +using Jotunn.Managers; +using Jotunn.Utils; using HarmonyLib; using UnityEngine; using UnityEngine.UI; +using System.Collections.Generic; using System.Linq; -using AnyPortal; +using System.Reflection.Emit; +using System; namespace AnyPortal { - [BepInPlugin("org.sweetgiorni.plugins.anyportal", "AnyPortal", "1.0.4")] - public class AnyPortal : BaseUnityPlugin + [BepInPlugin(PluginGUID, PluginName, PluginVersion)] + [BepInDependency(Jotunn.Main.ModGuid)] + [NetworkCompatibility(CompatibilityLevel.EveryoneMustHaveMod, VersionStrictness.Minor)] + internal class AnyPortal : BaseUnityPlugin { + public const string PluginGUID = "com.sweetgiorni.anyportal"; + public const string PluginName = "AnyPortal"; + public const string PluginVersion = "2.0.0"; + + // Use this class to add your own localization to the game + // https://valheim-modding.github.io/Jotunn/tutorials/localization.html + public static CustomLocalization Localization = LocalizationManager.Instance.GetLocalization(); + public Harmony harmony; public static GameObject dropdownHolder; @@ -37,16 +52,19 @@ private void Awake() if (Application.platform == RuntimePlatform.WindowsPlayer) { anyPortalAssetBundle = AssetBundle.LoadFromMemory(Properties.Resources.anyportalAssetsWin64); - if (!anyPortalAssetBundle) - { - Debug.LogError($"Failed to read AssetBundle stream"); - return; - } + } + else if (Application.platform == RuntimePlatform.LinuxPlayer) + { + anyPortalAssetBundle = AssetBundle.LoadFromMemory(Properties.Resources.anyportalAssetsLinux64); + } + if (!anyPortalAssetBundle) + { + Jotunn.Logger.LogError($"Failed to read AssetBundle stream"); + return; } harmony = new Harmony("org.spub.plugins.anyportal.harmony"); harmony.PatchAll(); - Debug.Log("AnyPortal loaded succesfully."); } public static void InitializeDropdownHolder() @@ -54,13 +72,13 @@ public static void InitializeDropdownHolder() var sprite = TextInput.instance.m_panel.GetComponent(); if (anyPortalAssetBundle == null) { - Debug.LogError("AnyPortal: Tried to access the AssetBundle before loading it!"); + Jotunn.Logger.LogError("AnyPortal: Tried to access the AssetBundle before loading it!"); return; } var dropdownTemplate = anyPortalAssetBundle.LoadAsset("assets/anyportal.prefab"); if (!dropdownTemplate) { - Debug.LogError("Failed to load dropdown asset"); + Jotunn.Logger.LogError("Failed to load dropdown asset"); return; } dropdownHolder = GameObject.Instantiate(dropdownTemplate); @@ -75,17 +93,18 @@ public static void InitializeDropdownHolder() okButton.onClick.AddListener(OKButtonClicked); var mapButtonText = mapButton.transform.GetChild(0).GetComponent(); - mapButtonText.text = Localization.instance.Localize(mapButtonText.text); + mapButtonText.text = Localization.TryTranslate(mapButtonText.text); + var okButtonText = okButton.transform.GetChild(0).GetComponent(); - okButtonText.text = Localization.instance.Localize(okButtonText.text); + okButtonText.text = Localization.TryTranslate(okButtonText.text); if (dropdownHolder.transform.parent == null) { var uiRoot = GameObject.Find("IngameGui(Clone)"); if (!uiRoot) { - Debug.LogError("Unable to find root UI GameObject!"); + Jotunn.Logger.LogError("Unable to find root UI GameObject!"); return; } dropdownHolder.transform.SetParent(uiRoot.transform); @@ -135,7 +154,7 @@ public static void OKButtonClicked() dropdownHolder.SetActive(false); return; } - public static void MapButtonClicked() + public static void MapButtonClicked() { if (!lastPortalInteracted || !lastPortalZNetView || !lastPortalZNetView.IsValid()) return; @@ -156,12 +175,12 @@ public static void DropdownValueChanged(Dropdown change) { if (!(lastPortalZNetView && lastPortalZNetView.IsValid())) { - Debug.LogError("lastPortalZNetView is not a valid reference"); + Jotunn.Logger.LogError("lastPortalZNetView is not a valid reference"); return; } if (change.value == 0) // User selected "None" option { - Debug.Log("Unlinking portal"); + Jotunn.Logger.LogDebug("Unlinking portal"); lastPortalZNetView.GetZDO().SetOwner(ZDOMan.instance.GetMyID()); lastPortalZNetView.GetZDO().Set("target", ZDOID.None); ZDOMan.instance.ForceSendZDO(lastPortalZNetView.GetZDO().m_uid); @@ -170,7 +189,7 @@ public static void DropdownValueChanged(Dropdown change) var selectedPortalIdx = change.value - 1; // Need to add one here because the first option is always "None" if (selectedPortalIdx < 0 || selectedPortalIdx >= portalList.Count) { - Debug.LogError($"{selectedPortalIdx} is not a valid portal index."); + Jotunn.Logger.LogError($"{selectedPortalIdx} is not a valid portal index."); return; } var selectedPortal = portalList[selectedPortalIdx]; @@ -210,7 +229,7 @@ static class GameConnectPortalsPatch { static void Postfix(Game __instance) { - Debug.LogError("Connect portals is running - it's supposed to be disabled!?!?"); + Jotunn.Logger.LogError("Connect portals is running - it's supposed to be disabled!?!?"); } } @@ -219,7 +238,7 @@ static void Postfix(Game __instance) [HarmonyPatch(typeof(ZDOMan), "CreateSyncList")] static class ZDOmanCreateSyncListPatch { - static void Prefix(List toSync) + static void Postfix(List toSync) { if (ZNet.instance.IsServer()) { @@ -248,7 +267,7 @@ static void Postfix(TeleportWorld __instance, ref ZNetView ___m_nview, ref bool { lastPortalInteracted = __instance; lastPortalZNetView = ___m_nview; - + if (!__result) { return; @@ -305,7 +324,7 @@ static bool Prefix(TeleportWorld __instance, ref ZNetView ___m_nview, ref string tag = "Empty tag"; if (___m_nview == null || !___m_nview.IsValid()) { - Debug.LogError("HoverTextPatch: ___m_nview is not valid"); + Jotunn.Logger.LogError("HoverTextPatch: ___m_nview is not valid"); } else { @@ -315,10 +334,10 @@ static bool Prefix(TeleportWorld __instance, ref ZNetView ___m_nview, ref string var destPortalZDO = ZDOMan.instance.GetZDO(targetZDOID); if (destPortalZDO == null || !destPortalZDO.IsValid()) { - Debug.Log("HoverText: destPortalZDO is null or invalid"); + Jotunn.Logger.LogDebug("HoverText: destPortalZDO is null or invalid"); destPortalTag = "None"; // Reset the target since it's bad... - Debug.Log("HoverText: Clearing out the target"); + Jotunn.Logger.LogDebug("HoverText: Clearing out the target"); ___m_nview.GetZDO().Set("target", ZDOID.None); ZDOMan.instance.ForceSendZDO(___m_nview.GetZDO().m_uid); } @@ -328,11 +347,27 @@ static bool Prefix(TeleportWorld __instance, ref ZNetView ___m_nview, ref string } } } - __result = Localization.instance.Localize($"Portal Tag: {tag}\nDestination Portal Tag: {destPortalTag}\n[$KEY_Use] Configure Portal"); + __result = ($"Portal Tag: {tag}\nDestination Portal Tag: {destPortalTag}\n[{Localization.TryTranslate("KEY_Use")}] Configure Portal"); + return false; } } + [HarmonyPatch(typeof(TextInput), "Show")] + static class TextInputShowPatch + { + static void Postfix(ref TextInput __instance, string topic) + { + Jotunn.Logger.LogDebug($"Topic: {topic}"); + Button[] buttonsToHide = __instance.m_panel.GetComponentsInChildren(true); + foreach (Button button in buttonsToHide) + { + bool enabled = topic != "$piece_portal_tag"; + Jotunn.Logger.LogDebug($"Setting button state to {enabled}"); + button.gameObject.SetActive(enabled); + } + } + } // We want to hook into TextInput's IsVisible method so our panel gets included in other UI logic [HarmonyPatch(typeof(InventoryGui), "IsVisible")] @@ -345,4 +380,6 @@ static void Postfix(ref bool __result) } } } + } + diff --git a/AnyPortal/AnyPortal.csproj b/AnyPortal/AnyPortal.csproj new file mode 100644 index 0000000..bd83b0b --- /dev/null +++ b/AnyPortal/AnyPortal.csproj @@ -0,0 +1,130 @@ + + + + + Debug + AnyCPU + {DEAF4438-8089-40ED-8175-398E1261D45B} + Library + Properties + AnyPortal + AnyPortal + v4.6.2 + 512 + true + + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + false + + + pdbonly + true + bin\Release\ + + + prompt + 4 + false + false + + + Program + $(VALHEIM_INSTALL)\valheim.exe + -console + $(VALHEIM_INSTALL) + + + + ..\packages\HarmonyX.2.10.0\lib\net45\0Harmony.dll + + + ..\packages\JotunnLib.2.7.1\lib\net462\Jotunn.dll + + + ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.dll + + + ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Mdb.dll + + + ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Pdb.dll + + + ..\packages\Mono.Cecil.0.11.4\lib\net40\Mono.Cecil.Rocks.dll + + + ..\packages\MonoMod.22.5.1.1\lib\net452\MonoMod.exe + + + ..\packages\MonoMod.RuntimeDetour.22.5.1.1\lib\net452\MonoMod.RuntimeDetour.dll + + + ..\packages\MonoMod.Utils.22.5.1.1\lib\net452\MonoMod.Utils.dll + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + + + + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + $(BuildDependsOn); + JotunnPostBuildTaskWin + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/icon.png b/AnyPortal/Package/icon.png similarity index 100% rename from icon.png rename to AnyPortal/Package/icon.png diff --git a/AnyPortal/Package/manifest.json b/AnyPortal/Package/manifest.json new file mode 100644 index 0000000..a4cdd7a --- /dev/null +++ b/AnyPortal/Package/manifest.json @@ -0,0 +1,9 @@ +{ + "name": "AnyPortal", + "description": "Overhauls the portal pairing system by allowing you to select and travel to any existing portal, regardless of tag.", + "version_number": "2.0.0", + "website_url": "https://github.com/sweetgiorni/AnyPortal", + "dependencies": [ + "ValheimModding-Jotunn-2.6.1", + ] +} \ No newline at end of file diff --git a/Properties/AssemblyInfo.cs b/AnyPortal/Properties/AssemblyInfo.cs similarity index 83% rename from Properties/AssemblyInfo.cs rename to AnyPortal/Properties/AssemblyInfo.cs index 06ea5e9..99d36a6 100644 --- a/Properties/AssemblyInfo.cs +++ b/AnyPortal/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("AnyPortal")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("AnyPortal")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("11db1f87-ebe7-49ed-a1a5-a0e31f9159f0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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.4")] -[assembly: AssemblyFileVersion("1.0.4")] +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("AnyPortal")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("AnyPortal")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e3243d22-4307-4008-ba36-9f326008cde5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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("2.0.0")] +[assembly: AssemblyFileVersion("2.0.0")] + diff --git a/AnyPortal/Properties/IgnoreAccessModifiers.cs b/AnyPortal/Properties/IgnoreAccessModifiers.cs new file mode 100644 index 0000000..181bca1 --- /dev/null +++ b/AnyPortal/Properties/IgnoreAccessModifiers.cs @@ -0,0 +1,17 @@ +// Veilheim +// a Valheim mod +// +// File: IgnoreAccessModifiers.cs +// Project: Veilheim + +using System.Security.Permissions; + +// SecurityPermision set to minimum +// for skipping access modifiers check from the mono JIT +// The same attribute are added to the assembly when ticking +// Unsafe Code in the Project settings +// This is done here to allow an explanation of the trick and +// not in an outside source you could potentially miss. + +#pragma warning disable CS0618 // Type or member is obsolete +[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] \ No newline at end of file diff --git a/Properties/Resources.Designer.cs b/AnyPortal/Properties/Resources.Designer.cs similarity index 100% rename from Properties/Resources.Designer.cs rename to AnyPortal/Properties/Resources.Designer.cs index ba39196..d7c0556 100644 --- a/Properties/Resources.Designer.cs +++ b/AnyPortal/Properties/Resources.Designer.cs @@ -63,9 +63,9 @@ internal Resources() { /// /// Looks up a localized resource of type System.Byte[]. /// - internal static byte[] anyportalAssetsLinux64 { + internal static byte[] anyportalAssetsWin64 { get { - object obj = ResourceManager.GetObject("anyportalAssetsLinux64", resourceCulture); + object obj = ResourceManager.GetObject("anyportalAssetsWin64", resourceCulture); return ((byte[])(obj)); } } @@ -73,9 +73,9 @@ internal static byte[] anyportalAssetsLinux64 { /// /// Looks up a localized resource of type System.Byte[]. /// - internal static byte[] anyportalAssetsWin64 { + internal static byte[] anyportalAssetsLinux64 { get { - object obj = ResourceManager.GetObject("anyportalAssetsWin64", resourceCulture); + object obj = ResourceManager.GetObject("anyportalAssetsLinux64", resourceCulture); return ((byte[])(obj)); } } diff --git a/Properties/Resources.resx b/AnyPortal/Properties/Resources.resx similarity index 94% rename from Properties/Resources.resx rename to AnyPortal/Properties/Resources.resx index 01c7cf6..b8a1924 100644 --- a/Properties/Resources.resx +++ b/AnyPortal/Properties/Resources.resx @@ -118,10 +118,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\AnyPortalUnity\Assets\AssetBundles\Linux64\anyportal.unitypackage;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\AnyPortalUnity\Assets\AssetBundles\Win64\anyportal.unitypackage;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + ..\..\AnyPortalUnity\Assets\AssetBundles\Win64\anyportal.unitypackage;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\..\AnyPortalUnity\Assets\AssetBundles\Linux64\anyportal.unitypackage;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/AnyPortal/README.md b/AnyPortal/README.md new file mode 100644 index 0000000..ade7aeb --- /dev/null +++ b/AnyPortal/README.md @@ -0,0 +1,25 @@ +# AnyPortal +### By sweetgiorni +## https://github.com/sweetgiorni/AnyPortal + +#### https://www.nexusmods.com/valheim/mods/170 +### https://valheim.thunderstore.io/package/sweetgiorni/AnyPortal/ + + +# Description + +Disables tag-based portal pairing and instead provides a drop-down box for you to choose which destination portal you want to connect to. + +## Destination selection +When you interact with a portal, you'll see a new dropdown under the tag input text box. Click on the dropdown and select your desired destination. The list elements include the tag name of the destination portals and their distances from the player. + +## Show destination on map +Don't recognize a portal listed in the dropdown? Just select it and click the "Map" button to be shown where the portal is on the map. + + +# Installation (Read carefully!!!) + +1. Install [BepInEx](https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/) +2. Copy AnyPortal.dll to the BepInEx plugins directory (Valheim/BepInEx/plugins/) + +**If you want to use this in multiplayer, you also need to install the mod on the server.** If you notice that you are able to select portals from the dropdown, but they connect and disconnect a few seconds later, that most likely means the mod isn't running on the server. diff --git a/AnyPortal/app.config b/AnyPortal/app.config new file mode 100644 index 0000000..fff9fe4 --- /dev/null +++ b/AnyPortal/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/AnyPortal/packages.config b/AnyPortal/packages.config new file mode 100644 index 0000000..d609396 --- /dev/null +++ b/AnyPortal/packages.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/AnyPortalUnity/.gitignore b/AnyPortalUnity/.gitignore index c8c8a10..7ac0c73 100644 --- a/AnyPortalUnity/.gitignore +++ b/AnyPortalUnity/.gitignore @@ -59,7 +59,6 @@ sysinfo.txt *.apk *.aab *.unitypackage -Assets/AssetBundles/* # Crashlytics generated file crashlytics-build.properties @@ -70,3 +69,15 @@ crashlytics-build.properties # Temporary auto-generated Android Assets /[Aa]ssets/[Ss]treamingAssets/aa.meta /[Aa]ssets/[Ss]treamingAssets/aa/* + +# Assemblies (dont distribute!) +/[Aa]ssets/[Aa]ssemblies/*.dll + +# Vanilla scripts (dont distribute!) +/[Aa]ssets/[Vv]anilla[Ss]cripts/**/ + +# Installed plugins (might be paid stuff, so dont distribute) +/[Aa]ssets/Plugins* + +# AssetBundles (manual copy these) +/[Aa]ssetBundles* \ No newline at end of file diff --git a/AnyPortalUnity/.vsconfig b/AnyPortalUnity/.vsconfig new file mode 100644 index 0000000..d70cd98 --- /dev/null +++ b/AnyPortalUnity/.vsconfig @@ -0,0 +1,6 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Workload.ManagedGame" + ] +} diff --git a/AnyPortalUnity/Assets/AnyPortal.prefab b/AnyPortalUnity/Assets/AnyPortal.prefab index 54cd161..1b5aa43 100644 --- a/AnyPortalUnity/Assets/AnyPortal.prefab +++ b/AnyPortalUnity/Assets/AnyPortal.prefab @@ -98,6 +98,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -126,6 +127,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -260,6 +262,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -351,6 +354,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.21960786, g: 0.21960786, b: 0.21960786, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -379,6 +383,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -483,6 +488,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -557,6 +563,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -635,6 +642,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -713,6 +721,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -827,6 +836,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -904,6 +914,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -1010,6 +1021,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.28627452, g: 0.28627452, b: 0.28627452, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -1038,6 +1050,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -1127,12 +1140,13 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_Font: {fileID: 12800000, guid: 79963b9dfeaa30d4b9b9def66ea94c7a, type: 3} m_FontSize: 14 m_FontStyle: 0 m_BestFit: 0 @@ -1205,11 +1219,12 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 4c27276c1dc362f47945ee44b86b4160, type: 3} + m_Sprite: {fileID: 21300000, guid: 15c14460d05869349960d5baf60478ef, type: 3} m_Type: 0 m_PreserveAspect: 1 m_FillCenter: 1 @@ -1272,6 +1287,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} @@ -1365,6 +1381,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -1441,6 +1458,7 @@ MonoBehaviour: m_Material: {fileID: 0} m_Color: {r: 0.28627452, g: 0.28627452, b: 0.28627452, a: 1} m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} m_Maskable: 1 m_OnCullStateChanged: m_PersistentCalls: @@ -1469,6 +1487,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Navigation: m_Mode: 3 + m_WrapAround: 0 m_SelectOnUp: {fileID: 0} m_SelectOnDown: {fileID: 0} m_SelectOnLeft: {fileID: 0} diff --git a/AnyPortalUnity/Assets/AnyPortal.prefab.meta b/AnyPortalUnity/Assets/AnyPortal.prefab.meta index 4b21d5b..d943096 100644 --- a/AnyPortalUnity/Assets/AnyPortal.prefab.meta +++ b/AnyPortalUnity/Assets/AnyPortal.prefab.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ae1f8dd1a11b5db4182c70445a9206ec +guid: 06a4e0f2fa9a6054fbf703e2c0c6cc2e PrefabImporter: externalObjects: {} userData: diff --git a/AnyPortalUnity/Assets/Scenes.meta b/AnyPortalUnity/Assets/Assemblies.meta similarity index 77% rename from AnyPortalUnity/Assets/Scenes.meta rename to AnyPortalUnity/Assets/Assemblies.meta index c13b175..ac0062e 100644 --- a/AnyPortalUnity/Assets/Scenes.meta +++ b/AnyPortalUnity/Assets/Assemblies.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 69f5332eb54372242a6cfe21aca64a06 +guid: eec05de8f67c393419f8658b5ddca0b6 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/AnyPortalUnity/Assets/AssetBundles.meta b/AnyPortalUnity/Assets/AssetBundles.meta index 7f81808..bdb0bfa 100644 --- a/AnyPortalUnity/Assets/AssetBundles.meta +++ b/AnyPortalUnity/Assets/AssetBundles.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4ab0759ab5bab37428cdc48105a65a8c +guid: f9c022b5faf3d6f44a204707650b1ac7 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/OFL.txt.meta b/AnyPortalUnity/Assets/AssetBundles/Linux64.meta similarity index 57% rename from AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/OFL.txt.meta rename to AnyPortalUnity/Assets/AssetBundles/Linux64.meta index 4c14b41..fcd65c6 100644 --- a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/OFL.txt.meta +++ b/AnyPortalUnity/Assets/AssetBundles/Linux64.meta @@ -1,6 +1,7 @@ fileFormatVersion: 2 -guid: 6bc4eac0123925a4dac3432052315496 -TextScriptImporter: +guid: ecf9c198b86543c4daf1b3ff753161f4 +folderAsset: yes +DefaultImporter: externalObjects: {} userData: assetBundleName: diff --git a/AnyPortalUnity/Assets/AssetBundles/Linux64/.gitignore b/AnyPortalUnity/Assets/AssetBundles/Linux64/.gitignore index e69de29..f59ec20 100644 --- a/AnyPortalUnity/Assets/AssetBundles/Linux64/.gitignore +++ b/AnyPortalUnity/Assets/AssetBundles/Linux64/.gitignore @@ -0,0 +1 @@ +* \ No newline at end of file diff --git a/AnyPortalUnity/Assets/AssetBundles/Win64.meta b/AnyPortalUnity/Assets/AssetBundles/Win64.meta new file mode 100644 index 0000000..84efeef --- /dev/null +++ b/AnyPortalUnity/Assets/AssetBundles/Win64.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d4448fe5c0af0a94299388ec3127a07d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/AnyPortalUnity/Assets/AssetBundles/Win64/.gitignore b/AnyPortalUnity/Assets/AssetBundles/Win64/.gitignore index e69de29..f59ec20 100644 --- a/AnyPortalUnity/Assets/AssetBundles/Win64/.gitignore +++ b/AnyPortalUnity/Assets/AssetBundles/Win64/.gitignore @@ -0,0 +1 @@ +* \ No newline at end of file diff --git a/AnyPortalUnity/Assets/Editor.meta b/AnyPortalUnity/Assets/Editor.meta index ff53b30..38093a4 100644 --- a/AnyPortalUnity/Assets/Editor.meta +++ b/AnyPortalUnity/Assets/Editor.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c857dc82688819c43825007a6d5d890c +guid: c476124687fbd5b4ca6b0086eb23f790 folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/AnyPortalUnity/Assets/Editor/CreateAssetBundles.cs b/AnyPortalUnity/Assets/Editor/CreateAssetBundles.cs index 7187ded..d8bd52a 100644 --- a/AnyPortalUnity/Assets/Editor/CreateAssetBundles.cs +++ b/AnyPortalUnity/Assets/Editor/CreateAssetBundles.cs @@ -1,10 +1,13 @@ -using UnityEditor; - -public class CreateAssetBundles -{ - [MenuItem("Assets/Build AssetBundles")] - static void BuildAllAssetBundles() - { - BuildPipeline.BuildAssetBundles("Assets/AssetBundles", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64); - } +using UnityEditor; +using Unity; +using System.Threading; + +public class CreateAssetBundles +{ + [MenuItem("Assets/Build AssetBundles")] + static void BuildAllAssetBundles() + { + BuildPipeline.BuildAssetBundles("Assets/AssetBundles/Win64", BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows64); + BuildPipeline.BuildAssetBundles("Assets/AssetBundles/Linux64", BuildAssetBundleOptions.None, BuildTarget.StandaloneLinux64); + } } \ No newline at end of file diff --git a/AnyPortalUnity/Assets/Editor/CreateAssetBundles.cs.meta b/AnyPortalUnity/Assets/Editor/CreateAssetBundles.cs.meta index 2af8532..bb185d4 100644 --- a/AnyPortalUnity/Assets/Editor/CreateAssetBundles.cs.meta +++ b/AnyPortalUnity/Assets/Editor/CreateAssetBundles.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b654677fe77f815438f0112f5f174375 +guid: 5b1741f6d38b79e49a8fa457f4324a73 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/AnyPortalUnity/Assets/Fonts.meta b/AnyPortalUnity/Assets/Fonts.meta index 82266d2..45a8984 100644 --- a/AnyPortalUnity/Assets/Fonts.meta +++ b/AnyPortalUnity/Assets/Fonts.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 57ca8206696deb54494cf90d4248ce31 +guid: c1ebef45ba22384449663d9c8d91609b folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Bold.ttf b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Bold.ttf deleted file mode 100644 index 81e81a0..0000000 Binary files a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Bold.ttf and /dev/null differ diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Bold.ttf.meta b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Bold.ttf.meta deleted file mode 100644 index cf2d68c..0000000 --- a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Bold.ttf.meta +++ /dev/null @@ -1,23 +0,0 @@ -fileFormatVersion: 2 -guid: 699dcb2333936ce4f9183fb90df06732 -TrueTypeFontImporter: - externalObjects: {} - serializedVersion: 4 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 0 - characterPadding: 1 - includeFontData: 1 - fontName: Averia Serif Libre - fontNames: - - Averia Serif Libre - fallbackFontReferences: - - {fileID: 12800000, guid: e8b29f450214d144ba668439cf057b75, type: 3} - customCharacters: - fontRenderingMode: 0 - ascentCalculationMode: 1 - useLegacyBoundsCalculation: 0 - shouldRoundAdvanceValue: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-BoldItalic.ttf b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-BoldItalic.ttf deleted file mode 100644 index 8935c9b..0000000 Binary files a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-BoldItalic.ttf and /dev/null differ diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-BoldItalic.ttf.meta b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-BoldItalic.ttf.meta deleted file mode 100644 index ac85f2b..0000000 --- a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-BoldItalic.ttf.meta +++ /dev/null @@ -1,22 +0,0 @@ -fileFormatVersion: 2 -guid: e8b29f450214d144ba668439cf057b75 -TrueTypeFontImporter: - externalObjects: {} - serializedVersion: 4 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 0 - characterPadding: 1 - includeFontData: 1 - fontName: Averia Serif Libre - fontNames: - - Averia Serif Libre - fallbackFontReferences: [] - customCharacters: - fontRenderingMode: 0 - ascentCalculationMode: 1 - useLegacyBoundsCalculation: 0 - shouldRoundAdvanceValue: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Italic.ttf b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Italic.ttf deleted file mode 100644 index 82eb4f1..0000000 Binary files a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Italic.ttf and /dev/null differ diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Italic.ttf.meta b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Italic.ttf.meta deleted file mode 100644 index 324b30e..0000000 --- a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Italic.ttf.meta +++ /dev/null @@ -1,25 +0,0 @@ -fileFormatVersion: 2 -guid: cc4bc1bac9a8f084a80de3aece4a33be -TrueTypeFontImporter: - externalObjects: {} - serializedVersion: 4 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 0 - characterPadding: 1 - includeFontData: 1 - fontName: Averia Serif Libre - fontNames: - - Averia Serif Libre - fallbackFontReferences: - - {fileID: 12800000, guid: 699dcb2333936ce4f9183fb90df06732, type: 3} - - {fileID: 12800000, guid: e8b29f450214d144ba668439cf057b75, type: 3} - - {fileID: 12800000, guid: 79963b9dfeaa30d4b9b9def66ea94c7a, type: 3} - customCharacters: - fontRenderingMode: 0 - ascentCalculationMode: 1 - useLegacyBoundsCalculation: 0 - shouldRoundAdvanceValue: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Light.ttf b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Light.ttf deleted file mode 100644 index 6e2e46c..0000000 Binary files a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Light.ttf and /dev/null differ diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Light.ttf.meta b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Light.ttf.meta deleted file mode 100644 index 3763dac..0000000 --- a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Light.ttf.meta +++ /dev/null @@ -1,26 +0,0 @@ -fileFormatVersion: 2 -guid: ad841c52685b3ec449449425c30ee51d -TrueTypeFontImporter: - externalObjects: {} - serializedVersion: 4 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 0 - characterPadding: 1 - includeFontData: 1 - fontName: Averia Serif Libre - fontNames: - - Averia Serif Libre - fallbackFontReferences: - - {fileID: 12800000, guid: 699dcb2333936ce4f9183fb90df06732, type: 3} - - {fileID: 12800000, guid: e8b29f450214d144ba668439cf057b75, type: 3} - - {fileID: 12800000, guid: cc4bc1bac9a8f084a80de3aece4a33be, type: 3} - - {fileID: 12800000, guid: 79963b9dfeaa30d4b9b9def66ea94c7a, type: 3} - customCharacters: - fontRenderingMode: 0 - ascentCalculationMode: 1 - useLegacyBoundsCalculation: 0 - shouldRoundAdvanceValue: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-LightItalic.ttf b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-LightItalic.ttf deleted file mode 100644 index e845662..0000000 Binary files a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-LightItalic.ttf and /dev/null differ diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-LightItalic.ttf.meta b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-LightItalic.ttf.meta deleted file mode 100644 index 528407e..0000000 --- a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-LightItalic.ttf.meta +++ /dev/null @@ -1,27 +0,0 @@ -fileFormatVersion: 2 -guid: 1e8622c88eff54c4496ecf528b96a948 -TrueTypeFontImporter: - externalObjects: {} - serializedVersion: 4 - fontSize: 16 - forceTextureCase: -2 - characterSpacing: 0 - characterPadding: 1 - includeFontData: 1 - fontName: Averia Serif Libre - fontNames: - - Averia Serif Libre - fallbackFontReferences: - - {fileID: 12800000, guid: ad841c52685b3ec449449425c30ee51d, type: 3} - - {fileID: 12800000, guid: 699dcb2333936ce4f9183fb90df06732, type: 3} - - {fileID: 12800000, guid: e8b29f450214d144ba668439cf057b75, type: 3} - - {fileID: 12800000, guid: cc4bc1bac9a8f084a80de3aece4a33be, type: 3} - - {fileID: 12800000, guid: 79963b9dfeaa30d4b9b9def66ea94c7a, type: 3} - customCharacters: - fontRenderingMode: 0 - ascentCalculationMode: 1 - useLegacyBoundsCalculation: 0 - shouldRoundAdvanceValue: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Regular.ttf.meta b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Regular.ttf.meta index e25b2a5..8b6234a 100644 --- a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Regular.ttf.meta +++ b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/AveriaSerifLibre-Regular.ttf.meta @@ -8,7 +8,6 @@ TrueTypeFontImporter: characterSpacing: 0 characterPadding: 1 includeFontData: 1 - fontName: Averia Serif Libre fontNames: - Averia Serif Libre fallbackFontReferences: diff --git a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/OFL.txt b/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/OFL.txt deleted file mode 100644 index e5495c8..0000000 --- a/AnyPortalUnity/Assets/Fonts/Averia_Serif_Libre/OFL.txt +++ /dev/null @@ -1,94 +0,0 @@ -Copyright (c) 2011, Dan Sayers (i@iotic.com), -with Reserved Font Name 'Averia' and 'Averia Libre'. - -This Font Software is licensed under the SIL Open Font License, Version 1.1. -This license is copied below, and is also available with a FAQ at: -http://scripts.sil.org/OFL - - ------------------------------------------------------------ -SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ------------------------------------------------------------ - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/AnyPortalUnity/Assets/Scenes/main.unity b/AnyPortalUnity/Assets/Scenes/main.unity deleted file mode 100644 index b7ae00f..0000000 --- a/AnyPortalUnity/Assets/Scenes/main.unity +++ /dev/null @@ -1,298 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 0 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 11 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 1 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_UseShadowmask: 1 ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} ---- !u!1 &1811390955 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1811390957} - - component: {fileID: 1811390956} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &1811390956 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1811390955} - m_Enabled: 1 - serializedVersion: 10 - m_Type: 1 - m_Shape: 0 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize: 10 - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 ---- !u!4 &1811390957 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1811390955} - m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} - m_LocalPosition: {x: 0, y: 3, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!1 &1893721438 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1893721441} - - component: {fileID: 1893721440} - - component: {fileID: 1893721439} - m_Layer: 0 - m_Name: Main Camera - m_TagString: MainCamera - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!81 &1893721439 -AudioListener: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1893721438} - m_Enabled: 1 ---- !u!20 &1893721440 -Camera: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1893721438} - m_Enabled: 1 - serializedVersion: 2 - m_ClearFlags: 1 - m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} - m_projectionMatrixMode: 1 - m_GateFitMode: 2 - m_FOVAxisMode: 0 - m_SensorSize: {x: 36, y: 24} - m_LensShift: {x: 0, y: 0} - m_FocalLength: 50 - m_NormalizedViewPortRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 - near clip plane: 0.3 - far clip plane: 1000 - field of view: 60 - orthographic: 0 - orthographic size: 5 - m_Depth: -1 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingPath: -1 - m_TargetTexture: {fileID: 0} - m_TargetDisplay: 0 - m_TargetEye: 3 - m_HDR: 1 - m_AllowMSAA: 1 - m_AllowDynamicResolution: 0 - m_ForceIntoRT: 0 - m_OcclusionCulling: 1 - m_StereoConvergence: 10 - m_StereoSeparation: 0.022 ---- !u!4 &1893721441 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1893721438} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 1, z: -10} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/AnyPortalUnity/Assets/downarrow.png.meta b/AnyPortalUnity/Assets/downarrow.png.meta index 0f9c9e4..43db280 100644 --- a/AnyPortalUnity/Assets/downarrow.png.meta +++ b/AnyPortalUnity/Assets/downarrow.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4c27276c1dc362f47945ee44b86b4160 +guid: 15c14460d05869349960d5baf60478ef TextureImporter: internalIDToNameTable: [] externalObjects: {} @@ -23,6 +23,7 @@ TextureImporter: isReadable: 0 streamingMipmaps: 0 streamingMipmapsPriority: 0 + vTOnly: 0 grayScaleToAlpha: 0 generateCubemap: 6 cubemapConvolution: 0 @@ -31,12 +32,12 @@ TextureImporter: maxTextureSize: 2048 textureSettings: serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 + filterMode: 1 + aniso: 1 + mipBias: 0 wrapU: 1 wrapV: 1 - wrapW: -1 + wrapW: 0 nPOTScale: 0 lightmap: 0 compressionQuality: 50 @@ -54,9 +55,12 @@ TextureImporter: textureType: 8 textureShape: 1 singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 maxTextureSizeSet: 0 compressionQualitySet: 0 textureFormatSet: 0 + ignorePngGamma: 0 applyGammaDecoding: 0 platformSettings: - serializedVersion: 3 diff --git a/AnyPortalUnity/Assets/main.unity b/AnyPortalUnity/Assets/main.unity new file mode 100644 index 0000000..fe1ff71 --- /dev/null +++ b/AnyPortalUnity/Assets/main.unity @@ -0,0 +1,125 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} diff --git a/AnyPortalUnity/Assets/Scenes/main.unity.meta b/AnyPortalUnity/Assets/main.unity.meta similarity index 74% rename from AnyPortalUnity/Assets/Scenes/main.unity.meta rename to AnyPortalUnity/Assets/main.unity.meta index cfe4aac..52c66fe 100644 --- a/AnyPortalUnity/Assets/Scenes/main.unity.meta +++ b/AnyPortalUnity/Assets/main.unity.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c3fd10977f75de846a436d2921d72341 +guid: 8916d1aa906b9eb46b804474d9cf2161 DefaultImporter: externalObjects: {} userData: diff --git a/AnyPortalUnity/ProjectSettings/EditorBuildSettings.asset b/AnyPortalUnity/ProjectSettings/EditorBuildSettings.asset index c8ffb26..0147887 100644 --- a/AnyPortalUnity/ProjectSettings/EditorBuildSettings.asset +++ b/AnyPortalUnity/ProjectSettings/EditorBuildSettings.asset @@ -5,6 +5,4 @@ EditorBuildSettings: m_ObjectHideFlags: 0 serializedVersion: 2 m_Scenes: [] - m_configObjects: - com.unity.addressableassets: {fileID: 11400000, guid: 96b747482b25ae14e82cd7bb5b28e77d, - type: 2} + m_configObjects: {} diff --git a/AnyPortalUnity/ProjectSettings/ProjectSettings.asset b/AnyPortalUnity/ProjectSettings/ProjectSettings.asset index e01fd70..d4edabd 100644 --- a/AnyPortalUnity/ProjectSettings/ProjectSettings.asset +++ b/AnyPortalUnity/ProjectSettings/ProjectSettings.asset @@ -4,7 +4,7 @@ PlayerSettings: m_ObjectHideFlags: 0 serializedVersion: 20 - productGUID: c016f3f8108c8824ba9a51513fa1b9a5 + productGUID: a23762fff86f5c749a7fce8aed7dfd0e AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 AndroidEnableSustainedPerformanceMode: 0 @@ -12,8 +12,8 @@ PlayerSettings: targetDevice: 2 useOnDemandResources: 0 accelerometerFrequency: 60 - companyName: DefaultCompany - productName: AnyPortalUnity + companyName: sirskunkalot + productName: VeilheimUnity defaultCursor: {fileID: 0} cursorHotspot: {x: 0, y: 0} m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} @@ -586,7 +586,8 @@ PlayerSettings: gcIncremental: 0 assemblyVersionValidation: 1 gcWBarrierValidation: 0 - apiCompatibilityLevelPerPlatform: {} + apiCompatibilityLevelPerPlatform: + Standalone: 3 m_RenderingPath: 1 m_MobileRenderingPath: 1 metroPackageName: Template_3D diff --git a/AnyPortalUnity/ProjectSettings/ProjectVersion.txt b/AnyPortalUnity/ProjectSettings/ProjectVersion.txt index e8a0ab9..02057f2 100644 --- a/AnyPortalUnity/ProjectSettings/ProjectVersion.txt +++ b/AnyPortalUnity/ProjectSettings/ProjectVersion.txt @@ -1,2 +1,2 @@ -m_EditorVersion: 2019.4.20f1 -m_EditorVersionWithRevision: 2019.4.20f1 (6dd1c08eedfa) +m_EditorVersion: 2020.3.33f1 +m_EditorVersionWithRevision: 2020.3.33f1 (915a7af8b0d5) diff --git a/AnyPortalUnity/ProjectSettings/TagManager.asset b/AnyPortalUnity/ProjectSettings/TagManager.asset index 1c92a78..c543423 100644 --- a/AnyPortalUnity/ProjectSettings/TagManager.asset +++ b/AnyPortalUnity/ProjectSettings/TagManager.asset @@ -13,18 +13,18 @@ TagManager: - UI - - - - - - - - - - - - - - - - - - - - - - - - - - + - effect + - character + - piece + - terrain + - item + - ghost + - character_trigger + - static_solid + - piece_nonsolid + - character_ghost + - hitbox + - skybox - - - diff --git a/AnyPortalUnity/ProjectSettings/VersionControlSettings.asset b/AnyPortalUnity/ProjectSettings/VersionControlSettings.asset new file mode 100644 index 0000000..dca2881 --- /dev/null +++ b/AnyPortalUnity/ProjectSettings/VersionControlSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!890905787 &1 +VersionControlSettings: + m_ObjectHideFlags: 0 + m_Mode: Visible Meta Files + m_CollabEditorSettings: + inProgressEnabled: 1 diff --git a/AnyPortalUnity/UIElementsSchema/UIElements.xsd b/AnyPortalUnity/UIElementsSchema/UIElements.xsd new file mode 100644 index 0000000..14587e5 --- /dev/null +++ b/AnyPortalUnity/UIElementsSchema/UIElements.xsd @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/AnyPortalUnity/UIElementsSchema/Unity.Cloud.Collaborate.Components.ChangeListEntries.xsd b/AnyPortalUnity/UIElementsSchema/Unity.Cloud.Collaborate.Components.ChangeListEntries.xsd new file mode 100644 index 0000000..80b6133 --- /dev/null +++ b/AnyPortalUnity/UIElementsSchema/Unity.Cloud.Collaborate.Components.ChangeListEntries.xsd @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AnyPortalUnity/UIElementsSchema/Unity.Cloud.Collaborate.Components.xsd b/AnyPortalUnity/UIElementsSchema/Unity.Cloud.Collaborate.Components.xsd new file mode 100644 index 0000000..5a03958 --- /dev/null +++ b/AnyPortalUnity/UIElementsSchema/Unity.Cloud.Collaborate.Components.xsd @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AnyPortalUnity/UIElementsSchema/Unity.Cloud.Collaborate.Views.xsd b/AnyPortalUnity/UIElementsSchema/Unity.Cloud.Collaborate.Views.xsd new file mode 100644 index 0000000..eaf9d23 --- /dev/null +++ b/AnyPortalUnity/UIElementsSchema/Unity.Cloud.Collaborate.Views.xsd @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AnyPortalUnity/UIElementsSchema/UnityEditor.PackageManager.UI.xsd b/AnyPortalUnity/UIElementsSchema/UnityEditor.PackageManager.UI.xsd new file mode 100644 index 0000000..fae7f74 --- /dev/null +++ b/AnyPortalUnity/UIElementsSchema/UnityEditor.PackageManager.UI.xsd @@ -0,0 +1,368 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AnyPortalUnity/UIElementsSchema/UnityEditor.UIElements.Debugger.xsd b/AnyPortalUnity/UIElementsSchema/UnityEditor.UIElements.Debugger.xsd new file mode 100644 index 0000000..e3d74dc --- /dev/null +++ b/AnyPortalUnity/UIElementsSchema/UnityEditor.UIElements.Debugger.xsd @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AnyPortalUnity/UIElementsSchema/UnityEditor.UIElements.xsd b/AnyPortalUnity/UIElementsSchema/UnityEditor.UIElements.xsd new file mode 100644 index 0000000..395fcf6 --- /dev/null +++ b/AnyPortalUnity/UIElementsSchema/UnityEditor.UIElements.xsd @@ -0,0 +1,889 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AnyPortalUnity/UIElementsSchema/UnityEngine.UIElements.xsd b/AnyPortalUnity/UIElementsSchema/UnityEngine.UIElements.xsd new file mode 100644 index 0000000..8f69652 --- /dev/null +++ b/AnyPortalUnity/UIElementsSchema/UnityEngine.UIElements.xsd @@ -0,0 +1,671 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AnyPortalUnity/downarrow.svg b/AnyPortalUnity/downarrow.svg deleted file mode 100644 index f8f11a2..0000000 --- a/AnyPortalUnity/downarrow.svg +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/DoPrebuild.props b/DoPrebuild.props new file mode 100644 index 0000000..376c20d --- /dev/null +++ b/DoPrebuild.props @@ -0,0 +1,6 @@ + + + + True + + diff --git a/LICENSE b/LICENSE index 0e1a762..5c93f45 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,13 @@ -MIT License + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 -Copyright (c) 2021 Alex Sweet + Copyright (C) 2004 Sam Hocevar -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README.md b/README.md index 7c27d2e..d98a0eb 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,98 @@ # AnyPortal -### By sweetgiorni -## https://github.com/sweetgiorni/AnyPortal -#### https://www.nexusmods.com/valheim/mods/170 -### https://valheim.thunderstore.io/package/sweetgiorni/AnyPortal/ +A Valheim mod stub project using [Jötunn](https://github.com/Valheim-Modding/Jotunn) including build tools and a basic Unity project stub. There is no actual plugin content included, just a bare minimum plugin class. +# Quick Setup Guide -# Description +These are quick setup steps with no context provided. Please see Jötunns [Github Pages](https://valheim-modding.github.io/Jotunn/guides/overview.html) for a more in depth guide and documentation. -Disables tag-based portal pairing and instead provides a drop-down box for you to choose which destination portal you want to connect to. +## Development Environment Setup -## Destination selection -When you interact with a portal, you'll see a new dropdown under the tag input text box. Click on the dropdown and select your desired destination. The list elements include the tag name of the destination portals and their distances from the player. +How to setup the development enviroment for this project. -## Show destination on map -Don't recognize a portal listed in the dropdown? Just select it and click the "Map" button to be shown where the portal is on the map. +1. Install [Visual Studio 2022](https://visualstudio.microsoft.com) and add the C# workload. +2. Download this package: [BepInEx pack for Valheim](https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/) +3. Unpack and copy the contents of `BepInExPack_Valheim` into your Valheim root folder. You should now see a new folder called `\unstripped_corlib` and more additional stuff. +4. Fork and clone this repository using git. That should create a new folder `JotunnModStub`. You can also [use the template function of github](https://github.com/Valheim-Modding/JotunnModStub/generate) to create a new, clean repo out of it and clone that. +5. Edit `DoPrebuild.props` in the project base path and change `ExecutePrebuild` to `true` if you want Jötunn to automatically generate publicized versions of the game dlls for you. +6. Open the Solution file `\JotunnModStub.sln`. Right-click on the project or solution in the Solution Explorer and select `Manage NuGet packages...`. It should prompt you a message at the top that some NuGet-Packages are missing. Click "Restore" and restart Visual Studio when finished. +7. Rename the Solution/Project and everything related so that it resembles your own projects name. This includes the assembly information as well as the Unity project. +A new environment file `Environment.props` can be created in the projects base path ``. +Make sure you are not in any subfolder. +Paste this snippet and change the paths accordingly. +```xml + + + + + -# Installation (Read carefully!!!) + + $(VALHEIM_INSTALL)\BepInEx\plugins + + +``` -1. Install [BepInEx](https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/) -2. Copy AnyPortal.dll to the BepInEx plugins directory (Valheim/BepInEx/plugins/) +### Post Build automations -**If you want to use this in multiplayer, you also need to install the mod on the server.** If you notice that you are able to select portals from the dropdown, but they connect and disconnect a few seconds later, that most likely means the mod isn't running on the server. +Included in this repo is a PowerShell script `publish.ps1`. The script is referenced in the project file as a post-build event. Depending on the chosen configuration in Visual Studio the script executes the following actions. +### Building Debug +* The compiled dll file for this project is copied to `\BepInEx\plugins` (or whatever path you set as MOD_DEPLOYPATH). +* A .mdb file is generated for the compiled project dll and copied to `\BepInEx\plugins` (or whatever path you set as MOD_DEPLOYPATH). -## Building from source -Open the Unity project in AnyPortalUnity, open the "Assets" tab, and click "Build AssetBundles". Then open the C# project with Visual Studio to build the dll. \ No newline at end of file +### Building Release + +* A compressed file with the binaries is created in `\Packages`ready for upload to ThunderStore. Dont forget to include your information in the manifest.json and to change the project's readme file. + +## Developing Assets with Unity + +New Assets can be created with Unity and imported into Valheim using the mod. A Unity project is included in this repository under `\JotunnModUnity`. + +### Unity Editor Setup + +1. [Download](https://public-cdn.cloud.unity3d.com/hub/prod/UnityHubSetup.exe) UnityHub directly from Unity or install it with the Visual Studio Installer via `Individual Components` -> `Visual Studio Tools for Unity`. +2. You will need an Unity account to register your PC and get a free licence. Create the account, login with it in Unity Hub and get your licence via `Settings` -> `Licence Management`. +3. Install Unity Editor version 2020.3.33f. +4. Copy all `assembly_*.dll` from `\valheim_Data\Managed` into `\JotunnModUnity\Assets\Assemblies`. **Do this directly in the filesystem - don't open Unity first or import the dlls directly in Unity**. +5. **Warning:** These assembly files are copyrighted material and you can theoretically get into trouble when you distribute them in your github repository. To avoid that there is a .gitignore file in the Unity project folder. Keep that when you clone or copy this repository. +6. Open Unity Hub and add the JotunnModUnity project. +7. Open the project. +7. Install the `AssetBundle Browser` package in the Unity Editor via `Window`-> `Package Manager` for easy bundle creation. + +## Debugging + +You can enable remote debugging of your mod code at runtime via dnSpy or Visual Studio. Before being able to attach a remote debugger you will have to prepare your game install and turn it into a "Development Build" once: + +1. Locate your Unity Editor installation from the previous step and navigate to `\Editor\Data\PlaybackEngines\windowsstandalonesupport\Variations\win64_development_mono` +2. Copy `UnityPlayer.dll` and `WinPixEventRuntime.dll` from that folder into your game installation folder. Overwrite existing files. +3. Open the `\valheim_Data\boot.config` with a text editor (Notepad++ for example) and add a new line `player-connection-debug=1` to it. +4. When starting up Valheim you should see a `Development Build` text at the lower-right corner of the screen. + +### Debugging with Visual Studio + +Your own code can be debugged in source with Visual Studio itself. + +1. Install Visual Studio Tools for Unity (can be done in Visual Studio installer via `Individual Components` -> `Visual Studio Tools for Unity`) +3. Build the project with target `Debug`. The publish.ps1 PowerShell script from this repo... + * copies the generated mod .dll and .pdb to \\BepInEx\plugins after a successful build + * automatically generates a JotunnModStub.dll.mdb file, which is needed for Unity/mono debugging. It should be in \\BepInEx\plugins, too. +4. Start Valheim (either directly from Steam or hit F5 in Visual Studio when Steam is running) +5. Go to `Debug` -> `Attach Unity debugger` +6. You should see your local game instance listed as a target to attach the debugger to. If it is not there, try hitting `Refresh` as the debugger only appears after the game has loaded into the main menu. + +## Actions after a game update + +When Valheim updates it is likely that parts of the assembly files change. If this is the case, the references to the assembly files must be renewed in Visual Studio and Unity. + +### Visual Studio actions + +1. There is a file called DoPrebuild.props included in the solution. When you set its only value to true, Jötunn will automatically generate publicized assemblies for you. Otherwise you have to do this step manually. + +### Unity actions + +1. Copy all `assembly_*.dll` from `\valheim_Data\Managed` into `\JotunnModUnity\Assets\Assemblies`.
+ **Do this directly in the filesystem - don't import the dlls in Unity**. +2. Go to Unity Editor and press `Ctrl+R`. This reloads all files from the filesystem and "re-imports" the copied dlls into the project. diff --git a/images/banner.png b/images/banner.png deleted file mode 100644 index 2e31852..0000000 Binary files a/images/banner.png and /dev/null differ diff --git a/images/banner.svg b/images/banner.svg deleted file mode 100644 index ae5b66f..0000000 --- a/images/banner.svg +++ /dev/null @@ -1,136261 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - AnyPortal - - - diff --git a/images/dropdown.gif b/images/dropdown.gif deleted file mode 100644 index b16f6dd..0000000 Binary files a/images/dropdown.gif and /dev/null differ diff --git a/images/dropdown.png b/images/dropdown.png deleted file mode 100644 index b4c56ac..0000000 Binary files a/images/dropdown.png and /dev/null differ diff --git a/images/showonmap.png b/images/showonmap.png deleted file mode 100644 index 710e3dc..0000000 Binary files a/images/showonmap.png and /dev/null differ diff --git a/libraries/Debug/pdb2mdb.exe b/libraries/Debug/pdb2mdb.exe new file mode 100644 index 0000000..b263a14 Binary files /dev/null and b/libraries/Debug/pdb2mdb.exe differ diff --git a/manifest.json b/manifest.json index 6639e50..f6cde9d 100644 --- a/manifest.json +++ b/manifest.json @@ -1,9 +1,9 @@ -{ - "name": "AnyPortal", - "version_number": "1.0.4", - "website_url": "https://github.com/sweetgiorni/AnyPortal", - "description": "Overhauls the portal pairing system by allowing you to select and travel to any existing portal, regardless of tag.", - "dependencies": [ - "denikson-BepInExPack_Valheim-5.4.701" - ] +{ + "name": "AnyPortal", + "description": "Overhauls the portal pairing system by allowing you to select and travel to any existing portal, regardless of tag.", + "version_number": "2.0.0", + "website_url": "https://github.com/sweetgiorni/AnyPortal", + "dependencies": [ + "ValheimModding-Jotunn-2.6.1" + ] } \ No newline at end of file diff --git a/publish.ps1 b/publish.ps1 new file mode 100644 index 0000000..272c857 --- /dev/null +++ b/publish.ps1 @@ -0,0 +1,69 @@ +param( + [Parameter(Mandatory)] + [ValidateSet('Debug','Release')] + [System.String]$Target, + + [Parameter(Mandatory)] + [System.String]$TargetPath, + + [Parameter(Mandatory)] + [System.String]$TargetAssembly, + + [Parameter(Mandatory)] + [System.String]$ValheimPath, + + [Parameter(Mandatory)] + [System.String]$ProjectPath, + + [System.String]$DeployPath +) + +# Make sure Get-Location is the script path +Push-Location -Path (Split-Path -Parent $MyInvocation.MyCommand.Path) + +# Test some preliminaries +("$TargetPath", + "$ValheimPath", + "$(Get-Location)\libraries" +) | % { + if (!(Test-Path "$_")) {Write-Error -ErrorAction Stop -Message "$_ folder is missing"} +} + +# Plugin name without ".dll" +$name = "$TargetAssembly" -Replace('.dll') + +# Create the mdb file +$pdb = "$TargetPath\$name.pdb" +if (Test-Path -Path "$pdb") { + Write-Host "Create mdb file for plugin $name" + Invoke-Expression "& `"$(Get-Location)\libraries\Debug\pdb2mdb.exe`" `"$TargetPath\$TargetAssembly`"" +} + +# Main Script +Write-Host "Publishing for $Target from $TargetPath" + +if ($Target.Equals("Debug")) { + if ($DeployPath.Equals("")){ + $DeployPath = "$ValheimPath\BepInEx\plugins" + } + + $plug = New-Item -Type Directory -Path "$DeployPath\$name" -Force + Write-Host "Copy $TargetAssembly to $plug" + Copy-Item -Path "$TargetPath\$name.dll" -Destination "$plug" -Force + Copy-Item -Path "$TargetPath\$name.pdb" -Destination "$plug" -Force + Copy-Item -Path "$TargetPath\$name.dll.mdb" -Destination "$plug" -Force +} + +if($Target.Equals("Release")) { + Write-Host "Packaging for ThunderStore..." + $Package="Package" + $PackagePath="$ProjectPath\$Package" + + Write-Host "$PackagePath\$TargetAssembly" + Copy-Item -Path "$TargetPath\$TargetAssembly" -Destination "$PackagePath\plugins\$TargetAssembly" -Force + Copy-Item -Path "$ProjectPath\README.md" -Destination "$PackagePath\README.md" -Force + Compress-Archive -Path "$PackagePath\*" -DestinationPath "$TargetPath\$TargetAssembly.zip" -Force +} + +# Pop Location +Pop-Location \ No newline at end of file