mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
TranslatorTextBuilder: dont do auto spiral if any property is specified
This commit is contained in:
parent
aa88285748
commit
ad704d9bf6
@ -522,14 +522,12 @@ namespace NewHorizons.Builder.Props.TranslatorText
|
||||
var arcInfo = info.arcInfo[j];
|
||||
var arc = arranger.spirals[j];
|
||||
|
||||
if (arcInfo.position != null) arc.transform.localPosition = new Vector3(arcInfo.position.x, arcInfo.position.y, 0);
|
||||
|
||||
if (arcInfo.zRotation != null) arc.transform.localRotation = Quaternion.Euler(0, 0, arcInfo.zRotation.Value);
|
||||
|
||||
if (arcInfo.mirror != null)
|
||||
if (arcInfo.position != null || arcInfo.zRotation != null || arcInfo.mirror != null)
|
||||
{
|
||||
if (arcInfo.mirror.Value) arc.transform.localScale = new Vector3(-1, 1, 1);
|
||||
else arc.transform.localScale = new Vector3(1, 1, 1);
|
||||
var pos = (Vector2)(arcInfo.position ?? Vector2.zero);
|
||||
arc.transform.localPosition = new Vector3(pos.x, pos.y, 0);
|
||||
arc.transform.localRotation = Quaternion.Euler(0, 0, arcInfo.zRotation.GetValueOrDefault());
|
||||
arc.transform.localScale = arcInfo.mirror.GetValueOrDefault() ? new Vector3(-1, 1, 1) : new Vector3(1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
22
NewHorizons/External/Modules/PropModule.cs
vendored
22
NewHorizons/External/Modules/PropModule.cs
vendored
@ -610,30 +610,30 @@ namespace NewHorizons.External.Modules
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Whether to flip the spiral from left-curling to right-curling or vice versa. If not specified, will use auto spiral generated value.
|
||||
/// The type of text to display.
|
||||
/// </summary>
|
||||
public bool? mirror;
|
||||
|
||||
[DefaultValue("adult")] public NomaiTextArcType type = NomaiTextArcType.Adult;
|
||||
|
||||
/// <summary>
|
||||
/// The local position of this object on the wall. If not specified, will use auto spiral generated value.
|
||||
/// The local position of this object on the wall. If specified, auto spiral will not touch this arc.
|
||||
/// </summary>
|
||||
public MVector2 position;
|
||||
|
||||
/// <summary>
|
||||
/// The type of text to display.
|
||||
/// The z euler angle for this arc. If specified, auto spiral will not touch this arc.
|
||||
/// </summary>
|
||||
[DefaultValue("adult")] public NomaiTextArcType type = NomaiTextArcType.Adult;
|
||||
[Range(0f, 360f)] public float? zRotation;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to flip the spiral from left-curling to right-curling or vice versa. If specified, auto spiral will not touch this arc.
|
||||
/// </summary>
|
||||
public bool? mirror;
|
||||
|
||||
/// <summary>
|
||||
/// Which variation of the chosen type to place. If not specified, a random variation will be selected based on the seed provided in the parent module.
|
||||
/// </summary>
|
||||
[Obsolete("only used in old nomai text")]
|
||||
[DefaultValue(-1)] public int variation = -1;
|
||||
|
||||
/// <summary>
|
||||
/// The z euler angle for this arc. If not specified, will use auto spiral generated value.
|
||||
/// </summary>
|
||||
[Range(0f, 360f)] public float? zRotation;
|
||||
}
|
||||
|
||||
[JsonObject]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user