Skip to content

Commit

Permalink
Register count command (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS authored Oct 13, 2024
2 parents f77902e + 65c728e commit 9931636
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion mod/Gangs.BombIconPerk/BombPerk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion mod/Gangs.SpecialDayColorPerk/SDColorCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
using GangsAPI.Services.Player;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using Stats.Perk.Smoke;

namespace Gangs.SpecialDayColorPerk;

Expand Down
3 changes: 1 addition & 2 deletions mod/Gangs.SpecialDayColorPerk/SDColorMenu.cs
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions mod/Gangs.SpecialDayColorPerk/SDColorPerk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using GangsAPI.Services.Gang;
using GangsAPI.Services.Menu;
using Microsoft.Extensions.DependencyInjection;
using Stats.Perk.Smoke;

namespace Gangs.SpecialDayColorPerk;

Expand All @@ -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();
Expand Down
5 changes: 2 additions & 3 deletions mod/Jailbreak.LastRequest/LastRequests/BulletForBullet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -109,13 +108,13 @@ private HookResult OnPlayerShoot(EventBulletImpact @event,
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;
}
Expand Down
2 changes: 0 additions & 2 deletions mod/Jailbreak.RTD/Rewards/CannotLeftKnife.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
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
Expand Down
2 changes: 1 addition & 1 deletion mod/Jailbreak.RTD/Rewards/CannotScope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion mod/Jailbreak.RTD/Rewards/ChatSpyReward.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public ChatSpyReward(BasePlugin plugin) {

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;
Expand Down
1 change: 1 addition & 0 deletions mod/Jailbreak.Warden/WardenServiceExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public static void AddJailbreakWarden(
.AddPluginBehavior<ISpecialTreatmentService, SpecialTreatmentBehavior>();
serviceCollection
.AddPluginBehavior<IWardenOpenCommand, WardenOpenCommandsBehavior>();
serviceCollection.AddPluginBehavior<CountCommandsBehavior>();


serviceCollection.AddPluginBehavior<SpecialTreatmentCommandsBehavior>();
Expand Down

0 comments on commit 9931636

Please sign in to comment.