Skip to content

Commit

Permalink
Allow pickups
Browse files Browse the repository at this point in the history
  • Loading branch information
yonilerner committed Apr 4, 2024
1 parent 6300edd commit 0eaf9bb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions RetakesAllocator/RetakesAllocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,12 @@ public HookResult OnWeaponCanAcquire(DynamicHook hook)
return HookResult.Continue;
}

var acquireMethod = hook.GetParam<AcquireMethod>(2);
if (acquireMethod == AcquireMethod.PickUp)
{
return HookResult.Continue;
}

if (Helpers.IsWarmup())
{
return HookResult.Continue;
Expand All @@ -329,7 +335,6 @@ public HookResult OnWeaponCanAcquire(DynamicHook hook)

HookResult RetStop()
{
var acquireMethod = hook.GetParam<AcquireMethod>(2);
// Log.Debug($"Exiting OnWeaponCanAcquire {acquireMethod}");
hook.SetReturn(
acquireMethod != AcquireMethod.PickUp
Expand Down Expand Up @@ -584,9 +589,7 @@ out var currentRoundType
var roundType = RoundTypeManager.Instance.GetCurrentRoundType()!.Value;
var roundTypeName = RoundTypeHelpers.TranslateRoundTypeName(roundType);
var message = Translator.Instance["announcement.roundtype", roundTypeName];
Server.PrintToChatAll(
$"{MessagePrefix}{message}"
);
Server.PrintToChatAll($"{MessagePrefix}{message}");
if (Configs.GetConfigData().EnableRoundTypeAnnouncementCenter)
{
foreach (var player in allPlayers)
Expand Down
2 changes: 1 addition & 1 deletion RetakesAllocatorCore/Config/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public Dictionary<
public bool ResetStateOnGameRestart { get; set; } = true;
public bool AllowAllocationAfterFreezeTime { get; set; } = true;
public bool EnableRoundTypeAnnouncement { get; set; } = true;
public bool EnableRoundTypeAnnouncementCenter { get; set; } = true;
public bool EnableRoundTypeAnnouncementCenter { get; set; } = false;
public bool EnableNextRoundTypeVoting { get; set; } = false;
public int NumberOfExtraVipChancesForPreferredWeapon { get; set; } = 1;
public bool AllowPreferredWeaponForEveryone { get; set; } = false;
Expand Down
2 changes: 1 addition & 1 deletion RetakesAllocatorCore/PluginInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace RetakesAllocatorCore;

public static class PluginInfo
{
public const string Version = "2.3.1";
public const string Version = "2.3.2";

public static readonly string LogPrefix = $"[RetakesAllocator {Version}] ";

Expand Down

0 comments on commit 0eaf9bb

Please sign in to comment.