diff --git a/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs b/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs index 2c096bd8..3c9ca9b0 100644 --- a/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs +++ b/NewHorizons/Builder/Props/TranslatorText/TranslatorTextBuilder.cs @@ -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); } } diff --git a/NewHorizons/External/Modules/PropModule.cs b/NewHorizons/External/Modules/PropModule.cs index 8ed805bd..78b12b35 100644 --- a/NewHorizons/External/Modules/PropModule.cs +++ b/NewHorizons/External/Modules/PropModule.cs @@ -610,30 +610,30 @@ namespace NewHorizons.External.Modules } /// - /// 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. /// - public bool? mirror; - + [DefaultValue("adult")] public NomaiTextArcType type = NomaiTextArcType.Adult; + /// - /// 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. /// public MVector2 position; /// - /// The type of text to display. + /// The z euler angle for this arc. If specified, auto spiral will not touch this arc. /// - [DefaultValue("adult")] public NomaiTextArcType type = NomaiTextArcType.Adult; + [Range(0f, 360f)] public float? zRotation; + + /// + /// Whether to flip the spiral from left-curling to right-curling or vice versa. If specified, auto spiral will not touch this arc. + /// + public bool? mirror; /// /// 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. /// [Obsolete("only used in old nomai text")] [DefaultValue(-1)] public int variation = -1; - - /// - /// The z euler angle for this arc. If not specified, will use auto spiral generated value. - /// - [Range(0f, 360f)] public float? zRotation; } [JsonObject]