Code updates
This commit is contained in:
parent
34e0013ff4
commit
b51696fb45
6 changed files with 203 additions and 76 deletions
17
Patches/Restocker_IsDisplaySlotAvailableToRestock_Patch.cs
Normal file
17
Patches/Restocker_IsDisplaySlotAvailableToRestock_Patch.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using HarmonyLib;
|
||||
|
||||
namespace DisableShelves
|
||||
{
|
||||
public static partial class ShelfLabelPatch
|
||||
{
|
||||
[HarmonyPatch(typeof(Restocker), "IsDisplaySlotAvailableToRestock")]
|
||||
public static class Restocker_IsDisplaySlotAvailableToRestock_Patch
|
||||
{
|
||||
public static void Postfix(DisplaySlot displaySlot, ref bool __result)
|
||||
{
|
||||
if (!__result) return;
|
||||
if (!displaySlot.GetLabel().IsEnabled()) __result = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue