Cleanup, hopefully fix B4B crash

This commit is contained in:
MSWS
2024-10-13 01:52:55 -07:00
parent a0ba6f24a3
commit 65c728eaa9
8 changed files with 7 additions and 13 deletions

View File

@@ -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();

View File

@@ -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;

View File

@@ -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) {

View File

@@ -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();

View File

@@ -16,7 +16,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,
@@ -108,13 +107,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;
}

View File

@@ -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

View File

@@ -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) {

View File

@@ -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;