Added AutoDestroy:Plants

This commit is contained in:
Joaquin 2022-07-29 23:40:39 -06:00
parent d0ade8cfc4
commit 30fec1e193
4 changed files with 18 additions and 5 deletions

View File

@ -347,6 +347,13 @@ namespace cheat::game::filters
mineral::Starsilver, mineral::Starsilver,
mineral::WhiteIronChunk mineral::WhiteIronChunk
}; };
SimpleFilter PlantDestroy = {
//plant::SakuraBloom,
plant::DandelionSeed,
plant::MistFlowerCorolla,
plant::FlamingFlowerStamen
};
WhitelistFilter Doodads = { WhitelistFilter Doodads = {
EntityType__Enum_1::Gadget, EntityType__Enum_1::Gadget,
{ {

View File

@ -327,6 +327,7 @@ namespace cheat::game::filters
extern SimpleFilter Oculies; extern SimpleFilter Oculies;
extern SimpleFilter Chests; extern SimpleFilter Chests;
extern SimpleFilter Ores; extern SimpleFilter Ores;
extern SimpleFilter PlantDestroy;
extern WhitelistFilter Doodads; extern WhitelistFilter Doodads;
extern SimpleFilter Animals; extern SimpleFilter Animals;
extern SimpleFilter AnimalDrop; extern SimpleFilter AnimalDrop;

View File

@ -18,6 +18,7 @@ namespace cheat::feature
NF(f_DestroyOres, "Destroy Ores", "AutoDestroy", false), NF(f_DestroyOres, "Destroy Ores", "AutoDestroy", false),
NF(f_DestroyShields, "Destroy Shields", "AutoDestroy", false), NF(f_DestroyShields, "Destroy Shields", "AutoDestroy", false),
NF(f_DestroyDoodads, "Destroy Doodads", "AutoDestroy", false), NF(f_DestroyDoodads, "Destroy Doodads", "AutoDestroy", false),
NF(f_DestroyPlants, "Destroy Plants", "AutoDestroy", false),
NF(f_Range, "Range", "AutoDestroy", 10.0f) NF(f_Range, "Range", "AutoDestroy", 10.0f)
{ {
HookManager::install(app::MoleMole_LCAbilityElement_ReduceModifierDurability, LCAbilityElement_ReduceModifierDurability_Hook); HookManager::install(app::MoleMole_LCAbilityElement_ReduceModifierDurability, LCAbilityElement_ReduceModifierDurability_Hook);
@ -43,6 +44,7 @@ namespace cheat::feature
ConfigWidget("Doodads", f_DestroyDoodads, "Barrels, boxes, vases, etc."); ConfigWidget("Doodads", f_DestroyDoodads, "Barrels, boxes, vases, etc.");
ImGui::SameLine(); ImGui::SameLine();
ImGui::TextColored(ImColor(255, 165, 0, 255), "Extremely risky!"); ImGui::TextColored(ImColor(255, 165, 0, 255), "Extremely risky!");
ConfigWidget("Plants", f_DestroyPlants, "Dandelion Seeds, Sakura Bloom, etc.");
ImGui::Unindent(); ImGui::Unindent();
ConfigWidget("Range (m)", f_Range, 0.1f, 1.0f, 15.0f); ConfigWidget("Range (m)", f_Range, 0.1f, 1.0f, 15.0f);
} }
@ -54,12 +56,13 @@ namespace cheat::feature
void AutoDestroy::DrawStatus() void AutoDestroy::DrawStatus()
{ {
ImGui::Text("Destroy [%.01fm%s%s%s%s]", ImGui::Text("Destroy [%.01fm%s%s%s%s%s]",
f_Range.value(), f_Range.value(),
f_DestroyOres || f_DestroyShields || f_DestroyDoodads ? "|" : "", f_DestroyOres || f_DestroyShields || f_DestroyDoodads || f_DestroyPlants ? "|" : "",
f_DestroyOres ? "O" : "", f_DestroyOres ? "O" : "",
f_DestroyShields ? "S" : "", f_DestroyShields ? "S" : "",
f_DestroyDoodads ? "D" : ""); f_DestroyDoodads ? "D" : "",
f_DestroyPlants ? "P" : "");
} }
AutoDestroy& AutoDestroy::GetInstance() AutoDestroy& AutoDestroy::GetInstance()
@ -86,8 +89,9 @@ namespace cheat::feature
(autoDestroy.f_DestroyDoodads && game::filters::combined::Doodads.IsValid(manager.entity(entity))) || (autoDestroy.f_DestroyDoodads && game::filters::combined::Doodads.IsValid(manager.entity(entity))) ||
(autoDestroy.f_DestroyShields && !game::filters::combined::MonsterBosses.IsValid(manager.entity(entity)) && ( (autoDestroy.f_DestroyShields && !game::filters::combined::MonsterBosses.IsValid(manager.entity(entity)) && (
game::filters::combined::MonsterShielded.IsValid(manager.entity(entity)) || // For shields attached to monsters, e.g. abyss mage shields. game::filters::combined::MonsterShielded.IsValid(manager.entity(entity)) || // For shields attached to monsters, e.g. abyss mage shields.
game::filters::combined::MonsterEquips.IsValid(manager.entity(entity)) // For shields/weapons equipped by monsters, e.g. rock shield. game::filters::combined::MonsterEquips.IsValid(manager.entity(entity)) || // For shields/weapons equipped by monsters, e.g. rock shield.
)) (autoDestroy.f_DestroyPlants && game::filters::combined::PlantDestroy.IsValid(manager.entity(entity))) // For plants e.g dandelion seeds.
))
) )
) )
{ {

View File

@ -12,6 +12,7 @@ namespace cheat::feature
config::Field<config::Toggle<Hotkey>> f_DestroyOres; config::Field<config::Toggle<Hotkey>> f_DestroyOres;
config::Field<config::Toggle<Hotkey>> f_DestroyShields; config::Field<config::Toggle<Hotkey>> f_DestroyShields;
config::Field<config::Toggle<Hotkey>> f_DestroyDoodads; config::Field<config::Toggle<Hotkey>> f_DestroyDoodads;
config::Field<config::Toggle<Hotkey>> f_DestroyPlants;
config::Field<float> f_Range; config::Field<float> f_Range;
static AutoDestroy& GetInstance(); static AutoDestroy& GetInstance();