2020-07-28 13:59:24 +00:00
|
|
|
|
using UnityEngine;
|
2020-03-14 20:42:43 +00:00
|
|
|
|
|
2020-07-30 20:27:14 +00:00
|
|
|
|
namespace QSB.Utility
|
2020-03-14 20:42:43 +00:00
|
|
|
|
{
|
2020-07-28 13:59:24 +00:00
|
|
|
|
public class DebugActions : MonoBehaviour
|
2020-03-14 20:42:43 +00:00
|
|
|
|
{
|
2020-07-28 13:59:24 +00:00
|
|
|
|
private void GoToVessel()
|
2020-03-14 20:42:43 +00:00
|
|
|
|
{
|
|
|
|
|
var spawnPoint = GameObject.Find("Spawn_Vessel").GetComponent<SpawnPoint>();
|
|
|
|
|
|
2020-07-28 13:59:24 +00:00
|
|
|
|
var playerBody = Locator.GetPlayerBody();
|
2020-03-14 20:42:43 +00:00
|
|
|
|
playerBody.WarpToPositionRotation(spawnPoint.transform.position, spawnPoint.transform.rotation);
|
|
|
|
|
playerBody.SetVelocity(spawnPoint.GetPointVelocity());
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-28 13:59:24 +00:00
|
|
|
|
private void InsertWarpCore()
|
2020-03-14 20:42:43 +00:00
|
|
|
|
{
|
|
|
|
|
var warpCore = GameObject.Find("Prefab_NOM_WarpCoreVessel").GetComponent<WarpCoreItem>();
|
|
|
|
|
var socket = GameObject.Find("Interactibles_VesselBridge").GetComponentInChildren<WarpCoreSocket>();
|
|
|
|
|
socket.PlaceIntoSocket(warpCore);
|
|
|
|
|
|
|
|
|
|
GetComponent<NomaiCoordinateInterface>().SetPillarRaised(true, true);
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-28 13:59:24 +00:00
|
|
|
|
private void Update()
|
2020-03-14 20:42:43 +00:00
|
|
|
|
{
|
|
|
|
|
if (!QSB.DebugMode)
|
|
|
|
|
{
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.Keypad1))
|
|
|
|
|
{
|
|
|
|
|
GoToVessel();
|
|
|
|
|
}
|
|
|
|
|
if (Input.GetKeyDown(KeyCode.Keypad2))
|
|
|
|
|
{
|
|
|
|
|
InsertWarpCore();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|