Пример #1
0
    public static void AddDefaults(
        this ServerBuilder builder,
        ServerBuilderDefaultPacketHandlers exceptPacketHandlers = ServerBuilderDefaultPacketHandlers.None,
        ServerBuilderDefaultBehaviours exceptBehaviours         = ServerBuilderDefaultBehaviours.None,
        ServerBuilderDefaultServices exceptServices             = ServerBuilderDefaultServices.None,
        ServerBuilderDefaultMiddleware exceptMiddleware         = ServerBuilderDefaultMiddleware.None)
    {
        builder.AddDefaultPacketHandler(exceptPacketHandlers);
        builder.AddDefaultBehaviours(exceptBehaviours);
        builder.AddDefaultServices(exceptServices, exceptMiddleware);
        builder.AddDefaultLuaMappings();

        builder.AddResourceServer <BasicHttpServer>();

        builder.AddNetWrapper(
            Directory.GetCurrentDirectory(),
            "net",
            builder.Configuration.Host,
            builder.Configuration.Port,
            builder.Configuration.AntiCheat);
    }