Skip to content

Conversation

@lukepolo
Copy link
Contributor

…amework genericity

This commit introduces a complete abstraction layer that:

  • Creates service interfaces (ICommandService, IConVarService, IGameStateService, etc.)
  • Implements concrete services that wrap Counter-Strike Sharp APIs
  • Refactors existing services to use these abstractions instead of direct API calls
  • Makes the framework generic and reusable across different game engines
  • Completes the GameStateService implementation with proper game state access methods

The changes allow swapping out different frameworks by implementing the same service interfaces while maintaining all existing functionality.

…amework genericity

This commit introduces a complete abstraction layer that:
- Creates service interfaces (ICommandService, IConVarService, IGameStateService, etc.)
- Implements concrete services that wrap Counter-Strike Sharp APIs
- Refactors existing services to use these abstractions instead of direct API calls
- Makes the framework generic and reusable across different game engines
- Completes the GameStateService implementation with proper game state access methods

The changes allow swapping out different frameworks by implementing the same service interfaces while maintaining all existing functionality.
Moved all Counter-Strike Sharp service abstractions from FiveStack.Services to FiveStack.CounterStrikeSharp.Services namespace to make them more modular and framework-agnostic. This allows for easier switching between frameworks in the future.

- Created new FiveStack.CounterStrikeSharp.Services namespace
- Moved all service interfaces and implementations to new namespace
- Updated service registration in FiveStackServiceCollection.cs
- Updated references in MatchManager.cs and GameServer.cs
- Added README.md explaining the new structure
{
public void CreateTimer(float time, Action callback, TimerFlags flags = TimerFlags.NONE)
{
new Timer(time, callback, flags);

public void CreateTimer(float time, Action<CCSPlayerController> callback, TimerFlags flags = TimerFlags.NONE)
{
new Timer(time, callback, flags);

public void CreateTimer(float time, Action<CCSPlayerController, string[]> callback, TimerFlags flags = TimerFlags.NONE)
{
new Timer(time, callback, flags);

public void CreateTimer(float time, Action<CCSPlayerController, string> callback, TimerFlags flags = TimerFlags.NONE)
{
new Timer(time, callback, flags);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants