Skip to content

Commit

Permalink
Refactoring Faction class
Browse files Browse the repository at this point in the history
  • Loading branch information
MahBoiDeveloper committed Mar 8, 2025
1 parent a0a8021 commit 2d87504
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/GUI/Faction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,21 @@ void Faction::SetHotkey(const QString& goName, const QString& actName, const QSt
{
for(Faction::GameObject& currGO : techTree.keys())
{
if(currGO.iconName == goName)
if(currGO.iconName != goName)
continue;

for(QVector<Faction::Action> currLt : currGO.keyboardLayouts)
{
for(QVector<Faction::Action> currLt : currGO.keyboardLayouts)
for(Faction::Action currAct : currLt)
{
for(Faction::Action currAct : currLt)
{
if(currAct.iconName == actName)
{
CSF_PARSER->SetHotkey(currAct.hotkeyString, hk.toStdWString()[0]);
break;
}
}
if(currAct.iconName != actName)
continue;

CSF_PARSER->SetHotkey(currAct.hotkeyString, hk.toStdWString()[0]);
break;
}

break;
}
break;
}
}

Expand Down

0 comments on commit 2d87504

Please sign in to comment.