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;
|
2021-11-09 17:46:46 +00:00
|
|
|
|
using QSB.Tools.SignalscopeTool;
|
|
|
|
|
using QSB.Tools.TranslatorTool;
|
2021-11-12 10:06:51 +00:00
|
|
|
|
using QSB.Utility;
|
2020-07-27 23:13:43 +00:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2022-03-03 03:46:33 +00:00
|
|
|
|
namespace QSB.Tools;
|
|
|
|
|
|
|
|
|
|
public class PlayerToolsManager
|
2020-07-27 23:13:43 +00:00
|
|
|
|
{
|
2022-03-03 03:46:33 +00:00
|
|
|
|
public static void InitRemote(PlayerInfo player)
|
2022-02-25 06:04:54 +00:00
|
|
|
|
{
|
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));
|
|
|
|
|
}
|
2021-11-25 11:28:13 +00:00
|
|
|
|
|
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-02-27 12:40:44 +00:00
|
|
|
|
|
2022-03-03 03:46:33 +00:00
|
|
|
|
if (lightLOD != null)
|
|
|
|
|
{
|
|
|
|
|
Object.Destroy(lightLOD);
|
|
|
|
|
spot.GetLight().shadows = LightShadows.Soft;
|
2021-11-25 11:28:13 +00:00
|
|
|
|
}
|
2020-12-14 21:20:53 +00:00
|
|
|
|
}
|
2020-08-07 19:39:07 +00:00
|
|
|
|
}
|