2021-12-14 22:53:53 +00:00
|
|
|
|
using QSB.Player;
|
|
|
|
|
using QSB.Tools.FlashlightTool;
|
2021-07-26 22:55:09 +01: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;
|
|
|
|
|
using System;
|
2020-07-28 00:13:43 +01:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
2020-07-30 22:27:14 +02:00
|
|
|
|
namespace QSB.Tools
|
2020-07-28 00:13:43 +01:00
|
|
|
|
{
|
2020-12-02 21:23:01 +00:00
|
|
|
|
public class PlayerToolsManager
|
|
|
|
|
{
|
2021-12-14 22:53:53 +00:00
|
|
|
|
public static void InitRemote(PlayerInfo player)
|
2020-12-02 21:23:01 +00:00
|
|
|
|
{
|
2022-02-02 11:58:00 +00:00
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
FlashlightCreator.CreateFlashlight(player);
|
|
|
|
|
SignalscopeCreator.CreateSignalscope(player);
|
|
|
|
|
ProbeLauncherCreator.CreateProbeLauncher(player);
|
|
|
|
|
TranslatorCreator.CreateTranslator(player);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
DebugLog.ToConsole($"Error when trying to create tools : {ex}", OWML.Common.MessageType.Error);
|
|
|
|
|
}
|
2020-12-02 21:23:01 +00:00
|
|
|
|
}
|
|
|
|
|
|
2021-11-25 11:28:13 +00:00
|
|
|
|
public static void InitLocal()
|
|
|
|
|
{
|
|
|
|
|
var flashlight = Locator.GetFlashlight();
|
|
|
|
|
var spot = flashlight._illuminationCheckLight;
|
|
|
|
|
var lightLOD = spot.GetComponent<LightLOD>();
|
|
|
|
|
|
|
|
|
|
if (lightLOD != null)
|
|
|
|
|
{
|
|
|
|
|
UnityEngine.Object.Destroy(lightLOD);
|
|
|
|
|
spot.GetLight().shadows = LightShadows.Soft;
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-12-14 21:20:53 +00:00
|
|
|
|
}
|
2020-08-07 20:39:07 +01:00
|
|
|
|
}
|