quantum-space-buddies/QSB/Tools/PlayerToolsManager.cs

33 lines
992 B
C#
Raw Normal View History

2021-12-14 22:53:53 +00:00
using QSB.Player;
using QSB.Tools.FlashlightTool;
2021-07-26 21:55:09 +00:00
using QSB.Tools.ProbeLauncherTool;
using QSB.Tools.SignalscopeTool;
using QSB.Tools.TranslatorTool;
using QSB.Utility;
using UnityEngine;
2022-03-03 03:46:33 +00:00
namespace QSB.Tools;
public class PlayerToolsManager
{
2022-03-03 03:46:33 +00:00
public static void InitRemote(PlayerInfo player)
{
2022-03-03 03:46:33 +00:00
player.PlayerId.Try("creating flashlight", () => FlashlightCreator.CreateFlashlight(player));
player.PlayerId.Try("creating signalscope", () => SignalscopeCreator.CreateSignalscope(player));
player.PlayerId.Try("creating probe launcher", () => ProbeLauncherCreator.CreateProbeLauncher(player));
player.PlayerId.Try("creating translator", () => TranslatorCreator.CreateTranslator(player));
}
2022-03-03 03:46:33 +00:00
public static void InitLocal()
{
var flashlight = Locator.GetFlashlight();
var spot = flashlight._illuminationCheckLight;
var lightLOD = spot.GetComponent<LightLOD>();
2022-03-03 03:46:33 +00:00
if (lightLOD != null)
{
Object.Destroy(lightLOD);
spot.GetLight().shadows = LightShadows.Soft;
}
2020-12-14 21:20:53 +00:00
}
}