-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
462 additions
and
134 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
Winch.Examples/ExampleItems/Assets/POI/Conversation/AutoMove/exampleitems.automove.json
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,20 @@ | ||
{ | ||
"location": { | ||
"x": 375, | ||
"y": 0, | ||
"z": -344 | ||
}, | ||
"conversationNodeName": "ExampleItems_Alex_Root", | ||
"isOneTimeOnly": "false", | ||
"autoMovePosition": { | ||
"x": 0, | ||
"y": 0, | ||
"z": 0 | ||
}, | ||
"autoMoveRotation": { | ||
"x": 0, | ||
"y": 45, | ||
"z": 0 | ||
}, | ||
"includeRotation": "true" | ||
} |
14 changes: 14 additions & 0 deletions
14
Winch.Examples/ExampleItems/Assets/POI/Conversation/Explosive/exampleitems.explosive.json
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,14 @@ | ||
{ | ||
"location": { | ||
"x": 370.0, | ||
"y": 0.0, | ||
"z": -334.0 | ||
}, | ||
"conversationNodeName": "Explosives_Root", | ||
"isOneTimeOnly": "false", | ||
"vCam": { | ||
"x": -4.5, | ||
"y": 7.5, | ||
"z": 10 | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
Winch.Examples/ExampleItems/Assets/POI/Conversation/Inspect/exampleitems.inspect.json
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,9 @@ | ||
{ | ||
"location": { | ||
"x": 366.0, | ||
"y": 0.0, | ||
"z": -344.0 | ||
}, | ||
"conversationNodeName": "ExampleItems_Steve_Root", | ||
"isOneTimeOnly": "false" | ||
} |
7 changes: 7 additions & 0 deletions
7
Winch.Examples/ExampleItems/Assets/POI/Dock/exampleitems.dock.json
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,7 @@ | ||
{ | ||
"location": { | ||
"x": 362.0, | ||
"y": 0.0, | ||
"z": -344.0 | ||
} | ||
} |
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
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,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
using Winch.Core; | ||
|
||
namespace Winch.Components | ||
{ | ||
public class ModdedAutoMovePOI : AutoMovePOI | ||
{ | ||
[SerializeField] | ||
public bool unlockPlayerMovementAfterConversationCompleted = true; | ||
|
||
public override void OnConversationCompleted() | ||
{ | ||
base.OnConversationCompleted(); | ||
if (unlockPlayerMovementAfterConversationCompleted) | ||
{ | ||
UnlockPlayerMovement(); | ||
} | ||
} | ||
|
||
public void UnlockPlayerMovement() | ||
{ | ||
WinchCore.Log.Debug("[ModdedAutoMovePOI] UnlockPlayerMovement()"); | ||
GameManager.Instance.Player.Controller.ClearAutoMoveTarget(); | ||
GameManager.Instance.Player.Controller.ClearAutoRotateTarget(); | ||
} | ||
} | ||
} |
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
26 changes: 0 additions & 26 deletions
26
Winch/Serialization/POI/Conversation/ConversationPOIConverter.cs
This file was deleted.
Oops, something went wrong.
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.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
namespace Winch.Serialization.POI.Conversation; | ||
|
||
public class CustomAutoMovePOI : CustomConversationPOI | ||
{ | ||
/// <summary> | ||
/// Position to move the player's boat to, relative to this point of interest. | ||
/// </summary> | ||
[SerializeField] | ||
public Vector3 autoMovePosition = Vector3.zero; | ||
|
||
/// <summary> | ||
/// Whether to use <see cref="autoMoveRotation"/> | ||
/// </summary> | ||
[SerializeField] | ||
public bool includeRotation = false; | ||
|
||
/// <summary> | ||
/// Rotation to move the player's boat to, relative to this point of interest. | ||
/// </summary> | ||
[SerializeField] | ||
public Vector3 autoMoveRotation = Vector3.zero; | ||
|
||
/// <summary> | ||
/// Whether to unlock player movement after the dialogue ends | ||
/// </summary> | ||
[SerializeField] | ||
public bool unlockPlayerMovementAfterConversationCompleted = true; | ||
} |
20 changes: 20 additions & 0 deletions
20
Winch/Serialization/POI/Conversation/CustomAutoMovePOIConverter.cs
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,20 @@ | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
namespace Winch.Serialization.POI.Conversation; | ||
|
||
public class CustomAutoMovePOIConverter : CustomConversationPOIConverter | ||
{ | ||
private readonly Dictionary<string, FieldDefinition> _definitions = new() | ||
{ | ||
{ "autoMovePosition", new(Vector3.zero, o=>DredgeTypeHelpers.ParseVector3(o)) }, | ||
{ "includeRotation", new(false, o=> bool.Parse(o.ToString())) }, | ||
{ "autoMoveRotation", new(Vector3.zero, o=>DredgeTypeHelpers.ParseVector3(o)) }, | ||
{ "unlockPlayerMovementAfterConversationCompleted", new(true, o=> bool.Parse(o.ToString())) }, | ||
}; | ||
|
||
public CustomAutoMovePOIConverter() | ||
{ | ||
AddDefinitions(_definitions); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
Winch/Serialization/POI/Conversation/CustomConversationPOI.cs
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,36 @@ | ||
using Cinemachine; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
namespace Winch.Serialization.POI.Conversation; | ||
|
||
public class CustomConversationPOI : CustomPOI | ||
{ | ||
[SerializeField] | ||
public bool isOneTimeOnly = true; | ||
|
||
[SerializeField] | ||
public bool releaseCameraOnComplete = true; | ||
|
||
[SerializeField] | ||
public string conversationNodeName = string.Empty; | ||
|
||
[SerializeField] | ||
public bool enabledByOtherNodeVisit; | ||
|
||
[SerializeField] | ||
public List<string> enableNodeNames = new List<string>(); | ||
|
||
[SerializeField] | ||
public bool shouldDisableOnOtherNodeVisit; | ||
|
||
[SerializeField] | ||
public List<string> otherNodeNames = new List<string>(); | ||
|
||
[SerializeField] | ||
public Vector3 vCam; | ||
} |
25 changes: 25 additions & 0 deletions
25
Winch/Serialization/POI/Conversation/CustomConversationPOIConverter.cs
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,25 @@ | ||
using Newtonsoft.Json.Linq; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
namespace Winch.Serialization.POI.Conversation; | ||
|
||
public class CustomConversationPOIConverter : CustomPOIConverter | ||
{ | ||
private readonly Dictionary<string, FieldDefinition> _definitions = new() | ||
{ | ||
{ "conversationNodeName", new( string.Empty, null) }, | ||
{ "enabledByOtherNodeVisit", new( false, o=>bool.Parse(o.ToString())) }, | ||
{ "enableNodeNames", new( new List<string>(), o=>DredgeTypeHelpers.ParseStringList((JArray)o)) }, | ||
{ "isOneTimeOnly", new( true, o=>bool.Parse(o.ToString())) }, | ||
{ "otherNodeNames", new( new List<string>(), o=>DredgeTypeHelpers.ParseStringList((JArray)o)) }, | ||
{ "releaseCameraOnComplete", new( true, o=>bool.Parse(o.ToString())) }, | ||
{ "shouldDisableOnOtherNodeVisit", new( false, o=>bool.Parse(o.ToString())) }, | ||
{ "vCam", new( Vector3.one, o=>DredgeTypeHelpers.ParseVector3(o)) }, | ||
}; | ||
|
||
public CustomConversationPOIConverter() | ||
{ | ||
AddDefinitions(_definitions); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
Winch/Serialization/POI/Conversation/CustomExplosivePOI.cs
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,15 @@ | ||
using Cinemachine; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
namespace Winch.Serialization.POI.Conversation; | ||
|
||
public class CustomExplosivePOI : CustomConversationPOI | ||
{ | ||
[SerializeField] | ||
public string explodeVibration; | ||
} |
13 changes: 7 additions & 6 deletions
13
.../POI/Conversation/AutoMovePOIConverter.cs → ...nversation/CustomExplosivePOIConverter.cs
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
Oops, something went wrong.