Jailbreak
The classic Jail gamemode, ported to Counter-Strike 2.
Warning
This plugin is in active development and may cause server crashes or stability issues.
Status
- ⚙️ Server
- Stats/Analytics Sinks
- Error reporting
- Configuration system
- Note: Passable, but in a terrible state. Needs TLC.
- 👮 Guards
- Warden Selection
- Special Days
- Ratio Enforcement
- Bans/Punishments
- 🎃 Prisoners
- Last Request
- 🛕 Maps
- Custom Entities
- Custom I/O
- Warden/Guard/Prisoner Filters
Contributing
The jail plugin is currently in heavy development and all contributions are welcome! Please make sure all contributions use the dependency injection system, or ask to have your contribution ported if you don't know how.
Ports to DI containers that have more verbose scoping systems for round-based or game-based scoping are welcome.
Tip
Microsoft has some good documentation on dependency injection here: Overview, Using Dependency Injection, Dependency Injection Guidelines.
All event handlers should derive from IPluginBehavior and be registered using
IServiceCollection.AddPluginBehavior<T>. If your behavior also acts as a service,
make sure to use IServiceCollection.AddPluginBehavior<TInterface, T>. All IPluginBehavior objects
have their event handlers automatically registered.
Code style should follow .NET conventions (if you need help, make sure to check "enable edits from maintainers" and ask for a format)
Modding
Want to fork Jailbreak and add in your own custom behavior? No sweat! The jailbreak repository is designed to act as a submodule.
git submodule add https://github.com/edgegamers/Jailbreak
Once you have a dependency to Jailbreak.Public, you can add in whatever functionality
you want from the current plugin, and choose to add in your own handlers if you wish.
Don't forget to register them with the service container!
To boot your plugin, simply iterate over all services that inherit from IPluginBehavior,
as demonstrated in src/Jailbreak/Jailbreak.cs:
foreach (IPluginBehavior extension in _extensions)
{
// Register all event handlers on the extension object
RegisterAllAttributes(extension);
// Tell the extension to start it's magic
extension.Start(this);
}
Building
The jailbreak plugin automatically builds to build/Jailbreak when using dotnet publish src/Jailbreak/Jailbreak.csproj.
Please use SDK 8.0 or higher.
Note that only the src/Jailbreak project is intended to be built directly.
Using
Jailbreak requires Counter Strike Sharp. If you don't have that installed, follow the install instructions here.
Install the plugin like any other Counter Strike Sharp plugin: drop the Jailbreak folder into
game/csgo/addons/counterstrikesharp/plugins.