mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 10:32:19 +08:00
perf: 整理满天飞的 get_instance
This commit is contained in:
@@ -157,13 +157,12 @@ bool asst::BattleFormationTask::click_role_table(BattleRole role)
|
||||
|
||||
bool asst::BattleFormationTask::parse_formation()
|
||||
{
|
||||
if (!CopilotConfiger::get_instance().contains_actions(m_stage_name)) {
|
||||
if (!Copilot.contains_actions(m_stage_name)) {
|
||||
Log.error("Unknown stage name", m_stage_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto& group = CopilotConfiger::get_instance().get_actions(m_stage_name).groups;
|
||||
const auto& battle_data = BattleDataConfiger::get_instance();
|
||||
const auto& group = Copilot.get_actions(m_stage_name).groups;
|
||||
|
||||
json::value info = basic_info_with_what("BattleFormation");
|
||||
auto& details = info["details"];
|
||||
@@ -175,7 +174,7 @@ bool asst::BattleFormationTask::parse_formation()
|
||||
}
|
||||
formation.array_emplace(name);
|
||||
|
||||
BattleRole role = battle_data.get_role(opers_vec.front().name);
|
||||
BattleRole role = BattleData.get_role(opers_vec.front().name);
|
||||
m_formation[role].emplace_back(opers_vec);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user