From a0e461aece7cdf257aedc2c9118cda696534e352 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Thu, 19 May 2022 22:51:11 -0700 Subject: [PATCH] meteor scale --- NewHorizons/Builder/Props/VolcanoBuilder.cs | 2 ++ NewHorizons/External/Modules/PropModule.cs | 1 + NewHorizons/Schemas/body_schema.json | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/NewHorizons/Builder/Props/VolcanoBuilder.cs b/NewHorizons/Builder/Props/VolcanoBuilder.cs index aa24bc10..b4651697 100644 --- a/NewHorizons/Builder/Props/VolcanoBuilder.cs +++ b/NewHorizons/Builder/Props/VolcanoBuilder.cs @@ -45,6 +45,8 @@ namespace NewHorizons.Builder.Props } private static void FixMeteor(MeteorController meteor, PropModule.VolcanoInfo info) { + meteor.transform.localScale = Vector3.one * info.scale; + var mat = meteor.GetComponentInChildren().material; mat.SetColor("_Color", info.stoneTint == null ? defaultStoneTint : info.stoneTint.ToColor()); mat.SetColor("_EmissionColor", info.lavaTint == null ? defaultLavaTint : info.lavaTint.ToColor()); diff --git a/NewHorizons/External/Modules/PropModule.cs b/NewHorizons/External/Modules/PropModule.cs index 265d319c..23a33931 100644 --- a/NewHorizons/External/Modules/PropModule.cs +++ b/NewHorizons/External/Modules/PropModule.cs @@ -66,6 +66,7 @@ namespace NewHorizons.External.Modules public class VolcanoInfo { public MVector3 position = null; + public float scale = 1; public MColor stoneTint = null; public MColor lavaTint = null; public float minLaunchSpeed = 50f; diff --git a/NewHorizons/Schemas/body_schema.json b/NewHorizons/Schemas/body_schema.json index d2e433bf..445d1a5a 100644 --- a/NewHorizons/Schemas/body_schema.json +++ b/NewHorizons/Schemas/body_schema.json @@ -822,6 +822,11 @@ "$ref": "#/$defs/vector3", "description": "The position of this volcano." }, + "scale": { + "type": "number", + "description": "The scale of the meteors", + "default": 1 + }, "stoneTint": { "$ref": "#/$defs/color", "description": "The colour of the meteor's stone."