forked from MrOkiDoki/BattleBit-Community-Server-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from caesarakalaeii/MrOkiDoki-main
update
- Loading branch information
Showing
20 changed files
with
2,915 additions
and
2,719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This workflow will build a .NET project | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | ||
|
||
name: .NET build | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
- name: Build | ||
run: dotnet build --no-restore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
using System.Numerics; | ||
|
||
namespace BattleBitAPI.Common; | ||
|
||
public struct OnPlayerKillArguments<TPlayer> where TPlayer : Player<TPlayer> | ||
namespace BattleBitAPI.Common | ||
{ | ||
public TPlayer Killer; | ||
public Vector3 KillerPosition; | ||
public struct OnPlayerKillArguments<TPlayer> where TPlayer : Player<TPlayer> | ||
{ | ||
public TPlayer Killer; | ||
public Vector3 KillerPosition; | ||
|
||
public TPlayer Victim; | ||
public Vector3 VictimPosition; | ||
public TPlayer Victim; | ||
public Vector3 VictimPosition; | ||
|
||
public string KillerTool; | ||
public PlayerBody BodyPart; | ||
public ReasonOfDamage SourceOfDamage; | ||
} | ||
public string KillerTool; | ||
public PlayerBody BodyPart; | ||
public ReasonOfDamage SourceOfDamage; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,46 @@ | ||
namespace BattleBitAPI.Server; | ||
|
||
public static class Const | ||
namespace CommunityServerAPI.BattleBitAPI | ||
{ | ||
// ---- Networking ---- | ||
/// <summary> | ||
/// Maximum data size for a single package. 4MB is default. | ||
/// </summary> | ||
public const int MaxNetworkPackageSize = 1024 * 1024 * 4; //4mb | ||
|
||
/// <summary> | ||
/// How long should server/client wait until connection is determined as timed out when no packages is being sent for | ||
/// long time. | ||
/// </summary> | ||
public const int NetworkTimeout = 60 * 1000; //60 seconds | ||
|
||
/// <summary> | ||
/// How frequently client/server will send keep alive to each other when no message is being sent to each other for a | ||
/// while. | ||
/// </summary> | ||
public const int NetworkKeepAlive = 5 * 1000; //15 seconds | ||
|
||
/// <summary> | ||
/// How long server/client will wait other side to send their hail/initial package. In miliseconds. | ||
/// </summary> | ||
public static class Const | ||
{ | ||
// ---- Networking ---- | ||
/// <summary> | ||
/// Maximum data size for a single package. 4MB is default. | ||
/// </summary> | ||
public const int MaxNetworkPackageSize = 1024 * 1024 * 4;//4mb | ||
/// <summary> | ||
/// How long should server/client wait until connection is determined as timed out when no packages is being sent for long time. | ||
/// </summary> | ||
public const int NetworkTimeout = 60 * 1000;//60 seconds | ||
/// <summary> | ||
/// How frequently client/server will send keep alive to each other when no message is being sent to each other for a while. | ||
/// </summary> | ||
public const int NetworkKeepAlive = 5 * 1000;//15 seconds | ||
/// <summary> | ||
/// How long server/client will wait other side to send their hail/initial package. In miliseconds. | ||
/// </summary> | ||
#if DEBUG | ||
public const int HailConnectTimeout = 20 * 1000; | ||
public const int HailConnectTimeout = 20 * 1000; | ||
#else | ||
public const int HailConnectTimeout = 2 * 1000; | ||
#endif | ||
|
||
// ---- Server Fields ---- | ||
public const int MinServerNameLength = 5; | ||
public const int MaxServerNameLength = 400; | ||
// ---- Server Fields ---- | ||
public const int MinServerNameLength = 5; | ||
public const int MaxServerNameLength = 400; | ||
|
||
public const int MaxTokenSize = 512; | ||
|
||
public const int MinGamemodeNameLength = 2; | ||
public const int MaxGamemodeNameLength = 12; | ||
|
||
public const int MinGamemodeNameLength = 2; | ||
public const int MaxGamemodeNameLength = 12; | ||
public const int MinMapNameLength = 2; | ||
public const int MaxMapNameLength = 36; | ||
|
||
public const int MinMapNameLength = 2; | ||
public const int MaxMapNameLength = 36; | ||
public const int MinLoadingScreenTextLength = 0; | ||
public const int MaxLoadingScreenTextLength = 1024 * 8; | ||
|
||
public const int MinLoadingScreenTextLength = 0; | ||
public const int MaxLoadingScreenTextLength = 1024 * 8; | ||
public const int MinServerRulesTextLength = 0; | ||
public const int MaxServerRulesTextLength = 1024 * 8; | ||
|
||
public const int MinServerRulesTextLength = 0; | ||
public const int MaxServerRulesTextLength = 1024 * 8; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.