Compare commits
9
Commits
f946ebef1e
..
v1.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93badcb22d | ||
|
|
b14715e759 | ||
|
|
f93b78e5c1 | ||
|
|
e868d2116f | ||
|
|
4dc7d6b075 | ||
|
|
6f40e44224 | ||
|
|
291d0c3f07 | ||
|
|
e146eed3b2 | ||
|
|
3464e93aee |
No files matched your search
@@ -0,0 +1,51 @@
|
||||
name: Build and publish mistserver
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: alpine-linux
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET SDK
|
||||
run: apk add dotnet10-sdk
|
||||
|
||||
- name: Restore Dependencies
|
||||
run: dotnet restore ./MistoxServer
|
||||
|
||||
- name: Dotnet Publish
|
||||
run: dotnet publish ./MistoxServer --configuration Release --output ./publish --no-restore
|
||||
|
||||
- name: Archive Production Artifacts
|
||||
run: |
|
||||
cd ./publish
|
||||
zip -r ../mistserver-${{ github.ref_name }}.zip .
|
||||
cd ..
|
||||
|
||||
# 2. Publish directly to Gitea Releases
|
||||
- name: Create Gitea Release
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
# Automatically uses the tag string pushed (e.g., v1.2.3)
|
||||
name: "Release ${{ github.ref_name }}"
|
||||
|
||||
# Change this text to your desired version description (Supports Markdown)
|
||||
body: |
|
||||
## Mistserver Version ${{ github.ref_name }}
|
||||
Automated deployment build compiled on Alpine Linux.
|
||||
|
||||
### Changelog
|
||||
- Compiled via Gitea Actions
|
||||
- Run ID: ${{ github.run_id }}
|
||||
|
||||
# Target the zipped artifact we generated in step 1
|
||||
files: |
|
||||
mistserver-*.zip
|
||||
|
||||
# Uses Gitea's automatically injected repository token for authorization
|
||||
api_key: '${{ secrets.GITHUB_TOKEN }}'
|
||||
@@ -19,7 +19,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MistoxServer\MistServerModule.csproj" />
|
||||
<ProjectReference Include="..\MistoxServer\MistServer.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -9,7 +9,7 @@ namespace Mistox.Client {
|
||||
|
||||
public string UserName { get; set; } = ""; // The remote players UserName
|
||||
public bool WithinRange { get; set; } = true; // Is the user close enough?
|
||||
public Vector3 Position { get; set; } // The remote location of the player
|
||||
public Vector3 Position { get; set; } = new Vector3(0, 0, 0); // The remote location of the player
|
||||
|
||||
private IPEndPoint _remoteHost { get; set; } // The remote IP Address
|
||||
private readonly SemaphoreSlim _sendLock = new SemaphoreSlim(1, 1);
|
||||
|
||||
File renamed without changes.
@@ -9,18 +9,17 @@ namespace Mistox.Server {
|
||||
|
||||
public class MistoxServer {
|
||||
|
||||
public string ServerName { get; private set; } = ""; // The name of the server
|
||||
public int MaxClients { get; set; } = 10; // The max players per server
|
||||
public float ConnectionRange { get; set; } = 40; // InGame distance for valid conections
|
||||
public string ConnectionKey { get; set; } = ""; // The connection key for the server
|
||||
public int ConnectionTimeoutSeconds { get; set; } = 10; // If no reply in time kill the connection
|
||||
public bool Alive { get; set; } = true; // Is the server running
|
||||
public ConcurrentDictionary<string, ServerConnection> Connections; // All the active connections. key is username
|
||||
public string ServerName { get; private set; } = ""; // The name of the server
|
||||
public int MaxClients { get; set; } = 10; // The max players per server
|
||||
public float ConnectionRange { get; set; } = 40; // InGame distance for valid conections
|
||||
public string ConnectionKey { get; set; } = ""; // The connection key for the server
|
||||
public int ConnectionTimeoutSeconds { get; set; } = 10; // If no reply in time kill the connection
|
||||
public bool Alive { get; set; } = true; // Is the server running
|
||||
public ConcurrentDictionary<string, ServerConnection> Connections = new(); // All the active connections. key is username
|
||||
|
||||
private readonly ServerListener Listener; // The Connection Listener singleton
|
||||
private readonly ServerListener Listener; // The Connection Listener singleton
|
||||
|
||||
public MistoxServer(IPEndPoint ListenerAddress, string serverName) {
|
||||
Connections = new ConcurrentDictionary<string, ServerConnection>();
|
||||
ServerName = serverName;
|
||||
Listener = new ServerListener(ListenerAddress, this);
|
||||
Console.WriteLine( "The Server is initilized and waiting for clients to connect at port : " + ListenerAddress.Port );
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Mistox.Server {
|
||||
|
||||
public string UserName { get; set; } = ""; // The Players UserName
|
||||
public bool IsAuthenticated { get; set; } = false; // Has the player authenticated
|
||||
public Vector3 Position { get; set; } // The ingame position of the player
|
||||
public Vector3 Position { get; set; } = new Vector3(0, 0, 0); // The ingame position of the player
|
||||
public bool Connected { get; set; } = true; // Is the connection valid
|
||||
|
||||
private readonly MistoxServer _parent;
|
||||
|
||||
Reference in new issue
Block a user