Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
f6aaeeb
Update RetakesAllocator.cs
Micka2302 Apr 1, 2025
4bb7783
Update AdvancedGunMenu.cs
Micka2302 Apr 1, 2025
faca5bc
Merge branch 'yonilerner:main' into main
Micka2302 Sep 19, 2025
01c1da1
Treat SSG08 as preferred weapon
Micka2302 Sep 19, 2025
a680303
Merge pull request #1 from Micka2302/codex/update-weapon-allocation-f…
Micka2302 Sep 19, 2025
ce49905
Merge pull request #3 from Micka2302/dev
Micka2302 Sep 19, 2025
8850aaf
Rename preferred weapon configuration to AWP
Micka2302 Sep 19, 2025
f770043
Merge pull request #5 from Micka2302/codex/rename-preferredweapon-to-…
Micka2302 Sep 19, 2025
901db5e
Merge pull request #6 from Micka2302/dev2
Micka2302 Sep 19, 2025
0f10864
Add SSG queue configuration and tests
Micka2302 Sep 19, 2025
b9838d0
Merge pull request #7 from Micka2302/codex/enhance-ssg-weapon-support…
Micka2302 Sep 19, 2025
2826d8a
Merge pull request #8 from Micka2302/dev-ssg08
Micka2302 Sep 19, 2025
439a27c
Update README.md
Micka2302 Sep 20, 2025
5a94ca0
Add EnableAllWeaponForEveryone option
Micka2302 Sep 27, 2025
2532dcd
Merge pull request #11 from Micka2302/dev
Micka2302 Sep 27, 2025
819a1a0
!guns menu rework
Micka2302 Sep 27, 2025
1855b91
Rework with Kitsune menu
Micka2302 Sep 27, 2025
662eabc
Update en.json
Micka2302 Sep 27, 2025
ce50dde
Update menu for vip player
Micka2302 Sep 27, 2025
7b7b929
Add Random option for Sniper Preference
Micka2302 Sep 30, 2025
831d889
Add !zeus command like !awp or !ssg
Micka2302 Sep 30, 2025
0b79426
Merge pull request #12 from Micka2302/dev
Micka2302 Sep 30, 2025
fbeac6c
Fix random give 2 awp on same team
Micka2302 Oct 11, 2025
a72f14b
Feat : Add EnemyStuff
Micka2302 Oct 11, 2025
0f38418
update
Micka2302 Oct 11, 2025
6968b29
Merge pull request #13 from Micka2302/dev
Micka2302 Oct 13, 2025
6bfb635
Zeus config update
Micka2302 Oct 24, 2025
8c2ddf0
Merge pull request #14 from Micka2302/dev
Micka2302 Oct 25, 2025
60612e6
ADD team choice for Enemy stuff (Not tested)
Micka2302 Nov 2, 2025
5144a85
Fix Mysql Crash, and updated Db
Micka2302 Nov 2, 2025
1dcd241
Update database SQL
Micka2302 Nov 4, 2025
aa2b9e9
Merge pull request #16 from Micka2302/dev
Micka2302 Nov 6, 2025
634cfde
Fix migration after first launch
Micka2302 Nov 9, 2025
7322a45
Delete .tools directory
Micka2302 Nov 9, 2025
077487f
Merge pull request #17 from Micka2302/dev
Micka2302 Nov 9, 2025
4235a82
Update ReadME
Micka2302 Nov 10, 2025
6b25047
Update 13/11/2025
Micka2302 Nov 13, 2025
9ebbf22
Merge branch 'dev' of https://github.com/Micka2302/cs2-retakes-alloca…
Micka2302 Nov 13, 2025
6503fa9
Merge pull request #18 from Micka2302/dev
Micka2302 Nov 13, 2025
41c2330
Update gamedata URL
Micka2302 Nov 13, 2025
494752e
Merge pull request #19 from Micka2302/dev
Micka2302 Nov 13, 2025
fbe6430
Refactor RetakesAllocator_gamedata.json structure
Micka2302 Nov 13, 2025
69300a6
Update RetakesAllocator_gamedata.json
Micka2302 Nov 13, 2025
778376b
Update RetakesAllocator.cs
Micka2302 Nov 13, 2025
aa0f938
Merge pull request #21 from Micka2302/dev
Micka2302 Nov 14, 2025
4044ae4
Update for Dathost database and fix error
Micka2302 Nov 14, 2025
912a2fb
Update README.md
Micka2302 Nov 19, 2025
a0d0031
Rework config file for more visibility
Micka2302 Nov 19, 2025
c16b51e
Update KitsuneMenu
Micka2302 Dec 23, 2025
d1c850b
fix Warmup
Micka2302 Jan 11, 2026
25cca85
Merge pull request #22 from Micka2302/dev-reworkconfigs
Micka2302 Jan 11, 2026
f36c64b
Update 2.4
Micka2302 Jan 13, 2026
a531e63
Merge pull request #23 from Micka2302/dev
Micka2302 Jan 13, 2026
276c353
Update
Micka2302 Jan 20, 2026
c66a81c
Update signatures from last CS2 update
Micka2302 Jan 22, 2026
35cf7b6
Update CSsharp 1.0.356
Micka2302 Jan 23, 2026
af28c46
Update 2.6
Micka2302 Jan 23, 2026
d214a66
Merge branch 'main' into dev
Micka2302 Jan 23, 2026
2c5d403
Merge pull request #25 from Micka2302/dev
Micka2302 Jan 23, 2026
76ba26d
Add kitsunemenu files
Micka2302 Jan 23, 2026
1f0b557
Merge branch 'dev' of https://github.com/Micka2302/cs2-retakes-alloca…
Micka2302 Jan 23, 2026
c185837
Update compile file
Micka2302 Jan 23, 2026
72981d6
Update ReadMe
Micka2302 Jan 24, 2026
7ff5fca
Update README.md
Micka2302 Jan 24, 2026
d1d987a
Merge pull request #26 from Micka2302/dev
Micka2302 Jan 24, 2026
398f1ef
Add files via upload
Micka2302 Jan 25, 2026
0036116
Add files via upload
Micka2302 Jan 25, 2026
a4df487
Update English localization for RetakesAllocator
Micka2302 Jan 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "9.0.9",
"commands": [
"dotnet-ef"
],
"rollForward": false
}
}
}
14 changes: 14 additions & 0 deletions MigrationRunner/MigrationRunner.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\RetakesAllocatorCore\RetakesAllocatorCore.csproj" />
</ItemGroup>

