mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Better name for base prop class
This commit is contained in:
parent
c8bd63e5d5
commit
88f60f883c
@ -12,7 +12,7 @@ namespace NewHorizons.Builder.Props
|
||||
{
|
||||
public static class GeneralPropBuilder
|
||||
{
|
||||
public static GameObject MakeFromExisting(GameObject go, GameObject planetGO, Sector sector, PropModule.PositionedPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null)
|
||||
public static GameObject MakeFromExisting(GameObject go, GameObject planetGO, Sector sector, PropModule.GeneralPointPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(info.rename))
|
||||
{
|
||||
@ -38,7 +38,7 @@ namespace NewHorizons.Builder.Props
|
||||
|
||||
var pos = (Vector3)(info.position ?? defaultPosition ?? Vector3.zero);
|
||||
var rot = Quaternion.identity;
|
||||
if (info is PropModule.PositionedAndRotatedPropInfo rotInfo)
|
||||
if (info is PropModule.GeneralPropInfo rotInfo)
|
||||
{
|
||||
rot = rotInfo.rotation != null ? Quaternion.Euler(rotInfo.rotation) : Quaternion.identity;
|
||||
}
|
||||
@ -61,14 +61,14 @@ namespace NewHorizons.Builder.Props
|
||||
return go;
|
||||
}
|
||||
|
||||
public static GameObject MakeNew(string defaultName, GameObject planetGO, Sector sector, PropModule.PositionedPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null)
|
||||
public static GameObject MakeNew(string defaultName, GameObject planetGO, Sector sector, PropModule.GeneralPointPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null)
|
||||
{
|
||||
var go = new GameObject(defaultName);
|
||||
go.SetActive(false);
|
||||
return MakeFromExisting(go, planetGO, sector, info, alignToBody, normal, defaultPosition, defaultParentPath);
|
||||
}
|
||||
|
||||
public static GameObject MakeFromPrefab(GameObject prefab, string defaultName, GameObject planetGO, Sector sector, PropModule.PositionedPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null)
|
||||
public static GameObject MakeFromPrefab(GameObject prefab, string defaultName, GameObject planetGO, Sector sector, PropModule.GeneralPointPropInfo info, bool alignToBody = false, MVector3 normal = null, MVector3 defaultPosition = null, string defaultParentPath = null)
|
||||
{
|
||||
var go = prefab.InstantiateInactive();
|
||||
go.name = defaultName;
|
||||
|
||||
@ -78,7 +78,7 @@ namespace NewHorizons.External.Modules
|
||||
|
||||
|
||||
[JsonObject]
|
||||
public class BrambleNodeInfo : PropModule.PositionedAndRotatedPropInfo
|
||||
public class BrambleNodeInfo : PropModule.GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The physical scale of the node, as a multiplier of the original size.
|
||||
|
||||
34
NewHorizons/External/Modules/PropModule.cs
vendored
34
NewHorizons/External/Modules/PropModule.cs
vendored
@ -99,10 +99,10 @@ namespace NewHorizons.External.Modules
|
||||
[Obsolete("audioVolumes is deprecated. Use Volumes->audioVolumes instead.")] public VolumesModule.AudioVolumeInfo[] audioVolumes;
|
||||
|
||||
[JsonObject]
|
||||
public abstract class PositionedPropInfo
|
||||
public abstract class GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Position of the prop
|
||||
/// Position of the object
|
||||
/// </summary>
|
||||
public MVector3 position;
|
||||
|
||||
@ -123,10 +123,10 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public abstract class PositionedAndRotatedPropInfo : PositionedPropInfo
|
||||
public abstract class GeneralPropInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Rotation of the prop
|
||||
/// Rotation of the object
|
||||
/// </summary>
|
||||
public MVector3 rotation;
|
||||
}
|
||||
@ -196,7 +196,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class DetailInfo : PositionedAndRotatedPropInfo
|
||||
public class DetailInfo : GeneralPropInfo
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@ -265,7 +265,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class RaftInfo : PositionedPropInfo
|
||||
public class RaftInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Acceleration of the raft. Default acceleration is 5.
|
||||
@ -274,7 +274,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class GeyserInfo : PositionedPropInfo
|
||||
public class GeyserInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Vertical offset of the geyser. From 0, the bubbles start at a height of 10, the shaft at 67, and the spout at 97.5.
|
||||
@ -313,7 +313,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class TornadoInfo : PositionedPropInfo
|
||||
public class TornadoInfo : GeneralPointPropInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum TornadoType
|
||||
@ -375,7 +375,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class VolcanoInfo : PositionedPropInfo
|
||||
public class VolcanoInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The colour of the meteor's lava.
|
||||
@ -418,7 +418,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class DialogueInfo : PositionedPropInfo
|
||||
public class DialogueInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Prevents the dialogue from being created after a specific persistent condition is set. Useful for remote dialogue
|
||||
@ -486,7 +486,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class EntryLocationInfo : PositionedPropInfo
|
||||
public class EntryLocationInfo : GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether this location is cloaked
|
||||
@ -500,7 +500,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class NomaiTextInfo : PositionedPropInfo
|
||||
public class NomaiTextInfo : GeneralPointPropInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum NomaiTextType
|
||||
@ -616,7 +616,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class ProjectionInfo : PositionedAndRotatedPropInfo
|
||||
public class ProjectionInfo : GeneralPropInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum SlideShowType
|
||||
@ -783,7 +783,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class QuantumSocketInfo : PositionedAndRotatedPropInfo
|
||||
public class QuantumSocketInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether the socket will be placed relative to the group it belongs to. Overrides `isRelativeToParent`
|
||||
@ -824,7 +824,7 @@ namespace NewHorizons.External.Modules
|
||||
public StoneInfo[] stones;
|
||||
|
||||
[JsonObject]
|
||||
public class WhiteboardInfo : PositionedAndRotatedPropInfo
|
||||
public class WhiteboardInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The text for each stone
|
||||
@ -872,7 +872,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class PlatformInfo : PositionedAndRotatedPropInfo
|
||||
public class PlatformInfo : GeneralPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// A ship log fact to reveal when the platform is connected to.
|
||||
@ -891,7 +891,7 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
public class StoneInfo : PositionedAndRotatedPropInfo
|
||||
public class StoneInfo : GeneralPropInfo
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
2
NewHorizons/External/Modules/SignalModule.cs
vendored
2
NewHorizons/External/Modules/SignalModule.cs
vendored
@ -15,7 +15,7 @@ namespace NewHorizons.External.Modules
|
||||
public SignalInfo[] signals;
|
||||
|
||||
[JsonObject]
|
||||
public class SignalInfo : PropModule.PositionedPropInfo
|
||||
public class SignalInfo : PropModule.GeneralPointPropInfo
|
||||
{
|
||||
[Obsolete("audioClip is deprecated, please use audio instead")]
|
||||
public string audioClip;
|
||||
|
||||
@ -9,7 +9,7 @@ using Newtonsoft.Json.Converters;
|
||||
namespace NewHorizons.External.Modules.VariableSize
|
||||
{
|
||||
[JsonObject]
|
||||
public class SingularityModule : PropModule.PositionedAndRotatedPropInfo
|
||||
public class SingularityModule : PropModule.GeneralPropInfo
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum SingularityType
|
||||
|
||||
@ -117,7 +117,7 @@ namespace NewHorizons.External.Modules
|
||||
public LoadCreditsVolumeInfo[] creditsVolume;
|
||||
|
||||
[JsonObject]
|
||||
public class VolumeInfo : PropModule.PositionedPropInfo
|
||||
public class VolumeInfo : PropModule.GeneralPointPropInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// The radius of this volume.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user