Code Monkey home page Code Monkey logo

jailbreak's Introduction

EdgeGamers Jailbreak

Discord

The classic Jail gamemode, ported to Counter-Strike 2.

Downloads

Release⠀⠀ Stable⠀⠀ Dev

Release builds are our full releases. We try to keep these high-quality and bug-free, when we can. Our Stable builds run on EdgeGamers' own Jailbreak servers. Our Nightly builds are used exclusively for development and staging, and are likely to have problems.

Versioning

Our release tags starting from 'v2.0.0' follow the Semantic Versioning 2.0.0 standard, where MAJOR.MINOR.PATCH are incremented based on the following:

  • MAJOR when we make incompatible API changes,
  • MINOR when we add functionality in a backwards-compatible manner.
  • PATCH when we make backwards-compatible bug fixes.

Status

  • ⚙️ Server
    • Stats/Analytics Sinks
    • Error reporting
    • Configuration system
      • Note: Passable, but in a terrible state. Needs TLC.
    • Logging
  • 👮 Guards
    • Warden Selection
    • Warden Laser and Paint
    • Special Days
    • Ratio Enforcement
    • Bans/Punishments
  • 🎃 Prisoners
    • Last Request
    • Rebel System
  • 🛕 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.

jailbreak's People

Contributors

msws avatar jithatsonei avatar mooshua avatar p250 avatar shookeagle avatar ntm5 avatar cactusjoan avatar sklekng avatar dependabot[bot] avatar

Stargazers

TYGX avatar  avatar guugugu avatar  avatar Mattia avatar  avatar Dollan avatar Andrew Barnes avatar Jam avatar Euan M avatar  avatar Tomas avatar  avatar  avatar  avatar cristóbal avatar  avatar  avatar  avatar Michael Loftus avatar

jailbreak's Issues

Timeleft

The timeleft command is not working. Should show how much time is left in map.