</Project>
27 changes: 27 additions & 0 deletions MigrationRunner/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using RetakesAllocatorCore.Config;
using RetakesAllocatorCore.Db;

var config = new ConfigData
{
DatabaseProvider = DatabaseProvider.MySql,
DatabaseConnectionString = "Server=127.0.0.1;Port=3307;Database=cs2allocator_test;Uid=root;Pwd=;",
MigrateOnStartup = true,
};

Configs.OverrideConfigDataForTests(config);

try
{
Console.WriteLine("Running migrations...");
Queries.Migrate();
Console.WriteLine("Migrations completed.");
}
catch (Exception ex)
{
Console.WriteLine("Migration failed:");
Console.WriteLine(ex);
}
finally
{
Queries.Disconnect();
}
730 changes: 396 additions & 334 deletions README.md

Large diffs are not rendered by default.

Binary file added Resources/ASITEv2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/BSITEv2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 23 additions & 25 deletions Resources/RetakesAllocator_gamedata.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
{
"GetCSWeaponDataFromKey": {
"signatures": {
"library": "server",
"windows": "48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC ? 33 ED 48 8B FA 8B F1",
"linux": "55 31 D2 48 89 E5 53 89 FB"
}
},
"CCSPlayer_ItemServices_CanAcquire": {
"signatures": {
"library": "server",
"windows": "44 89 44 24 ? 48 89 54 24 ? 48 89 4C 24 ? 55 53 56 57 41 55 41 56 41 57 48 8B EC",
"linux": "55 48 89 E5 41 57 41 56 41 55 49 89 CD 41 54 49 89 FC 53 48 89 F3 48 83 EC"
}
},
"GiveNamedItem2": {
"signatures": {
"library": "server",
"windows": "48 83 EC ? 48 C7 44 24 ? ? ? ? ? 45 33 C9 45 33 C0 C6 44 24 ? ? E8 ? ? ? ? 48 83 C4 ? C3 CC CC CC CC CC CC CC CC CC CC CC CC CC CC 48 83 EC",
"linux": "45 31 C9 45 31 C0 31 C9 31 D2 E9 ? ? ? ? CC 55 45 31 C9"
}
}
}


