Skip to content

Commit

Permalink
Begin restructure for event firing
Browse files Browse the repository at this point in the history
  • Loading branch information
B3none committed Mar 5, 2024
1 parent ad4c496 commit 6b08141
Show file tree
Hide file tree
Showing 48 changed files with 53 additions and 14 deletions.
12 changes: 0 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# Rider IDE
/.idea
*.DotSettings.user

# Ignore obj directories in the root of each project
**/obj/

# Ignore NuGet cache in obj directories
**/obj/**/*.nuget.cache

# Ignore bin directories in the root of each project
**/bin/

# Ignore the SLN
cs2-retakes.sln
11 changes: 11 additions & 0 deletions Retakes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore obj directories in the root of each project
**/obj/

# Ignore NuGet cache in obj directories
**/obj/**/*.nuget.cache

# Ignore bin directories in the root of each project
**/bin/

# Ignore the SLN
cs2-retakes.sln
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions RetakesPlugin.csproj → Retakes/RetakesPlugin.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.178" />
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.188" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="8.0.2" />
</ItemGroup>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions RetakesEvents/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore obj directories in the root of each project
**/obj/

# Ignore NuGet cache in obj directories
**/obj/**/*.nuget.cache

# Ignore bin directories in the root of each project
**/bin/

# Ignore the SLN
cs2-retakes.sln
22 changes: 22 additions & 0 deletions RetakesEvents/IEventSender.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
namespace RetakesEvents.Contracts;

public interface IEventSender
{
event EventHandler<PluginEventArgs> PluginEventOccurred;

void CheckEventListeners();
void AddEventListener(EventHandler<PluginEventArgs> listener);
void TriggerEvent(string eventName, object eventData);
}

public class PluginEventArgs : EventArgs
{
public string EventName { get; }
public object EventData { get; }

public PluginEventArgs(string eventName, object eventData)
{
EventName = eventName;
EventData = eventData;
}
}
7 changes: 7 additions & 0 deletions RetakesEvents/RetakesEvents.Contracts.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

0 comments on commit 6b08141

Please sign in to comment.