mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Renamed to new horizons, updated to current versions of OWML and Outer Wilds, added BlackHoleBuilder, LavaBuilder, RingBuilder. Added support to modify existing planets with configs.
23 lines
826 B
C#
23 lines
826 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
|
|
namespace NewHorizons.General
|
|
{
|
|
static class LavaBuilder
|
|
{
|
|
public static void Make(GameObject body, float lavaSize)
|
|
{
|
|
var lava = GameObject.Instantiate(GameObject.Find("VolcanicMoon_Body/MoltenCore_VM"), body.transform);
|
|
lava.transform.localPosition = Vector3.zero;
|
|
lava.transform.Find("LavaSphere").transform.localScale = Vector3.one * lavaSize;
|
|
lava.transform.Find("MoltenCore_Proxy/LavaSphere (1)").transform.localScale = Vector3.one * lavaSize;
|
|
// Destruction volume is broken
|
|
lava.transform.Find("DestructionVolume").GetComponent<SphereCollider>().radius = lavaSize;
|
|
}
|
|
}
|
|
}
|