-
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
81 changed files
with
1,002 additions
and
146 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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
[submodule "upstream/BattleBitAPI"] | ||
path = upstream/BattleBitAPI | ||
url = https://github.com/Mooshua/BattleBit-Community-Server-API/ | ||
branch = feat/gameserverstate | ||
[submodule "upstream/DotNetCorePlugins"] | ||
path = upstream/DotNetCorePlugins | ||
url = https://github.com/Mooshua/DotNetCorePlugins |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,11 @@ | ||
using Lilikoi.Attributes; | ||
using Lilikoi.Attributes.Typed; | ||
using Lilikoi.Context; | ||
|
||
namespace BitMod.Attributes.Injects; | ||
|
||
public class MetaAttribute : LkTypedInjectionAttribute<Mount> | ||
{ | ||
public override Mount Inject(Mount context) | ||
=> context; | ||
} |
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,45 @@ | ||
using BitMod.Attributes.Internal; | ||
using BitMod.Configuration.Model; | ||
using BitMod.Events.Config; | ||
using BitMod.Internal; | ||
using BitMod.Internal.Assemblers; | ||
using BitMod.Internal.Registries; | ||
using BitMod.Router; | ||
using BitMod.Router.Extensions; | ||
|
||
using Lilikoi.Attributes; | ||
using Lilikoi.Compiler.Public; | ||
|
||
namespace BitMod.Attributes.Targets; | ||
|
||
public class BitConfigUpdateAttribute : LkTargetAttribute | ||
{ | ||
private string _configFile; | ||
|
||
public BitConfigUpdateAttribute(string configFile) | ||
{ | ||
_configFile = configFile; | ||
} | ||
|
||
public override bool IsTargetable<TUserContext>() | ||
=> (typeof(RouterContext)).IsAssignableFrom(typeof(TUserContext)); | ||
|
||
public override void Target<TUserContext>(TUserContext context, LilikoiMutator mutator) | ||
=> Target(context as RouterContext, mutator); | ||
|
||
public void Target(RouterContext router, LilikoiMutator mutator) | ||
{ | ||
router.ConfigUpdated(mutator); | ||
|
||
// Add wildcards for common parameters | ||
mutator.Wildcard<IConfigObject>(new UnpackWildcardParameterAttribute(typeof(IConfigObject))); | ||
mutator.Wildcard<ConfigUpdatedEventArgs>(new UnpackWildcardParameterAttribute(typeof(ConfigUpdatedEventArgs))); | ||
|
||
|
||
// Proper async-await code handling | ||
mutator.Implicit(new AsyncAttribute()); | ||
|
||
// Store metadata so the command assembler can tell what kind of command we are. | ||
mutator.Store(new StringRouterDirectives(_configFile)); | ||
} | ||
} |
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
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,24 @@ | ||
using BitMod.Configuration.Model; | ||
using BitMod.Events.Base; | ||
|
||
namespace BitMod.Events.Config; | ||
|
||
public class ConfigUpdatedEventArgs : IBaseArgs | ||
{ | ||
public ConfigUpdatedEventArgs(string file, IConfigObject config) | ||
{ | ||
File = file; | ||
Config = config; | ||
} | ||
|
||
/// <summary> | ||
/// The name of the file (relative to /configs) that updated. | ||
/// </summary> | ||
public string File { get; } | ||
|
||
/// <summary> | ||
/// The updated copy of the config object. | ||
/// </summary> | ||
public IConfigObject Config { 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,25 @@ | ||
using BattleBitAPI.Common; | ||
|
||
using BitMod.Compatibility; | ||
using BitMod.Events.Accessors; | ||
using BitMod.Events.Base; | ||
|
||
namespace BitMod.Events.Player; | ||
|
||
public class PlayerChangingTeamEventArgs : IHookArgs, IResponsiblePlayerEvent | ||
{ | ||
public PlayerChangingTeamEventArgs(BitServer server, BitPlayer player, Team team) | ||
{ | ||
Server = server; | ||
Player = player; | ||
Team = team; | ||
} | ||
|
||
public BitPlayer Player { get; } | ||
|
||
public Team Team { get; } | ||
|
||
public BitServer Server { get; } | ||
|
||
public BitPlayer? ResponsiblePlayer => Player; | ||
} |
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,20 @@ | ||
using BitMod.Compatibility; | ||
using BitMod.Events.Accessors; | ||
using BitMod.Events.Base; | ||
|
||
namespace BitMod.Events.Player; | ||
|
||
public class PlayerGivenUpEventArgs : IEventArgs, IResponsiblePlayerEvent | ||
{ | ||
public PlayerGivenUpEventArgs(BitServer server, BitPlayer player) | ||
{ | ||
Player = player; | ||
Server = server; | ||
} | ||
|
||
public BitPlayer Player { get; } | ||
|
||
public BitServer Server { get; } | ||
|
||
public BitPlayer? ResponsiblePlayer => Player; | ||
} |
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
1 change: 0 additions & 1 deletion
1
api/BitMod/Events/Player/PlayerRequestingToChangeRoleEventArgs.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
Oops, something went wrong.