mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Base prop info
That only has the parent path and rename
This commit is contained in:
parent
6a3473d291
commit
5a354e4bee
@ -24,7 +24,7 @@ namespace NewHorizons.Builder.Props
|
||||
// If a prop has set its parentPath and the parent cannot be found, add it to the next pass and try again later
|
||||
var nextPass = new List<Action>();
|
||||
|
||||
void MakeGeneralProp<T>(GameObject go, T prop, Action<T> builder) where T : GeneralPointPropInfo
|
||||
void MakeGeneralProp<T>(GameObject go, T prop, Action<T> builder) where T : BasePropInfo
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -43,7 +43,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
void MakeGeneralProps<T>(GameObject go, IEnumerable<T> props, Action<T> builder) where T : GeneralPointPropInfo
|
||||
void MakeGeneralProps<T>(GameObject go, IEnumerable<T> props, Action<T> builder) where T : BasePropInfo
|
||||
{
|
||||
if (props != null)
|
||||
{
|
||||
@ -167,7 +167,7 @@ namespace NewHorizons.Builder.Props
|
||||
}
|
||||
}
|
||||
|
||||
private static bool DoesParentExist(GameObject go, GeneralPointPropInfo prop)
|
||||
private static bool DoesParentExist(GameObject go, BasePropInfo prop)
|
||||
{
|
||||
if (string.IsNullOrEmpty(prop.parentPath))
|
||||
{
|
||||
|
||||
26
NewHorizons/External/Modules/GeneralPropInfo.cs
vendored
26
NewHorizons/External/Modules/GeneralPropInfo.cs
vendored
@ -5,27 +5,31 @@ using Newtonsoft.Json;
|
||||
namespace NewHorizons.External.Modules
|
||||
{
|
||||
[JsonObject]
|
||||
public abstract class GeneralPointPropInfo
|
||||
public abstract class BasePropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The relative path from the planet to the parent of this object. Optional (will default to the root sector).
|
||||
/// </summary>
|
||||
public string parentPath;
|
||||
|
||||
/// <summary>
|
||||
/// An optional rename of this object
|
||||
/// </summary>
|
||||
public string rename;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public abstract class GeneralPointPropInfo : BasePropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Position of the object
|
||||
/// </summary>
|
||||
public MVector3 position;
|
||||
|
||||
/// <summary>
|
||||
/// The relative path from the planet to the parent of this object. Optional (will default to the root sector).
|
||||
/// </summary>
|
||||
public string parentPath;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the positional and rotational coordinates are relative to parent instead of the root planet object.
|
||||
/// </summary>
|
||||
public bool isRelativeToParent;
|
||||
|
||||
/// <summary>
|
||||
/// An optional rename of this object
|
||||
/// </summary>
|
||||
public string rename;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user