Update CI, auto-adjust namespaces

This commit is contained in:
Mooshua 2023-08-13 00:22:13 -07:00
parent e9745348a3
commit 94fc8a025e
40 changed files with 77 additions and 58 deletions

View file

@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
framework-version: [ 'net6.0', 'net7.0' ] framework-version: [ 'netstandard2.1', 'net6.0', 'net7.0' ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -20,9 +20,9 @@ jobs:
with: with:
dotnet-version: '7.0.x' dotnet-version: '7.0.x'
dotnet-quality: 'ga' dotnet-quality: 'ga'
- name: Install dependencies - name: Install dependencies
run: dotnet restore run: dotnet restore
- name: Build for ${{ matrix.framework-version }} - name: Build for ${{ matrix.framework-version }}
run: dotnet build BattleBitAPI --framework ${{ matrix.framework-version }} --configuration Release --no-restore run: dotnet build BattleBitAPI --framework ${{ matrix.framework-version }} --configuration Release --no-restore

View file

@ -1,8 +1,9 @@
using BattleBitAPI; using BattleBitAPI.Common.Arguments;
using BattleBitAPI.Common; using BattleBitAPI.Common.Data;
using BattleBitAPI.Common.Enums;
using BattleBitAPI.Server; using BattleBitAPI.Server;
using System.Threading.Channels;
using System.Xml; namespace BattleBitAPI.Playground;
class Program class Program
{ {

View file

@ -2,11 +2,11 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFrameworks>netstandard2.1;net7.0;net6.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable> <Nullable>disable</Nullable>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks> <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<RootNamespace>CommunityServerAPI</RootNamespace> <RootNamespace>BattleBitAPI</RootNamespace>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> </PropertyGroup>

View file

@ -1,6 +1,8 @@
using System.Numerics; using System.Numerics;
namespace BattleBitAPI.Common using BattleBitAPI.Common.Enums;
namespace BattleBitAPI.Common.Arguments
{ {
public struct OnPlayerKillArguments<TPlayer> where TPlayer : Player<TPlayer> public struct OnPlayerKillArguments<TPlayer> where TPlayer : Player<TPlayer>
{ {

View file

@ -1,6 +1,9 @@
using System.Numerics; using System.Numerics;
namespace BattleBitAPI.Common using BattleBitAPI.Common.Data;
using BattleBitAPI.Common.Enums;
namespace BattleBitAPI.Common.Arguments
{ {
public struct OnPlayerSpawnArguments public struct OnPlayerSpawnArguments
{ {

View file

@ -1,4 +1,4 @@
namespace CommunityServerAPI.BattleBitAPI namespace BattleBitAPI.Common
{ {
public static class Const public static class Const
{ {

View file

@ -1,7 +1,6 @@
using BattleBitAPI.Common; using BattleBitAPI.Common.Enums;
using System;
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Data
{ {
public class Attachment : IEquatable<string>, IEquatable<Attachment> public class Attachment : IEquatable<string>, IEquatable<Attachment>
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Data
{ {
public class Gadget : IEquatable<string>, IEquatable<Gadget> public class Gadget : IEquatable<string>, IEquatable<Gadget>
{ {

View file

@ -1,6 +1,6 @@
using System.Reflection; using System.Reflection;
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Data
{ {
public static class Gadgets public static class Gadgets
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Data
{ {
public class Map : IEquatable<string>, IEquatable<Map> public class Map : IEquatable<string>, IEquatable<Map>
{ {

View file

@ -1,4 +1,7 @@
namespace BattleBitAPI.Common using BattleBitAPI.Common.Datasets;
using BattleBitAPI.Common.Enums;
namespace BattleBitAPI.Common.Data
{ {
public struct PlayerLoadout public struct PlayerLoadout
{ {

View file

@ -1,4 +1,6 @@
namespace BattleBitAPI.Common using BattleBitAPI.Common.Enums;
namespace BattleBitAPI.Common.Data
{ {
public class PlayerStats public class PlayerStats
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Data
{ {
public struct PlayerWearings public struct PlayerWearings
{ {

View file

@ -1,6 +1,6 @@
using System; using BattleBitAPI.Common.Enums;
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Data
{ {
public class Weapon : IEquatable<string>, IEquatable<Weapon> public class Weapon : IEquatable<string>, IEquatable<Weapon>
{ {

View file

@ -1,6 +1,9 @@
using System.Reflection; using System.Reflection;
namespace BattleBitAPI.Common using BattleBitAPI.Common.Data;
using BattleBitAPI.Common.Enums;
namespace BattleBitAPI.Common.Datasets
{ {
public static class Attachments public static class Attachments
{ {

View file

@ -1,7 +1,9 @@
using Microsoft.VisualBasic; using System.Reflection;
using System.Reflection;
namespace BattleBitAPI.Common using BattleBitAPI.Common.Data;
using BattleBitAPI.Common.Enums;
namespace BattleBitAPI.Common.Datasets
{ {
public static class Weapons public static class Weapons
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum AttachmentType public enum AttachmentType
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum ChatChannel public enum ChatChannel
{ {

View file

@ -1,10 +1,4 @@
using System; namespace BattleBitAPI.Common.Enums
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BattleBitAPI.Common
{ {
public enum ReasonOfDamage : byte public enum ReasonOfDamage : byte
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum GameRole public enum GameRole
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum GameState : byte public enum GameState : byte
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum MapDayNight : byte public enum MapDayNight : byte
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum MapSize : byte public enum MapSize : byte
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum PlayerBody : byte public enum PlayerBody : byte
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum PlayerSpawningPosition : byte public enum PlayerSpawningPosition : byte
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum PlayerStand : byte public enum PlayerStand : byte
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum ReportReason public enum ReportReason
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum Roles : ulong public enum Roles : ulong
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum Squads public enum Squads
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum Team : byte public enum Team : byte
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Common namespace BattleBitAPI.Common.Enums
{ {
public enum WeaponType : int public enum WeaponType : int
{ {

View file

@ -4,6 +4,9 @@ using BattleBitAPI.Server;
using System.Net; using System.Net;
using System.Numerics; using System.Numerics;
using BattleBitAPI.Common.Data;
using BattleBitAPI.Common.Enums;
namespace BattleBitAPI namespace BattleBitAPI
{ {
public class Player<TPlayer> where TPlayer : Player<TPlayer> public class Player<TPlayer> where TPlayer : Player<TPlayer>

View file

@ -4,9 +4,12 @@ using System.Net.Sockets;
using System.Numerics; using System.Numerics;
using System.Text; using System.Text;
using BattleBitAPI.Common; using BattleBitAPI.Common;
using BattleBitAPI.Common.Arguments;
using BattleBitAPI.Common.Data;
using BattleBitAPI.Common.Enums;
using BattleBitAPI.Common.Extentions; using BattleBitAPI.Common.Extentions;
using BattleBitAPI.Networking; using BattleBitAPI.Networking;
using CommunityServerAPI.BattleBitAPI; using BattleBitAPI.Server.Internal;
namespace BattleBitAPI.Server namespace BattleBitAPI.Server
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Server namespace BattleBitAPI.Server.Internal
{ {
public class GamemodeRotation<TPlayer> where TPlayer : Player<TPlayer> public class GamemodeRotation<TPlayer> where TPlayer : Player<TPlayer>
{ {

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Server namespace BattleBitAPI.Server.Internal
{ {
public class MapRotation<TPlayer> where TPlayer : Player<TPlayer> public class MapRotation<TPlayer> where TPlayer : Player<TPlayer>
{ {

View file

@ -1,6 +1,6 @@
using BattleBitAPI.Common; using BattleBitAPI.Common.Enums;
namespace BattleBitAPI.Server namespace BattleBitAPI.Server.Internal
{ {
public class RoundSettings<TPlayer> where TPlayer : Player<TPlayer> public class RoundSettings<TPlayer> where TPlayer : Player<TPlayer>
{ {
@ -32,12 +32,12 @@ namespace BattleBitAPI.Server
this.mResources.IsDirtyRoundSettings = true; this.mResources.IsDirtyRoundSettings = true;
} }
} }
public double MaxTickets public int MaxTickets
{ {
get => this.mResources._RoundSettings.MaxTickets; get => this.mResources._RoundSettings.PlayersToStart;
set set
{ {
this.mResources._RoundSettings.MaxTickets = value; this.mResources._RoundSettings.PlayersToStart = value;
this.mResources.IsDirtyRoundSettings = true; this.mResources.IsDirtyRoundSettings = true;
} }
} }

View file

@ -1,4 +1,4 @@
namespace BattleBitAPI.Server namespace BattleBitAPI.Server.Internal
{ {
public class ServerSettings<TPlayer> where TPlayer : Player<TPlayer> public class ServerSettings<TPlayer> where TPlayer : Player<TPlayer>
{ {

View file

@ -3,10 +3,12 @@ using System.Net.Security;
using System.Net.Sockets; using System.Net.Sockets;
using System.Numerics; using System.Numerics;
using BattleBitAPI.Common; using BattleBitAPI.Common;
using BattleBitAPI.Common.Arguments;
using BattleBitAPI.Common.Data;
using BattleBitAPI.Common.Enums;
using BattleBitAPI.Common.Extentions; using BattleBitAPI.Common.Extentions;
using BattleBitAPI.Common.Serialization; using BattleBitAPI.Common.Serialization;
using BattleBitAPI.Networking; using BattleBitAPI.Networking;
using CommunityServerAPI.BattleBitAPI;
namespace BattleBitAPI.Server namespace BattleBitAPI.Server
{ {

View file

@ -1,4 +1,5 @@
using BattleBitAPI.Common; using BattleBitAPI.Common;
using BattleBitAPI.Common.Data;
namespace BattleBitAPI.Storage namespace BattleBitAPI.Storage
{ {

View file

@ -1,4 +1,5 @@
using BattleBitAPI.Common; using BattleBitAPI.Common;
using BattleBitAPI.Common.Data;
namespace BattleBitAPI.Storage namespace BattleBitAPI.Storage
{ {