mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Conditional check data structures
This commit is contained in:
parent
7697e5bb49
commit
678c1e13ea
@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using NewHorizons.External.Modules;
|
||||
using NewHorizons.External.Modules.Conditionals;
|
||||
using NewHorizons.External.SerializableData;
|
||||
using Newtonsoft.Json;
|
||||
using static NewHorizons.External.Modules.ShipLogModule;
|
||||
@ -155,6 +156,11 @@ namespace NewHorizons.External.Configs
|
||||
/// </summary>
|
||||
public CuriosityColorInfo[] curiosities;
|
||||
|
||||
/// <summary>
|
||||
/// A list of conditional checks to be performed while in this star system.
|
||||
/// </summary>
|
||||
public ConditionalCheckInfo[] conditionalChecks;
|
||||
|
||||
/// <summary>
|
||||
/// Extra data that may be used by extension mods
|
||||
/// </summary>
|
||||
|
||||
86
NewHorizons/External/Modules/Conditionals/ConditionalCheckInfo.cs
vendored
Normal file
86
NewHorizons/External/Modules/Conditionals/ConditionalCheckInfo.cs
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NewHorizons.External.Modules.Conditionals
|
||||
{
|
||||
[JsonObject]
|
||||
public class ConditionalCheckInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The conditions that must be met for the check to pass
|
||||
/// </summary>
|
||||
public ConditionalCheckConditionsInfo check;
|
||||
/// <summary>
|
||||
/// The effects of the check if it passes
|
||||
/// </summary>
|
||||
public ConditionalCheckEffectsInfo then;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ConditionalCheckConditionsInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The check will only pass if all of these dialogue conditions are set
|
||||
/// </summary>
|
||||
public string[] allConditionsSet;
|
||||
/// <summary>
|
||||
/// The check will only pass if any of these dialogue conditions are set
|
||||
/// </summary>
|
||||
public string[] anyConditionsSet;
|
||||
/// <summary>
|
||||
/// The check will only pass if all of these persistent conditions are set
|
||||
/// </summary>
|
||||
public string[] allPersistentConditionsSet;
|
||||
/// <summary>
|
||||
/// The check will only pass if any of these persistent conditions are set
|
||||
/// </summary>
|
||||
public string[] anyPersistentConditionsSet;
|
||||
/// <summary>
|
||||
/// The check will only pass if all of these ship log facts are revealed
|
||||
/// </summary>
|
||||
public string[] allFactsRevealed;
|
||||
/// <summary>
|
||||
/// The check will only pass if any of these ship log facts are revealed
|
||||
/// </summary>
|
||||
public string[] anyFactsRevealed;
|
||||
|
||||
/// <summary>
|
||||
/// If the check should pass only if the conditions are not met
|
||||
/// </summary>
|
||||
public bool invert;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ConditionalCheckEffectsInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The check will set these dialogue conditions if it passes
|
||||
/// </summary>
|
||||
public string[] setConditions;
|
||||
/// <summary>
|
||||
/// The check will unset these dialogue conditions if it passes
|
||||
/// </summary>
|
||||
public string[] unsetConditions;
|
||||
/// <summary>
|
||||
/// The check will set these persistent conditions if it passes
|
||||
/// </summary>
|
||||
public string[] setPersistentConditions;
|
||||
/// <summary>
|
||||
/// The check will unset these persistent conditions if it passes
|
||||
/// </summary>
|
||||
public string[] unsetPersistentConditions;
|
||||
/// <summary>
|
||||
/// The check will reveal these ship log facts if it passes
|
||||
/// </summary>
|
||||
public string[] revealFacts;
|
||||
|
||||
/// <summary>
|
||||
/// If the check should undo its effects if the conditions are not met anymore (unset the set conditions, etc.). Note: ship log facts cannot currently be unrevealed.
|
||||
/// </summary>
|
||||
public bool reversible;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user