-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy path25WeaponEnchantments.cs
33 lines (28 loc) · 1.01 KB
/
25WeaponEnchantments.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Decompiled with JetBrains decompiler
// Type: StardewValley.EfficientToolEnchantment
// Assembly: Stardew Valley, Version=1.5.6.22018, Culture=neutral, PublicKeyToken=null
// MVID: BEBB6D18-4941-4529-AC12-B54F0C61CC20
// Assembly location: C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\Stardew Valley.dll
using StardewValley.Tools;
namespace StardewValley
{
public class EfficientToolEnchantment : BaseEnchantment
{
public override string GetName() => "Efficient";
public override bool CanApplyTo(Item item) => item is Tool && !(item is MilkPail) && !(item is MeleeWeapon) && !(item is Shears) && !(item is Pan) && !(item is Wand) && !(item is Slingshot);
protected override void _ApplyTo(Item item)
{
base._ApplyTo(item);
if (!(item is Tool tool))
return;
tool.IsEfficient = true;
}
protected override void _UnapplyTo(Item item)
{
base._UnapplyTo(item);
if (!(item is Tool tool))
return;
tool.IsEfficient = false;
}
}
}