mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-11 15:40:46 +00:00
some fixes
This commit is contained in:
parent
efc1574a3a
commit
469f45b5ce
@ -2,6 +2,7 @@
|
||||
using OWML.ModHelper.Events;
|
||||
using QSB.Animation;
|
||||
using QSB.DeathSync;
|
||||
using QSB.ElevatorSync;
|
||||
using QSB.Events;
|
||||
using QSB.GeyserSync;
|
||||
using QSB.OrbSync;
|
||||
@ -151,6 +152,12 @@ namespace QSB
|
||||
}
|
||||
PlayerRegistry.PlayerList.ForEach(x => PlayerRegistry.PlayerList.Remove(x));
|
||||
|
||||
WorldRegistry.OrbSyncList.ForEach(x => Destroy(x));
|
||||
WorldRegistry.RemoveObjects<QSBOrbSlot>();
|
||||
WorldRegistry.RemoveObjects<QSBElevator>();
|
||||
WorldRegistry.RemoveObjects<QSBGeyser>();
|
||||
WorldRegistry.RemoveObjects<QSBSector>();
|
||||
|
||||
_lobby.CanEditName = true;
|
||||
}
|
||||
|
||||
@ -172,6 +179,13 @@ namespace QSB
|
||||
DebugLog.ToConsole("[S] Server stopped!", MessageType.Info);
|
||||
PlayerRegistry.PlayerList.ForEach(player => player.HudMarker?.Remove());
|
||||
NetworkServer.connections.ToList().ForEach(CleanupConnection);
|
||||
|
||||
WorldRegistry.OrbSyncList.ForEach(x => Destroy(x));
|
||||
WorldRegistry.RemoveObjects<QSBOrbSlot>();
|
||||
WorldRegistry.RemoveObjects<QSBElevator>();
|
||||
WorldRegistry.RemoveObjects<QSBGeyser>();
|
||||
WorldRegistry.RemoveObjects<QSBSector>();
|
||||
|
||||
base.OnStopServer();
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,11 @@ namespace QSB.WorldSync
|
||||
return GetObjects<T>().FirstOrDefault(x => x.ObjectId == id);
|
||||
}
|
||||
|
||||
public static void RemoveObjects<T>() where T : WorldObject
|
||||
{
|
||||
WorldObjects.RemoveAll(x => x.GetType() == typeof(T));
|
||||
}
|
||||
|
||||
public static void HandleSlotStateChange(NomaiInterfaceSlot slot, NomaiInterfaceOrb affectingOrb, bool state)
|
||||
{
|
||||
var qsbSlot = GetObjects<QSBOrbSlot>().First(x => x.InterfaceSlot == slot);
|
||||
|
@ -3,6 +3,6 @@
|
||||
"settings": {
|
||||
"defaultServerIP": "localhost",
|
||||
"port": 7777,
|
||||
"debugMode": true
|
||||
"debugMode": false
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user