Listener of type T is invalid and does not have a name attribute (Parameter 'T')

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.ArgumentException: Listener of type T is invalid and does not have a name attribute (Parameter 'T')
   at CounterStrikeSharp.API.Core.BasePlugin.RemoveListener[T](T handler) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/BasePlugin.cs:line 318
   at Jailbreak.LastRequest.LastRequests.NoScope.OnEnd(LRResult result) in /home/runner/work/Jailbreak/Jailbreak/mod/Jailbreak.LastRequest/LastRequests/NoScope.cs:line 67
   at Jailbreak.LastRequest.LastRequestManager.EndLastRequest(AbstractLastRequest lr, LRResult result) in /home/runner/work/Jailbreak/Jailbreak/mod/Jailbreak.LastRequest/LastRequestManager.cs:line 104
   at Jailbreak.LastRequest.LastRequestManager.OnRoundEnd(EventRoundEnd event, GameEventInfo info) in /home/runner/work/Jailbreak/Jailbreak/mod/Jailbreak.LastRequest/LastRequestManager.cs:line 119
   at InvokeStub_GameEventHandler`1.Invoke(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   --- End of inner exception stack trace ---
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at CounterStrikeSharp.API.Core.FunctionReference.<CreateWrappedCallback>b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 100

Warden can call a special day after passing

Brief

A CT can claim warden, open the special day menu, pass warden, and still call a special day.

Reproduction

  1. Get at least two players on CT
  2. Have both players spawn in on a normal round
  3. Have one player (A) take warden (css_w)
  4. A should now open the special day menu (css_sd)
  5. A should now pass warden (css_pass)
  6. A is no longer warden. Have the other CT (B) take warden
  7. A still has the special day menu open. They can fully execute and start a special day, despite no longer being warden.

Server Messages

We should add messages that pop up in chat giving the link to our server rules, discord, how to get an E tag, and website.

This would hopefully bring more traffic to our discord and make players more aware of the rules.

In a warday all players get Tped to the same spot

In a warday all players get Tped to the same spot.
This is an issue since the CTs get stuck, one smoke can cover all Ts, and the knife noise is very loud
In a FFA day all players go to different CT spawns which is good

Tidy up C4 messages

  • Remove the "[player] has detonated!"
  • Remove the "You can drop the ..."
  • Make all messages grey, remove all "!" unless it's actually an important message.

Ability to spectate player with command

The css_watch command should only work for Spectators (potentially only admins??), and it should move the Spectator's POV to the specified player. The bug in GO where you couldn't spectate all players simply by cycling players also exists in CS2...

Coinflip

  • The "you failed to choose in time" sometimes prints even after the guard picked
  • The guard is only given the heads option, he cannot pick tails
  • The result of the LR shows the opposite of what should be happening, if guard picked heads, and it lands on tails, it says the guard won.

Warden Health is being applied to all wardens

Brief

Currently, all wardens upon assignment are being set to 125 armor and health. Ideally, this (both armor and health buffs) should be configurable to be limited to the first warden, or all wardens (as it currently is).

Reproduction

  • This bug can be reproduced reliably
  1. Join the server
  2. Join guard (/g)
  3. Force the round to end (mp_restartround 1)
  4. Take warden (/w) - You will gain HP/Armor buffs
  5. Pass warden (/pass) - Your HP/Armor buffs will be removed
  6. After 15 seconds, take warden again (/w) - You will gain HP/Armor buffs again [Should be configurable]

CT Bans say expired well after being force removed

Brief

If I CT ban someone, then unctban them, after the time passes that I originally banned them for it will say "user has been un CT banned" even tho I unctbanned them long ago.

Reproduction

CT ban the user for 15 minutes
UnCT Ban the user
15 Minutes later it will say they have been unCT banned.

[Bug] test

Brief

(Your Brief Here)

Reproduction

  • This bug can be reproduced reliably
  • This bug can be reproduced sometimes
  • This bug is completely random
  • I don't know how to reproduce it
  1. Your...
  2. Steps...
  3. Here...

Additional Information

[Tracking] 2.0.0 Smoke Testing

  • Last Guard
    • Activation
    • Messages
    • HP
    • Edge Cases
  • Last Requests
    • Coinflip
    • GunToss
    • KnifeFight
    • NoScope
    • Race
    • RPS
  • Debug
  • Rebelling [Turning Red]
  • Bomb
    • Rebelling (related to above)
    • Logs
    • Death
    • HP Updates
  • Logs
    • Log Roles
    • Log Actions
    • Weapon Pickups
  • Warden
    • Buffs
    • Markers
    • Paint
    • Commands
      • /w
      • /pass
      • /fire
      • /roll
      • /peace

[Bug] Spawn in armory / Join guard team without queue

Brief

As the title says you can spawn in the armory as a terrorist.

Reproduction

  • This bug can be reproduced reliably
    When a new round begins you go onto the Choose Teams menu and press "Choose Automatically". Afterward, you will be put in the armory. Tested on two different maps and it worked on both.

If it is done later into the round you will be put in the guard team effectively skipping the whole queue.

Additional Information

https://medal.tv/games/counter-strike-2/clips/1XJUPtTkcQEF0F/d1337uwjYGBX?invite=cr-MSx3NWssMjE3NjIzMTU5LA

[Bug] Team switcher menu does not properly handle CT -> T team switches

Brief

Counter-Terrorists can switch to Terrorist without being teleported to a terrorist spawn

Reproduction

  • This bug can be reproduced reliably
  • This bug can be reproduced sometimes
  • This bug is completely random
  • I don't know how to reproduce it
  1. Become a counter-terorrist (!guard)
  2. Switch to terrorist using the team selection menu (m key)
  3. You are now a terrorist with a CT skin in the same location.

Additional Information

https://www.edgegamers.com/threads/391659/

This is a regression since March 23rd. My march 23rd build of Jailbreak does not have this problem, but latest main branch does.

AFK Manager

Add a server "AFK Manager" that automatically moves an afk player to spectate if they have been away for X amount of time.

Last Guard

If the round started with 4 or more CTs, and the round has been trimmed down to only one CT alive, then Last Guard should be initiated. Last Guard implies that the warden (and CTs) has failed to maintain control of the prisoners, and thus the "last guard" is tasked with killing the remaining prisoners, down to enough to LR (2 remaining).

The moment the second to last CT dies (meaning there is only one left alive):

  • The CT should be given a health bonus relative to the remaining health of all other prisoners.
  • An announcement should be made in chat that Last Guard has activated.
  • The round time should be set to a dynamic time depending on the number of remaining prisoners alive.

Once the Last Guard has killed all the Ts down to two, Last Request (LR) should begin as normal.
If the Last Guard dies, the round should end as a T win.

Special Days

A special day is a day that the warden can initiate in the beginning 30 seconds of the round (not of becoming warden). Each special day should automatically handle the logic and work independently of other special days.

Commands:
css_sd - (Warden Only) - Displays the list of special days and begins a special day.

Generic Behavior:

  • Upon calling, all players are frozen for a minimum of 3 seconds
  • The type of special day should be broadcasted in chat
  • There must be a minimum of 3 rounds between any special days, but each day can have a longer cooldown between the same day being called.

For example, if SD A, B, and C have respective cooldowns of 3, 5, 9, then assuming R represents a regular day...

Valid day rotations:

  • 3 Regular, 1 B, 3 Regular, 1 C, 3 Regular, 1 A
  • 3 Regular, 1 C, 3 Regular, 1 B, 3 Regular, 1 A
  • 3 Regular, 1 A, 3 Regular, 1 C

Invalid day rotations:

  • 3 Regular, 1 B, 2 Regular, 1 A [There were only 2 rounds from the last special day]
  • 2 Regular, 1 A [There were only 2 rounds from the map beginning]
  • 3 Regular, 1 B, 3 Regular, 1 B [The B Special Day required 5 rounds between it]

List of possible special days:

  • Freeday (5:00) | 3 Round Cooldown
    • All prisoners and guards are allowed to roam freely.
    • Cell doors should open automatically.
  • Free for All (4:00)
    • All teams are ignored
    • All players are teleported into armory and frozen for 5 seconds
      • During this freeze time, the warden is expected to give a quick announcement
      • During this freeze time, all players should be invulnerable
  • Warday (4:30)
    • All players are teleported into armory
    • CTs are frozen for 3 seconds
    • Prisoners are frozen for 30 seconds

VC Mute

When admins mute other players it should be removed once a new round begins but its not happening and we have to keep unmuting them.
There should also be a notification that says they're muted like they're rebelling but says they're muted when attempting to speak or just have it saying they're muted the entire time and not flashing(idk thats another idea)

muting dead/alive people works now so is it possible to make it when someone dies they're muted automatically but it doesnt spam chat?

with peace soonTM i feel like something should be like this?

Barebones LR Testing

LR System

Implemented LRs

  • Knife Fight
  • Gun Toss
  • No Scope
  • Rock Paper Scissors
  • Coinflip
  • Shot for Shot

LR Checklist

  • Ensure !lr can only be ran when there are 2 or fewer prisoners alive
  • Ensure !lr can be ran if the round begins with only 2 or fewer prisoners alive
  • Ensure !lr can only be ran by
    • Alive
    • Prisoners
    • Who are not already in an LR
  • Ensure !lr opens up the corresponding menu(s)
    • !lr should open up an LR menu
    • !lr [LR] should open up a player selection menu
    • Selecting an LR in the LR menu should open up the player selection menu
    • Doing !lr [LR] [Player] should not open up any menus
  • Ensure the knife LR shows up in the menu
  • Ensure the menu works properly
    • Upon selecting the knife LR, the menu should show the player menu
    • Upon selecting a player, the LR should begin
  • Ensure the LR works properly
    • Upon start, both players (the prisoner and selected guard) are stripped of weapons
    • After a small delay (3 seconds), both players are given a knife
    • Upon death of CT, the prisoner can run !lr again
    • Upon death of T, nothing should happen (the T should of course be dead), and the CT should be !lr -able again

Warden Sounds

When a new warden is assigned, or an active warden dies, there should be a very obvious sound indicating so.

Will likely have to trudge through CS2's existing built-in sounds to find one that will work for everyone.

Warden Health and Armor

The first warden should be given 125 HP and 125 armor.

Subsequent warden should not be given this boost.

If the warden passes or is fired, their HP and armor should be decreased to 100 HP and 0 armor. If their HP is already lower than 100 HP, no action should be taken.

MFK ban command

We need /mfk back on the server if possible its really helpful back in GO cause we need to use it asap true menu options are weirder now but still basic functions exist. instead of making it an actual menu for the first half can it be /mfk <user|userid>, then it swaps em to Spec until we can confirm we want to ban them for MFK by hopefully doing /mfk <user|userid> confirm. if its possible then yay if not the menu options can be brought in.

Warden (peace) mute timings are swapped

The timings for when a warden is initially taken (first warden of the round) vs when a warden is taking later in a round (due to a warden dying, and a new CT doing css_w) are swapped.

Warden Menu using Movement

Open the Warden Menu with the !w command
Insert Warden Menu into this HTML Menu (it's open source)
Video
Source

Warden Menu

1.Freeday

You will choose player (Hint in chat: NameOfPlayer has a free day) + (give him green color)

2.Special Days

1.Freeday (5:00) | 3 Round Cooldown
All prisoners and guards are allowed to roam freely.
Cell doors should open automatically.
Hint in chat: Freeday has begun!!

2. Free for All (4:00)
All teams are ignored
All players are teleported into armory and frozen for 5 seconds
During this freeze time, the warden is expected to give a quick announcement
During this freeze time, all players should be invulnerable
Hint in chat: Free for All has begun!!

3. Warday (4:30)
All players are teleported into armory
CTs are frozen for 3 seconds
Prisoners are frozen for 30 seconds
Hint in chat: Warday has begun!!

**4. Hide and seek (7) **
Cell doors should open automatically.
CTs are frozen for 40 seconds and have a black screen.
Hint in chat: Hide and seek has begun!!

3. Noblock

Turn On / Turn Off

4. Paints

Paints Tplayer certain colour of choosing (!purple !blue)

5. Pardon

Give pardon to a rebel

Guard Queue Priority

Summary

  • Players should be given a "priority" for becoming CT.
  • Priority should be counted by time spent alive.
  • A minimum priority should be required before queuing for CT.

Details

The idea of priority is rewarding long-term players that have more experience and time on the servers by giving them a higher priority when queuing for CT.

By default, players should have 0 (minutes of) priority. Every minute spent alive by that player should increase their priority, up to a configurable maximum priority.

Players queuing for priority should be ordered by priority, from greatest to least.
Eg: Suppose the current queue is this:

  1. A (100 priority)
  2. B (96 priority)
  3. C (5 priority)

If Player D with 70 priority wanted to join the queue, it should knock down player C, as 70 > 5.
Thus, the new queue should be:

  1. A (100 priority)
  2. B (96 priority)
  3. D (70 priority)
  4. C (5 priority)

Additionally, there should be a configurable minimum priority required to even queue for CT.

There should be two commands:
css_priority <player> - If the player is an admin, the admin may specify a target to view their priority. Otherwise, this command should simply tell you what your priority is (and out of what the maximum is).
css_setpriority [player] [priority - If the player is an admin, this command should set someone's priority.

Impact

A benefit of having a minimum priority is reducing the number of players joining CT, MFKing, and leaving.
It also encourages players play the game and understand how to play CT (by observing existing CTs) before joining CT.

Warden Menu

/menu doesnt work for wardens. Should give them options of what to do like turn off running into people.

Translate

Hello!
Please put the translations in a separate file.
My server is not English-speaking and I would like to translate everything into my own language.

Mute System

  • The warden should be able to temporarily mute players using a css_peace command.
  • At round start, all prisoners should be muted.
  • When the first warden is assigned, all players (except the warden) should be muted for 10 seconds.
  • Depending on the # of prisoners, prisoners should be unmuted after 60 - 90 seconds.
  • No matter what, dead players should never be able to talk.
  • (Optional): Admins should be able to talk over peace, silences, and dead mutes.

Add Bomb/C4 rebel device

The bomb that T's receive should be able to be used by pressing "+use" with the bomb out. The bomb should make an indicator sound when used, then a second later explode. This bomb should do damage in a radius around the T to CT's only. The T should then be killed.

Warden Removal Command (css_fire)

Admins (@css/generic) should be able to remove the current warden.
This should print to everyone that the warden was fired, and not killed (ie it is not a freeday).

Command: css_fire

Tidy up Warden messages

51b3584e8dd99ad7

  • Align the coloring to be more consistent with other JB messages (dark brackets, lighter color text).
  • Remove the redundant [WARDEN] [WARDEN] player is now warden.
  • Add color emphasis on commands.

Warden Name

So basically I was thinking on how the server was automatically naming people. why not get that part of the plugin and put it down so everytime the warden is chosen itll give them this "Gamingbytheminute is now the warden"
WARDEN | =(eGO)= GamingBytheMinute
when he dies itll go back to normal.

Special Treatment

The warden should be able to assign special treatment (STs) to prisoners.

Command:

  • css_st [player] - Mark a player having special treatment, running the command on someone that already has ST should remove it

Behavior:
Upon giving ST, the player should be notified they have ST, and should have a center message being printed reaffirming this.
If an ST causes damage to a CT (ie becomes a rebel), their ST should be removed and they should become a rebel.

An ST should appears as (ST) instead of (Prisoner) in logs.

Limitations:
STs should be removed upon round start.

Last Request

Once the round has been trimmed down to only 2 prisoners alive, prisoners should be able to "LR" (have a Last Request) with the remaining CTs.

An LR should be started with the css_lr command, prompting the T to pick an LR to choose from (listed below) and an alive guard to have it with. LRs should be relatively short (1 minute MAX, ideally ~30 seconds each) games to avoid causing delay.

The T should be teleported to the CT when starting an LR, and both players should be granted temporary immunity (~2-3 seconds) to avoid cheese. Alternatively, we could define a "safe spot" for all maps and teleport both players to this safe spot.

Potential LR ideas:

  • Gun Toss - Try to throw the gun as far as possible in a given direction
  • Rock Paper Scissors
  • Knife Fight - Strip both players of all weapons / armor, set HP to 100, and give them knives
  • No Scope
  • 50/50 (Coinflip, let the CT pick the side to be "fair")
  • S4S (Shot for shot - the T and CT face off each other and take turns shooting one bullet each)
  • Mag4Mag (Same as S4S, but with whole magazines)
  • Race (the prisoner will pick two spots, and the CT and T will have to race from start to end)

If possible, LR customizations where appropriate (weapon choices for noscope, s4s, etc., lowgrav/superspeed for knife fight) would be great.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.