refactoring: heap -> span
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>Game</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ragon\Ragon.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="NLog.config">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="config.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Source\Events" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
|
||||
<targets>
|
||||
<target name="logfile" xsi:type="File" fileName="logs/server-log-${shortdate}.log" layout="[${longdate}][${logger}][${level}] ${message} ${exception:format=ToString}" />
|
||||
<target name="logconsole" xsi:type="Console" layout="[${date}][${logger}][${level}] ${message} ${exception:format=ToString}"/>
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<logger name="*" minlevel="Trace" writeTo="logconsole" />
|
||||
<logger name="*" minlevel="Trace" writeTo="logfile" />
|
||||
</rules>
|
||||
</nlog>
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Game.Source;
|
||||
using NetStack.Serialization;
|
||||
using Ragon.Core;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var bootstrap = new Bootstrap();
|
||||
bootstrap.Configure(new GameFactory());
|
||||
|
||||
Console.Read();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Ragon.Core;
|
||||
|
||||
namespace Game.Source;
|
||||
|
||||
public class GameAuthorizer: AuthorizationManager
|
||||
{
|
||||
public override bool OnAuthorize(uint peerId, byte[] payload)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using Ragon.Core;
|
||||
|
||||
namespace Game.Source
|
||||
{
|
||||
public class GameFactory : PluginFactory
|
||||
{
|
||||
public string PluginName { get; set; } = "ExamplePlugin";
|
||||
public PluginBase CreatePlugin(string map) => new ExamplePlugin();
|
||||
public AuthorizationManager CreateManager() => new GameAuthorizer();
|
||||
}
|
||||
}
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
using NLog;
|
||||
using Ragon.Core;
|
||||
|
||||
namespace Game.Source
|
||||
{
|
||||
public class ExamplePlugin: PluginBase
|
||||
{
|
||||
private ILogger _logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
_logger.Info("Plugin started");
|
||||
}
|
||||
|
||||
public override void OnStop()
|
||||
{
|
||||
_logger.Info("Plugin stopped");
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"apiKey": "123",
|
||||
"server": {
|
||||
"port": 4444,
|
||||
"skipTimeout": 60
|
||||
},
|
||||
"blacklist": [
|
||||
"пидор",
|
||||
"сука",
|
||||
"хуидор",
|
||||
"хуй",
|
||||
"Hitler",
|
||||
"Гитлер",
|
||||
"Гей",
|
||||
"Админ",
|
||||
"admin",
|
||||
"падла",
|
||||
"уебок",
|
||||
"собака",
|
||||
"пидорас",
|
||||
"мразь",
|
||||
"ебасос",
|
||||
"еблан",
|
||||
"ебучий",
|
||||
"дрочь"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user