mirror of
https://github.com/edgegamers/Jailbreak.git
synced 2025-12-06 04:42:57 -08:00
Register count command (#314)
This commit is contained in:
@@ -17,7 +17,7 @@ public class BombPerk(IServiceProvider provider)
|
||||
public override string StatId => STAT_ID;
|
||||
public override string Name => "Bomb Icon";
|
||||
|
||||
public override string? Description
|
||||
public override string Description
|
||||
=> "Customize the icon that is shown when you bomb a CT";
|
||||
|
||||
public override BombPerkData Value { get; set; } = new();
|
||||
|
||||
@@ -13,7 +13,6 @@ using GangsAPI.Services.Menu;
|
||||
using GangsAPI.Services.Player;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Stats.Perk.Smoke;
|
||||
|
||||
namespace Gangs.SpecialDayColorPerk;
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using CounterStrikeSharp.API.Modules.Commands;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using Gangs.SpecialDayColorPerk;
|
||||
using GangsAPI.Data;
|
||||
using GangsAPI.Extensions;
|
||||
using GangsAPI.Menu;
|
||||
using GangsAPI.Services.Commands;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Stats.Perk.Smoke;
|
||||
namespace Gangs.SpecialDayColorPerk;
|
||||
|
||||
public class SDColorMenu(IServiceProvider provider, SDColorData data)
|
||||
: AbstractPagedMenu<SDColor>(provider, NativeSenders.Chat) {
|
||||
|
||||
@@ -4,7 +4,6 @@ using GangsAPI.Data.Gang;
|
||||
using GangsAPI.Services.Gang;
|
||||
using GangsAPI.Services.Menu;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Stats.Perk.Smoke;
|
||||
|
||||
namespace Gangs.SpecialDayColorPerk;
|
||||
|
||||
@@ -18,7 +17,7 @@ public class SDColorPerk(IServiceProvider provider)
|
||||
public override string StatId => STAT_ID;
|
||||
public override string Name => "Special Day Color";
|
||||
|
||||
public override string? Description
|
||||
public override string Description
|
||||
=> "Change the color of your gang during special days!";
|
||||
|
||||
public override SDColorData Value { get; set; } = new();
|
||||
|
||||
@@ -17,7 +17,6 @@ public class BulletForBullet : TeleportingRequest {
|
||||
private readonly ChatMenu chatMenu;
|
||||
private readonly bool magForMag;
|
||||
private readonly ILRB4BLocale msg;
|
||||
private string? designerName;
|
||||
private int? whosShot, magSize;
|
||||
|
||||
public BulletForBullet(BasePlugin plugin, IServiceProvider provider,
|
||||
@@ -109,13 +108,13 @@ public class BulletForBullet : TeleportingRequest {
|
||||
return HookResult.Handled;
|
||||
}
|
||||
|
||||
var bullets = player.GetWeaponBase(designerName!)?.Clip1 ?? 1;
|
||||
var bullets = player.GetWeaponBase(weaponName)?.Clip1 ?? 1;
|
||||
if (bullets > 1) return HookResult.Continue;
|
||||
|
||||
Server.NextFrame(() => {
|
||||
var opponent = player.Slot == Prisoner.Slot ? Guard : Prisoner;
|
||||
whosShot = opponent.Slot;
|
||||
opponent.GetWeaponBase(designerName!)?.SetAmmo(magSize.Value, 0);
|
||||
opponent.GetWeaponBase(weaponName)?.SetAmmo(magSize.Value, 0);
|
||||
});
|
||||
return HookResult.Continue;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ using Jailbreak.Public.Extensions;
|
||||
namespace Jailbreak.RTD.Rewards;
|
||||
|
||||
public class CannotLeftKnife(BasePlugin plugin) : AbstractOnTickReward(plugin) {
|
||||
private readonly HashSet<int> blockedPlayerIDs = [];
|
||||
|
||||
public override string Name => "Cannot Left-Knife";
|
||||
|
||||
public override string Description
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Jailbreak.RTD.Rewards;
|
||||
public class CannotScope(BasePlugin plugin) : AbstractOnTickReward(plugin) {
|
||||
public override string Name => "Cannot Scope";
|
||||
|
||||
public override string? Description
|
||||
public override string Description
|
||||
=> "You will not be able to scope next round.";
|
||||
|
||||
override protected void tick(CCSPlayerController player) {
|
||||
|
||||
@@ -12,7 +12,7 @@ public class ChatSpyReward : IRTDReward {
|
||||
|
||||
public string Name => "Chat Spy";
|
||||
|
||||
public string? Description
|
||||
public string Description
|
||||
=> "You will be able to read all team chats next round.";
|
||||
|
||||
public bool Enabled => API.Actain != null;
|
||||
|
||||
@@ -20,6 +20,7 @@ public static class WardenServiceExtension {
|
||||
.AddPluginBehavior<ISpecialTreatmentService, SpecialTreatmentBehavior>();
|
||||
serviceCollection
|
||||
.AddPluginBehavior<IWardenOpenCommand, WardenOpenCommandsBehavior>();
|
||||
serviceCollection.AddPluginBehavior<CountCommandsBehavior>();
|
||||
|
||||
|
||||
serviceCollection.AddPluginBehavior<SpecialTreatmentCommandsBehavior>();
|
||||
|
||||
Reference in New Issue
Block a user