generated from DREDGE-Mods/WinchModTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed broken tutorial prompts - Fixed Pale Reach title screen - Made water transparent in the Reach - Fix some depth effects in the Reach - Dredge VR should now work directly with the mod manager and database
- Loading branch information
Showing
13 changed files
with
194 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
patreon: xen42 | ||
custom: ["https://paypal.me/xen42"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace DredgeVR.Helpers; | ||
|
||
public static class DLCHelper | ||
{ | ||
public static bool OwnsThePaleReach() => GameManager.Instance.EntitlementManager.GetHasEntitlement(Entitlement.DLC_1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.IO; | ||
|
||
namespace DredgeVR.Helpers; | ||
|
||
public static class FileHelper | ||
{ | ||
public static void Copy(string sourceDirectory, string targetDirectory) | ||
{ | ||
DirectoryInfo diSource = new DirectoryInfo(sourceDirectory); | ||
DirectoryInfo diTarget = new DirectoryInfo(targetDirectory); | ||
|
||
CopyAll(diSource, diTarget); | ||
} | ||
|
||
public static void CopyAll(DirectoryInfo source, DirectoryInfo target) | ||
{ | ||
Directory.CreateDirectory(target.FullName); | ||
|
||
// Copy each file into the new directory. | ||
foreach (FileInfo fi in source.GetFiles()) | ||
{ | ||
Console.WriteLine(@"Copying {0}\{1}", target.FullName, fi.Name); | ||
fi.CopyTo(Path.Combine(target.FullName, fi.Name), true); | ||
} | ||
|
||
// Copy each subdirectory using recursion. | ||
foreach (DirectoryInfo diSourceSubDir in source.GetDirectories()) | ||
{ | ||
DirectoryInfo nextTargetSubDir = | ||
target.CreateSubdirectory(diSourceSubDir.Name); | ||
CopyAll(diSourceSubDir, nextTargetSubDir); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using InControl; | ||
using System.IO; | ||
using UnityEngine; | ||
using Valve.VR; | ||
|
||
namespace DredgeVR.VRInput; | ||
|
||
public class VRVector2BindingSource : BindingSource | ||
{ | ||
public SteamVR_Action_Vector2 action; | ||
private Vector2 _direction; | ||
|
||
public string GetButtonName() | ||
{ | ||
// Keep these localized because they will appear in text strings | ||
var button = action.GetLocalizedOriginPart(SteamVR_Input_Sources.Any, EVRInputStringBits.VRInputString_InputSource); | ||
var hand = action.GetLocalizedOriginPart(SteamVR_Input_Sources.Any, EVRInputStringBits.VRInputString_Hand); | ||
|
||
return $"{button} ({hand})"; | ||
} | ||
|
||
public VRVector2BindingSource(SteamVR_Action_Vector2 action, Vector2 direction) | ||
{ | ||
this.action = action; | ||
this._direction = direction; | ||
} | ||
|
||
public override string Name => $"{action.GetShortName()} - {action.GetLocalizedOrigin(SteamVR_Input_Sources.Any)}"; | ||
|
||
public override string DeviceName => "VR"; | ||
|
||
public override InputDeviceClass DeviceClass => InputDeviceClass.Controller; | ||
|
||
public override InputDeviceStyle DeviceStyle => InputDeviceStyle.Oculus; | ||
|
||
public static BindingSourceType Source = BindingSourceType.UnknownDeviceBindingSource; | ||
public override BindingSourceType BindingSourceType => Source; | ||
|
||
public override bool Equals(BindingSource other) | ||
{ | ||
return other is VRBindingSource otherVR && otherVR.action.Equals(action); | ||
} | ||
|
||
public override bool GetState(InputDevice inputDevice) | ||
{ | ||
// Dot product greater than zero means that some part of this movement is in the direction specified | ||
return Vector2.Dot(action.axis, _direction) > 0; | ||
} | ||
|
||
public override float GetValue(InputDevice inputDevice) | ||
{ | ||
return GetState(inputDevice) ? 1f : 0f; | ||
} | ||
|
||
public override void Load(BinaryReader reader, ushort dataFormatVersion) | ||
{ | ||
|
||
} | ||
|
||
public override void Save(BinaryWriter writer) | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
{ | ||
"Name": "DredgeVR", | ||
"ModGUID": "xen.DredgeVR", | ||
"Version": "0.1.6", | ||
"Version": "0.2.0", | ||
"ModAssembly": "DredgeVR.dll", | ||
"MinWinchVersion": "0.2.3", | ||
"Entrypoint": "DredgeVR.Loader/Initialize" | ||
"MinWinchVersion": "0.3.0", | ||
"Entrypoint": "DredgeVR.Loader/Initialize", | ||
"Preload": "DredgeVR.Loader/Preload" | ||
} |