Skip to content

Commit

Permalink
fixed Workstation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
GrafDimenzio committed Dec 14, 2020
1 parent 53ad518 commit de463e8
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions MoreWeapons/Handlers/Scp1499Handler.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
using System.Collections.Generic;
using Synapse;
using Synapse.Config;
using MEC;
using UnityEngine;

namespace MoreWeapons.Handlers
{
public class Scp1499Handler
{
private readonly SerializedMapPoint stationposition = new SerializedMapPoint("HCZ_049", -6.5f, 263.5f, 24f);

public Scp1499Handler()
{
Server.Get.ItemManager.RegisterCustomItem(new Synapse.Api.Items.CustomItemInformation
Expand All @@ -22,19 +19,12 @@ public Scp1499Handler()
Server.Get.Events.Player.PlayerPickUpItemEvent += OnPickup;
Server.Get.Events.Player.PlayerItemUseEvent += OnUse;
Server.Get.Events.Player.LoadComponentsEvent += OnLoad;
Server.Get.Events.Round.WaitingForPlayersEvent += OnWaiting;
Server.Get.Events.Player.PlayerSetClassEvent += OnSetClass;
}

private void OnSetClass(Synapse.Api.Events.SynapseEventArguments.PlayerSetClassEventArgs ev)
=> ev.Player.GetComponent<Scp1499PlayerScript>().IsInDimension = false;

private void OnWaiting()
{
var point = stationposition.Parse();
SynapseController.Server.Map.CreateWorkStation(point.Position,point.Room.GameObject.transform.rotation.eulerAngles,new Vector3(3f,3f,0.1f));
}

private void OnLoad(Synapse.Api.Events.SynapseEventArguments.LoadComponentEventArgs ev)
{
if (ev.Player.GetComponent<Scp1499PlayerScript>() == null)
Expand Down

0 comments on commit de463e8

Please sign in to comment.