meteor scale

This commit is contained in:
JohnCorby 2022-05-19 22:51:11 -07:00
parent 4d06292d5c
commit edbd2ee5a7
3 changed files with 8 additions and 0 deletions

View File

@ -45,6 +45,8 @@ namespace NewHorizons.Builder.Props
} }
private static void FixMeteor(MeteorController meteor, PropModule.VolcanoInfo info) private static void FixMeteor(MeteorController meteor, PropModule.VolcanoInfo info)
{ {
meteor.transform.localScale = Vector3.one * info.scale;
var mat = meteor.GetComponentInChildren<MeshRenderer>().material; var mat = meteor.GetComponentInChildren<MeshRenderer>().material;
mat.SetColor("_Color", info.stoneTint == null ? defaultStoneTint : info.stoneTint.ToColor()); mat.SetColor("_Color", info.stoneTint == null ? defaultStoneTint : info.stoneTint.ToColor());
mat.SetColor("_EmissionColor", info.lavaTint == null ? defaultLavaTint : info.lavaTint.ToColor()); mat.SetColor("_EmissionColor", info.lavaTint == null ? defaultLavaTint : info.lavaTint.ToColor());

View File

@ -66,6 +66,7 @@ namespace NewHorizons.External.Modules
public class VolcanoInfo public class VolcanoInfo
{ {
public MVector3 position = null; public MVector3 position = null;
public float scale = 1;
public MColor stoneTint = null; public MColor stoneTint = null;
public MColor lavaTint = null; public MColor lavaTint = null;
public float minLaunchSpeed = 50f; public float minLaunchSpeed = 50f;

View File

@ -822,6 +822,11 @@
"$ref": "#/$defs/vector3", "$ref": "#/$defs/vector3",
"description": "The position of this volcano." "description": "The position of this volcano."
}, },
"scale": {
"type": "number",
"description": "The scale of the meteors.",
"default": 1
},
"stoneTint": { "stoneTint": {
"$ref": "#/$defs/color", "$ref": "#/$defs/color",
"description": "The colour of the meteor's stone." "description": "The colour of the meteor's stone."