mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Add "reveal for" option to enter reveal volumes (#446)
Can now choose whether the player, scout, or both can trigger the enter reveal volume. I have not tested this yet.
This commit is contained in:
commit
0ed5ae20f6
@ -76,6 +76,23 @@ namespace NewHorizons.Builder.ShipLog
|
|||||||
{
|
{
|
||||||
var factRevealVolume = go.AddComponent<ShipLogFactListTriggerVolume>();
|
var factRevealVolume = go.AddComponent<ShipLogFactListTriggerVolume>();
|
||||||
factRevealVolume._factIDs = info.reveals;
|
factRevealVolume._factIDs = info.reveals;
|
||||||
|
switch (info.revealFor)
|
||||||
|
{
|
||||||
|
case VolumesModule.RevealVolumeInfo.EnterType.Player:
|
||||||
|
factRevealVolume._player = true;
|
||||||
|
factRevealVolume._probe = false;
|
||||||
|
break;
|
||||||
|
case VolumesModule.RevealVolumeInfo.EnterType.Probe:
|
||||||
|
factRevealVolume._player = false;
|
||||||
|
factRevealVolume._probe = true;
|
||||||
|
break;
|
||||||
|
case VolumesModule.RevealVolumeInfo.EnterType.Both:
|
||||||
|
default:
|
||||||
|
// if you want both player and probe to able to trigger the thing you have to set both player and probe to false. setting both to true will make nothing trigger it
|
||||||
|
factRevealVolume._player = false;
|
||||||
|
factRevealVolume._probe = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(info.achievementID))
|
if (!string.IsNullOrEmpty(info.achievementID))
|
||||||
|
|||||||
15
NewHorizons/External/Modules/VolumesModule.cs
vendored
15
NewHorizons/External/Modules/VolumesModule.cs
vendored
@ -109,6 +109,16 @@ namespace NewHorizons.External.Modules
|
|||||||
[EnumMember(Value = @"snapshot")] Snapshot = 2
|
[EnumMember(Value = @"snapshot")] Snapshot = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
public enum EnterType
|
||||||
|
{
|
||||||
|
[EnumMember(Value = @"both")] Both = 0,
|
||||||
|
|
||||||
|
[EnumMember(Value = @"player")] Player = 1,
|
||||||
|
|
||||||
|
[EnumMember(Value = @"probe")] Probe = 2
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The max view angle (in degrees) the player can see the volume with to unlock the fact (`observe` only)
|
/// The max view angle (in degrees) the player can see the volume with to unlock the fact (`observe` only)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -124,6 +134,11 @@ namespace NewHorizons.External.Modules
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[DefaultValue("enter")] public RevealVolumeType revealOn = RevealVolumeType.Enter;
|
[DefaultValue("enter")] public RevealVolumeType revealOn = RevealVolumeType.Enter;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// What can enter the volume to unlock the facts (`enter` only)
|
||||||
|
/// </summary>
|
||||||
|
[DefaultValue("both")] public EnterType revealFor = EnterType.Both;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A list of facts to reveal
|
/// A list of facts to reveal
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -2838,6 +2838,11 @@
|
|||||||
"default": "enter",
|
"default": "enter",
|
||||||
"$ref": "#/definitions/RevealVolumeType"
|
"$ref": "#/definitions/RevealVolumeType"
|
||||||
},
|
},
|
||||||
|
"revealFor": {
|
||||||
|
"description": "What can enter the volume to unlock the facts (`enter` only)",
|
||||||
|
"default": "both",
|
||||||
|
"$ref": "#/definitions/EnterType"
|
||||||
|
},
|
||||||
"reveals": {
|
"reveals": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"description": "A list of facts to reveal",
|
"description": "A list of facts to reveal",
|
||||||
@ -2865,6 +2870,20 @@
|
|||||||
"snapshot"
|
"snapshot"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"EnterType": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "",
|
||||||
|
"x-enumNames": [
|
||||||
|
"Both",
|
||||||
|
"Player",
|
||||||
|
"Probe"
|
||||||
|
],
|
||||||
|
"enum": [
|
||||||
|
"both",
|
||||||
|
"player",
|
||||||
|
"probe"
|
||||||
|
]
|
||||||
|
},
|
||||||
"PriorityVolumeInfo": {
|
"PriorityVolumeInfo": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user