mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-25 06:35:45 +00:00
Sector whitelist (#50)
* Sector whitelist * Revert everything but the whitelist * newline
This commit is contained in:
parent
9e0567358d
commit
9a51f77032
@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using QSB.Messaging;
|
||||
using UnityEngine;
|
||||
using System.Linq;
|
||||
|
||||
namespace QSB.TransformSync
|
||||
{
|
||||
@ -11,6 +12,23 @@ namespace QSB.TransformSync
|
||||
private Dictionary<uint, Transform> _playerSectors;
|
||||
private Sector[] _allSectors;
|
||||
private MessageHandler<SectorMessage> _sectorHandler;
|
||||
private readonly Sector.Name[] sectorWhitelist = new Sector.Name[]{
|
||||
Sector.Name.BrambleDimension,
|
||||
Sector.Name.BrittleHollow,
|
||||
Sector.Name.Comet,
|
||||
Sector.Name.DarkBramble,
|
||||
Sector.Name.EyeOfTheUniverse,
|
||||
Sector.Name.GiantsDeep,
|
||||
Sector.Name.HourglassTwin_A,
|
||||
Sector.Name.HourglassTwin_B,
|
||||
Sector.Name.OrbitalProbeCannon,
|
||||
Sector.Name.QuantumMoon,
|
||||
Sector.Name.SunStation,
|
||||
Sector.Name.TimberHearth,
|
||||
Sector.Name.TimberMoon,
|
||||
Sector.Name.VolcanicMoon,
|
||||
Sector.Name.WhiteHole
|
||||
};
|
||||
|
||||
private void Start()
|
||||
{
|
||||
@ -92,7 +110,7 @@ namespace QSB.TransformSync
|
||||
{
|
||||
private static void PreAddSector(Sector sector, DynamicOccupant ____occupantType)
|
||||
{
|
||||
if (sector.GetName() == Sector.Name.Unnamed || sector.GetName() == Sector.Name.Ship || sector.GetName() == Sector.Name.Sun || sector.GetName() == Sector.Name.HourglassTwins)
|
||||
if (!Instance.sectorWhitelist.Contains(sector.GetName()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user