-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
569 additions
and
275 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
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
5 changes: 2 additions & 3 deletions
5
...Extensions/ServiceCollectionExtensions.cs → ...Extensions/ServiceCollectionExtensions.cs
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
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,6 @@ | ||
namespace GangsAPI; | ||
|
||
public interface IBehavior : IDisposable { | ||
void Start(); | ||
void IDisposable.Dispose() { } | ||
} |
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,81 +1,81 @@ | ||
namespace GangsAPI.Permissions; | ||
|
||
public interface IGangRank { | ||
string Name { get; } | ||
int Rank { get; } | ||
Permissions Perms { get; } | ||
|
||
[Flags] | ||
public enum Permissions { | ||
/// <summary> | ||
/// The member may invite others to the gang. | ||
/// The member may invite others to the gang. | ||
/// </summary> | ||
INVITE_OTHERS = 1 << 0, | ||
|
||
/// <summary> | ||
/// The member may kick others from the gang. | ||
/// The member may kick others from the gang. | ||
/// </summary> | ||
KICK_OTHERS = 1 << 1, | ||
|
||
/// <summary> | ||
/// The member may deposit money into the gang bank. | ||
/// This also allows the member to use their own personal | ||
/// funds to purchase perks for the gang. | ||
/// The member may deposit money into the gang bank. | ||
/// This also allows the member to use their own personal | ||
/// funds to purchase perks for the gang. | ||
/// </summary> | ||
BANK_DEPOSIT = 1 << 2, | ||
|
||
/// <summary> | ||
/// The member may withdraw money from the gang bank. | ||
/// This also allows the member to use the gang's funds | ||
/// to purchase perks for the gang. | ||
/// The member may withdraw money from the gang bank. | ||
/// This also allows the member to use the gang's funds | ||
/// to purchase perks for the gang. | ||
/// </summary> | ||
BANK_WITHDRAW = 1 << 3, | ||
|
||
/// <summary> | ||
/// The member may promote others, the maximum rank that | ||
/// they may promote to is determined by the rank system. | ||
/// The member may promote others, the maximum rank that | ||
/// they may promote to is determined by the rank system. | ||
/// </summary> | ||
PROMOTE_OTHERS = 1 << 4, | ||
|
||
/// <summary> | ||
/// The member may demote others. | ||
/// The member may demote others. | ||
/// </summary> | ||
DEMOTE_OTHERS = 1 << 5, | ||
|
||
/// <summary> | ||
/// The member may purchase perks for the gang. | ||
/// The member may purchase perks for the gang. | ||
/// </summary> | ||
PURCHASE_PERKS = 1 << 6, | ||
|
||
/// <summary> | ||
/// The member may manage or configure perks for the gang. | ||
/// The member may manage or configure perks for the gang. | ||
/// </summary> | ||
MANAGE_PERKS = 1 << 7, | ||
|
||
/// <summary> | ||
/// The member may manage the ranks of the gang, regardless | ||
/// of rank system, the member will not be able to manage | ||
/// their own rank. | ||
/// The member may manage the ranks of the gang, regardless | ||
/// of rank system, the member will not be able to manage | ||
/// their own rank. | ||
/// </summary> | ||
MANAGE_RANKS = 1 << 8, | ||
|
||
/// <summary> | ||
/// The member may create new ranks for the gang. | ||
/// All ranks created must not have a rank higher than | ||
/// the member's current rank. Depending on the rank system, | ||
/// these ranks may also be required to have a rank lower | ||
/// than the member's current rank. | ||
/// The member may create new ranks for the gang. | ||
/// All ranks created must not have a rank higher than | ||
/// the member's current rank. Depending on the rank system, | ||
/// these ranks may also be required to have a rank lower | ||
/// than the member's current rank. | ||
/// </summary> | ||
CREATE_RANKS = 1 << 9, | ||
|
||
/// <summary> | ||
/// The member has full access to all permissions. | ||
/// The member has full access to all permissions. | ||
/// </summary> | ||
ADMINISTRATOR = 1 << 10, | ||
|
||
/// <summary> | ||
/// The member is the owner of the gang, and can not be kicked. | ||
/// The member is the owner of the gang, and can not be kicked. | ||
/// </summary> | ||
OWNER = 1 << 11 | ||
} | ||
|
||
string Name { get; } | ||
int Rank { get; } | ||
Permissions Perms { get; } | ||
} |
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
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,8 @@ | ||
using GangsAPI.Struct.Stat; | ||
|
||
namespace GangsAPI.Services; | ||
|
||
public interface IGangStatManager { | ||
Task<IGangStat<V>?> GetForGang<V>(int key, string id); | ||
Task<bool> PushToGang<V>(int key, string id, V value); | ||
} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using GangsAPI.Struct.Stat; | ||
|
||
namespace GangsAPI.Services; | ||
|
||
public interface IPlayerStatManager { | ||
Task<IGangStat<V>?> GetForPlayer<V>(ulong key, string id); | ||
Task<bool> PushToPlayer<V>(ulong key, string id, V value); | ||
} |
Oops, something went wrong.