{
"GetCSWeaponDataFromKey": {
"signatures": {
"library": "server",
"windows": "48 89 5C 24 ? 57 48 83 EC ? 33 FF 4C 8B CA 8B D9",
"linux": "55 31 D2 48 89 E5 41 57 41 56 41 55 41 54 41 89 FC"
}
},
"CCSPlayer_ItemServices_CanAcquire": {
"signatures": {
"library": "server",
"windows": "44 89 44 24 ? 48 89 54 24 ? 48 89 4C 24 ? 55 53 56 57 41 55 41 56 41 57 48 8B EC",
"linux": "55 48 89 E5 41 57 41 56 41 55 49 89 CD 41 54 49 89 FC 53 48 89 F3 48 83 EC"
}
},
"GiveNamedItem2": {
"signatures": {
"library": "server",
"windows": "48 83 EC ? 48 C7 44 24 ? ? ? ? ? 45 33 C9 45 33 C0 C6 44 24 ? ? E8 ? ? ? ? 48 83 C4 ? C3 CC CC CC CC CC CC CC CC CC CC CC CC CC CC 48 83 EC",
"linux": "45 31 C9 45 31 C0 31 C9 31 D2 E9 ? ? ? ? CC 55 45 31 C9"
}
}
}
35 changes: 32 additions & 3 deletions RetakesAllocator/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ public static void RemoveArmor(CCSPlayerController player)

public static bool RemoveWeapons(CCSPlayerController player, Func<CsItem, bool>? where = null)
{
if (!PlayerIsValid(player) || player.PlayerPawn.Value?.WeaponServices is null)
if (!PlayerIsValid(player) ||
!player.PawnIsAlive ||
player.PlayerPawn.Value?.WeaponServices is null)
{
return false;
}
Expand Down Expand Up @@ -200,7 +202,34 @@ public static bool IsWindows()
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
}

public static bool IsVip(CCSPlayerController player) => AdminManager.PlayerHasPermissions(player, "@css/vip");
public static bool HasAwpPermission(CCSPlayerController player) =>
PlayerHasPermission(player, Configs.GetConfigData().AwpPermission);

public static bool HasSsgPermission(CCSPlayerController player) =>
PlayerHasPermission(player, Configs.GetConfigData().SsgPermission);

public static bool PlayerHasPermission(CCSPlayerController player, string? permission)
{
if (string.IsNullOrWhiteSpace(permission))
{
return false;
}

return AdminManager.PlayerHasPermissions(player, permission) ||
AdminManager.PlayerHasPermissions(player, "@css/root");
}

public static bool HasEnemyStuffPermission(CCSPlayerController player)
{
var config = Configs.GetConfigData();
return config.GetEnemyStuffMode() switch
{
AccessMode.Disabled => false,
AccessMode.Everyone => true,
AccessMode.VipOnly => PlayerHasPermission(player, config.EnemyStuffPermission),
_ => false,
};
}

public static async Task<bool> DownloadMissingFiles()
{
Expand All @@ -211,7 +240,7 @@ public static async Task<bool> DownloadMissingFiles()
string baseFolderPath = Configs.Shared.Module!;

string gamedataFileName = "gamedata/RetakesAllocator_gamedata.json";
string gamedataGithubUrl = "https://raw.githubusercontent.com/yonilerner/cs2-retakes-allocator/main/Resources/RetakesAllocator_gamedata.json";
string gamedataGithubUrl = "https://raw.githubusercontent.com/Micka2302/cs2-retakes-allocator-2.0/main/Resources/RetakesAllocator_gamedata.json";
string gamedataFilePath = Path.Combine(baseFolderPath, gamedataFileName);
string gamedataDirectoryPath = Path.GetDirectoryName(gamedataFilePath)!;

Expand Down
12 changes: 12 additions & 0 deletions RetakesAllocator/KitsuneMenu/Core/Enums/MenuTextSize.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace KitsuneMenu.Core.Enums;

public enum MenuTextSize
{
ExtraSmall, // fontSize-xs
Small, // fontSize-s
SmallMedium, // fontSize-sm
Medium, // fontSize-m
MediumLarge, // fontSize-ml
Large, // fontSize-l
ExtraLarge // fontSize-xl
}
Loading