mirror of
https://github.com/MSWS/TTT.git
synced 2025-12-05 22:20:25 -08:00
Compare commits
8 Commits
ba91bfb1cf
...
2.0.5-dev.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
496fd75ca9 | ||
|
|
1765a87039 | ||
|
|
a66a4cb03c | ||
|
|
0d816facba | ||
|
|
43f550779a | ||
|
|
6e4d957636 | ||
|
|
f44c42ddb1 | ||
|
|
e47e85651c |
@@ -10,7 +10,7 @@ namespace TTT.CS2.Configs.ShopItems;
|
||||
|
||||
public class CS2CamoConfig : IStorage<CamoConfig>, IPluginModule {
|
||||
public static readonly FakeConVar<int> CV_PRICE = new(
|
||||
"css_ttt_shop_camo_price", "Price of the Camo item", 75,
|
||||
"css_ttt_shop_camo_price", "Price of the Camo item", 65,
|
||||
ConVarFlags.FCVAR_NONE, new RangeValidator<int>(0, 10000));
|
||||
|
||||
public static readonly FakeConVar<float> CV_CAMO_VISIBILITY = new(
|
||||
|
||||
@@ -78,7 +78,7 @@ public class PoisonShotsListener(IServiceProvider provider)
|
||||
if (ev.Attacker == null) return;
|
||||
if (!poisonShots.TryGetValue(ev.Attacker, out var shot) || shot <= 0)
|
||||
return;
|
||||
if (ev.Weapon == null || !Tag.GUNS.Contains(ev.Weapon)) return;
|
||||
if (ev.Weapon == null || !Tag.PISTOLS.Contains(ev.Weapon)) return;
|
||||
Messenger.Message(ev.Attacker,
|
||||
Locale[PoisonShotMsgs.SHOP_ITEM_POISON_HIT(ev.Player)]);
|
||||
addPoisonEffect(ev.Player, ev.Attacker);
|
||||
|
||||
@@ -25,6 +25,9 @@ public class AutoRTDCommand(IServiceProvider provider) : ICommand, IListener {
|
||||
private readonly IMsgLocalizer localizer =
|
||||
provider.GetRequiredService<IMsgLocalizer>();
|
||||
|
||||
private readonly IPermissionManager perms =
|
||||
provider.GetRequiredService<IPermissionManager>();
|
||||
|
||||
private readonly Dictionary<string, bool> playerStatuses = new();
|
||||
private ICookie? autoRtdCookie;
|
||||
public string Id => "autortd";
|
||||
@@ -75,9 +78,10 @@ public class AutoRTDCommand(IServiceProvider provider) : ICommand, IListener {
|
||||
[UsedImplicitly]
|
||||
[EventHandler]
|
||||
public void OnRoundStart(GameInitEvent ev) {
|
||||
var messenger = provider.GetRequiredService<IMessenger>();
|
||||
Task.Run(async () => {
|
||||
foreach (var player in finder.GetOnline()) {
|
||||
if (!perms.HasFlags(player, RequiredFlags)) continue;
|
||||
|
||||
if (!playerStatuses.TryGetValue(player.Id, out var status)) {
|
||||
await fetchCookie(player);
|
||||
status = playerStatuses.GetValueOrDefault(player.Id, false);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace ShopAPI.Configs;
|
||||
|
||||
public record ArmorConfig : ShopItemConfig {
|
||||
public override int Price { get; init; } = 60;
|
||||
public override int Price { get; init; } = 75;
|
||||
public int Armor { get; init; } = 100;
|
||||
public bool Helmet { get; init; } = true;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
namespace ShopAPI.Configs;
|
||||
|
||||
public record CamoConfig : ShopItemConfig {
|
||||
public override int Price { get; init; } = 75;
|
||||
public override int Price { get; init; } = 65;
|
||||
public float CamoVisibility { get; init; } = 0.6f;
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
namespace SpecialRoundAPI.Configs;
|
||||
|
||||
public record SilentRoundConfig : SpecialRoundConfig {
|
||||
public override float Weight { get; init; } = 0.5f;
|
||||
public override float Weight { get; init; } = 0.2f;
|
||||
}
|
||||
Reference in New Issue
Block a user