mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-11 00:52:19 +00:00
f3ec54f75c
* Add warp to vessel / insert core debug actions * Add debug mode config flag * Enable in-game switching of debug flag
46 lines
1.3 KiB
C#
46 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using UnityEngine;
|
|
|
|
namespace QSB
|
|
{
|
|
class DebugActions : MonoBehaviour
|
|
{
|
|
void GoToVessel()
|
|
{
|
|
var spawnPoint = GameObject.Find("Spawn_Vessel").GetComponent<SpawnPoint>();
|
|
|
|
OWRigidbody playerBody = Locator.GetPlayerBody();
|
|
playerBody.WarpToPositionRotation(spawnPoint.transform.position, spawnPoint.transform.rotation);
|
|
playerBody.SetVelocity(spawnPoint.GetPointVelocity());
|
|
}
|
|
|
|
void InsertWarpCore()
|
|
{
|
|
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);
|
|
}
|
|
|
|
void Update()
|
|
{
|
|
if (!QSB.DebugMode)
|
|
{
|
|
return;
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.Keypad1))
|
|
{
|
|
GoToVessel();
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.Keypad2))
|
|
{
|
|
InsertWarpCore();
|
|
}
|
|
}
|
|
}
|
|
}
|