Skip to content

Commit

Permalink
refactor: Convert types to public from the application layer (#28)
Browse files Browse the repository at this point in the history
There is no benefit in keeping the types as “internal”. This modifier is usually most beneficial when working on open source libraries, in which case you do not want to expose internal library details.
This change also avoids this error: https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs0053
  • Loading branch information
MrDave1999 authored Aug 19, 2024
1 parent b15bcd5 commit 2f1c4ed
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Application/Players/Accounts/AccountComponent.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Accounts;

internal class AccountComponent : Component
public class AccountComponent : Component
{
public PlayerInfo PlayerInfo { get; }
public AccountStatus Status { get; }
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Players/Accounts/AccountStatus.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Accounts;

internal enum AccountStatus
public enum AccountStatus
{
LoggedIn,
Registered
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Players/Accounts/RoleCollection.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Accounts;

internal class RoleCollection
public class RoleCollection
{
private RoleCollection() { }
private static readonly RoleId[] s_roles = Enum.GetValues<RoleId>();
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Players/Ranks/IRank.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Ranks;

internal interface IRank
public interface IRank
{
RankId Id { get; }
string Name { get; }
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Players/Ranks/RankCollection.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Ranks;

internal class RankCollection
public class RankCollection
{
private static readonly Rank[] s_ranks =
[
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Players/Ranks/RankSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Ranks;

internal class RankSystem : ISystem
public class RankSystem : ISystem
{
[PlayerCommand("ranks")]
public void ShowRanks(Player player, IDialogService dialogService)
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Players/Weapons/GtaWeapons.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Weapons;

internal class GtaWeapons
public class GtaWeapons
{
private static readonly GtaWeapon[] s_weapons =
[
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Players/Weapons/IWeapon.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Weapons;

internal interface IWeapon
public interface IWeapon
{
const int UnlimitedAmmo = 99999999;
Weapon Id { get; }
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Players/Weapons/WeaponPack.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Weapons;

internal class WeaponPack : IEnumerable<IWeapon>
public class WeaponPack : IEnumerable<IWeapon>
{
private readonly List<IWeapon> _weapons =
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Weapons;

internal class WeaponSelectionComponent : Component
public class WeaponSelectionComponent : Component
{
public WeaponPack SelectedWeapons { get; } = new();
}
2 changes: 1 addition & 1 deletion src/Application/Players/Weapons/WeaponSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Players.Weapons;

internal class WeaponSystem : ISystem
public class WeaponSystem : ISystem
{
[Event]
public void OnPlayerConnect(Player player)
Expand Down
2 changes: 1 addition & 1 deletion src/Application/Teams/ClassSelectionComponent.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace CTF.Application.Teams;

internal class ClassSelectionComponent : Component
public class ClassSelectionComponent : Component
{
public bool IsInClassSelection { get; set; } = true;
}

0 comments on commit 2f1c4ed

Please sign in to comment.