diff --git a/Source/options.cpp b/Source/options.cpp index 16b6a8e99..95d4e951a 100644 --- a/Source/options.cpp +++ b/Source/options.cpp @@ -993,6 +993,7 @@ GameplayOptions::GameplayOptions() , enemyHealthBar("Enemy Health Bar", OptionEntryFlags::None, N_("Enemy Health Bar"), N_("Enemy Health Bar is displayed at the top of the screen."), false) , autoGoldPickup("Auto Gold Pickup", OptionEntryFlags::None, N_("Auto Gold Pickup"), N_("Gold is automatically collected when in close proximity to the player."), false) , autoElixirPickup("Auto Elixir Pickup", OptionEntryFlags::None, N_("Auto Elixir Pickup"), N_("Elixirs are automatically collected when in close proximity to the player."), false) + , autoOilPickup("Auto Oil Pickup", OptionEntryFlags::OnlyHellfire, N_("Auto Oil Pickup"), N_("Oils are automatically collected when in close proximity to the player."), false) , autoPickupInTown("Auto Pickup in Town", OptionEntryFlags::None, N_("Auto Pickup in Town"), N_("Automatically pickup items in town."), false) , adriaRefillsMana("Adria Refills Mana", OptionEntryFlags::None, N_("Adria Refills Mana"), N_("Adria will refill your mana when you visit her shop."), false) , autoEquipWeapons("Auto Equip Weapons", OptionEntryFlags::None, N_("Auto Equip Weapons"), N_("Weapons will be automatically equipped on pickup or purchase if enabled."), true) @@ -1040,6 +1041,7 @@ std::vector GameplayOptions::GetEntries() &autoPickupInTown, &autoGoldPickup, &autoElixirPickup, + &autoOilPickup, &autoEquipWeapons, &autoEquipArmor, &autoEquipHelms, diff --git a/Source/options.h b/Source/options.h index 536dfc142..fa8eb6689 100644 --- a/Source/options.h +++ b/Source/options.h @@ -535,6 +535,8 @@ struct GameplayOptions : OptionCategoryBase { OptionEntryBoolean autoGoldPickup; /** @brief Auto-pickup elixirs */ OptionEntryBoolean autoElixirPickup; + /** @brief Auto-pickup oils */ + OptionEntryBoolean autoOilPickup; /** @brief Enable or Disable auto-pickup in town */ OptionEntryBoolean autoPickupInTown; /** @brief Recover mana when talking to Adria. */ diff --git a/Source/qol/autopickup.cpp b/Source/qol/autopickup.cpp index f7ac4ebb0..8da479d34 100644 --- a/Source/qol/autopickup.cpp +++ b/Source/qol/autopickup.cpp @@ -63,6 +63,20 @@ bool DoPickup(Item item) case IMISC_ELIXDEX: case IMISC_ELIXVIT: return *sgOptions.Gameplay.autoElixirPickup; + case IMISC_OILFIRST: + case IMISC_OILOF: + case IMISC_OILACC: + case IMISC_OILMAST: + case IMISC_OILSHARP: + case IMISC_OILDEATH: + case IMISC_OILSKILL: + case IMISC_OILBSMTH: + case IMISC_OILFORT: + case IMISC_OILPERM: + case IMISC_OILHARD: + case IMISC_OILIMP: + case IMISC_OILLAST: + return *sgOptions.Gameplay.autoOilPickup; default: return false; }