public static void Bind(CropReplant cr) { c_range = cr.Config.Bind("General", "MultipickRange", 2f, "Radius to pick crops in"); c_multipick = cr.Config.Bind("General", "MultipickEnable", true, "Enable picking crops in radius"); c_displayGrowth = cr.Config.Bind("General", "DisplayGrowth", true, "Enable growth % tooltip on plant."); c_useDurability = cr.Config.Bind("General", "UseDurability", true, "Enable cultivator durability depletion when replanting."); c_blockHarvestNoResources = cr.Config.Bind("General", "blockHarvestNoResources", false, "Block harvest if no resource to replant."); c_replantSame = cr.Config.Bind("General", "replantSame", false, "Replant same plant if cultivate is selected in cultivator menu."); c_customReplantables = cr.Config.Bind("General", "customReplantables", "", "Custom plants to replant in format 'SeedName : PlantName, SeedName : PlantName'"); customReplantables = ParseReplantables(c_customReplantables.Value); c_oldStyle = cr.Config.Bind("General", "oldStyle", false, "1.6 style replanting"); c_useCustomReplantKey = cr.Config.Bind("General", "UseCustomReplantKey", false, "Use a custom keybind instead of game's alternative attack bind."); c_customReplantKey = cr.Config.Bind("General", "customReplantKey", KeyCode.H, "Custom keybind to use instead of of game's alternative attack bind."); replantButton = new ButtonConfig { Name = "ReplantKey", Config = c_customReplantKey, HintToken = "Replant" }; replantHint = new KeyHintConfig { ButtonConfigs = new ButtonConfig[] { replantButton }, }; GUIManager.Instance.AddKeyHint(replantHint); InputManager.Instance.AddButton(CropReplant.PluginGUID, replantButton); }
public static void Bind(CropReplant cr) { range = cr.Config.Bind("General", "MultipickRange", 2f, "Radius to pick crops in").Value; multipick = cr.Config.Bind("General", "MultipickEnable", true, "Enable picking crops in radius").Value; displayGrowth = cr.Config.Bind("General", "DisplayGrowth", true, "Enable growth % tooltip on plant.").Value; useDurability = cr.Config.Bind("General", "UseDurability", true, "Enable cultivator durability depletion when replanting.").Value; useCustomReplantKey = cr.Config.Bind("General", "UseCustomReplantKey", false, "Use a custom keybind instead of game's alternative attack bind.").Value; customReplantKey = cr.Config.Bind("General", "UstomReplantKey", KeyCode.H, "Custom keybind to use instead of of game's alternative attack bind.").Value; }