Removed NioTSO client and server

- NioTSO client isn't needed because we're using RayLib
- Added FreeSO's API server to handle most backend operations
This commit is contained in:
Tony Bark 2024-05-01 02:55:43 -04:00
parent f12ba1502b
commit 22191ce648
591 changed files with 53264 additions and 3362 deletions

View file

@ -0,0 +1,50 @@
using FSO.Server.Protocol.Gluon.Packets;
using System;
using System.Collections.Generic;
namespace FSO.Server.Protocol.Gluon
{
public class GluonPackets
{
public static Dictionary<ushort, Type> GLUON_PACKET_BY_TYPEID;
public static Type[] ELECTRON_PACKETS = new Type[] {
typeof(AdvertiseCapacity),
typeof(TransferClaim),
typeof(TransferClaimResponse),
typeof(RequestLotClientTermination),
typeof(ShardShutdownRequest),
typeof(ShardShutdownCompleteResponse),
typeof(HealthPing),
typeof(HealthPingResponse),
typeof(RequestTask),
typeof(RequestTaskResponse),
typeof(NotifyLotRoommateChange),
typeof(MatchmakerNotify),
typeof(CityNotify),
typeof(TuningChanged),
typeof(SendCityMail)
};
static GluonPackets()
{
GLUON_PACKET_BY_TYPEID = new Dictionary<ushort, Type>();
foreach (Type packetType in ELECTRON_PACKETS)
{
IGluonPacket packet = (IGluonPacket)Activator.CreateInstance(packetType);
GLUON_PACKET_BY_TYPEID.Add(packet.GetPacketType().GetPacketCode(), packetType);
}
}
public static Type GetByPacketCode(ushort code)
{
if (GLUON_PACKET_BY_TYPEID.ContainsKey(code))
{
return GLUON_PACKET_BY_TYPEID[code];
}
else
{
return null;
}
}
}
}