-
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
44 changed files
with
739 additions
and
123 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
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,3 @@ | ||
namespace GangsAPI.Data.Stat; | ||
|
||
public interface IGangStat<T> : IStat<T> { } |
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,3 @@ | ||
namespace GangsAPI.Data.Stat; | ||
|
||
public interface IPlayerStat<T> : IStat<T> { } |
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 |
---|---|---|
@@ -1,8 +1,46 @@ | ||
using GangsAPI.Struct.Stat; | ||
using System.Collections; | ||
using GangsAPI.Data.Gang; | ||
using GangsAPI.Data.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); | ||
Task<bool> PushToGang<V>(int gangId, string id, V value); | ||
|
||
Task<IGangStat<V>?> GetForGang<V>(IGang gang, string id) { | ||
return GetForGang<V>(gang.GangId, id); | ||
} | ||
|
||
Task<bool> PushToGang<V>(IGang gang, string id, V value) { | ||
return PushToGang<V>(gang.GangId, id, value); | ||
} | ||
|
||
Task<IGangStat<V>?> GetForGang<V>(IGang gang, IStat stat, V value) { | ||
return GetForGang<V>(gang, stat.StatId); | ||
} | ||
|
||
Task<bool> PushToGang<V>(IGang gang, IStat stat, V value) { | ||
return PushToGang<V>(gang, stat.StatId, value); | ||
} | ||
|
||
Task<bool> PushToGang<V>(int gangId, IStat<V> stat) { | ||
return PushToGang<V>(gangId, stat.StatId, stat.Value); | ||
} | ||
|
||
Task<bool> PushToGang<V>(IGang gang, IStat<V> stat) { | ||
return PushToGang<V>(gang, stat.StatId, stat.Value); | ||
} | ||
|
||
Task<IGangStat<V>?> GetForGang<V>(int key, IStat stat, V value) { | ||
return GetForGang<V>(key, stat.StatId); | ||
} | ||
|
||
Task<bool> PushToGang<V>(int gangId, IStat stat, V value) { | ||
return PushToGang<V>(gangId, stat.StatId, value); | ||
} | ||
|
||
Task<IGangStat<V>?> GetForGang<V>(IGang gang, IStat stat) { | ||
return GetForGang<V>(gang, stat.StatId); | ||
} | ||
} |
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,8 +1,15 @@ | ||
using GangsAPI.Struct.Stat; | ||
using GangsAPI.Data.Gang; | ||
using GangsAPI.Data.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); | ||
Task<IPlayerStat<V>?> GetForPlayer<V>(ulong key, string statId); | ||
|
||
Task<bool> PushToPlayer<V>(ulong key, IPlayerStat<V> value) { | ||
return PushToPlayer(key, value.StatId, value.Value); | ||
} | ||
|
||
Task<bool> PushToPlayer<V>(ulong key, string statId, 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using GangsAPI.Struct.Stat; | ||
using GangsAPI.Data.Stat; | ||
|
||
namespace GangsAPI.Services; | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.