Skip to content

Commit

Permalink
Merge pull request #1990 from ShishkinP/assignment-inventory-enhancement
Browse files Browse the repository at this point in the history
Put the content of the primary hand in the secondary (not a pocket) when assigning doctor/repair tasks
  • Loading branch information
lynxlynxlynx committed May 15, 2024
2 parents 5d0e47a + 8d0b106 commit ebcdbc0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/game/Strategic/Assignments.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3332,6 +3332,10 @@ static void MakeSureToolKitIsInHand(SOLDIERTYPE* pSoldier)
if( pSoldier -> inv[ bPocket ].usItem == TOOLKIT )
{
SwapObjs( &pSoldier -> inv[ HANDPOS ], &pSoldier -> inv[ bPocket ] );
if (pSoldier->inv[SECONDHANDPOS].usItem == NOTHING && pSoldier->inv[bPocket].usItem != NOTHING)
{
SwapObjs(&pSoldier->inv[SECONDHANDPOS], &pSoldier->inv[bPocket]);
}
break;
}
}
Expand All @@ -3358,6 +3362,10 @@ static BOOLEAN MakeSureMedKitIsInHand(SOLDIERTYPE* pSoldier)
{
fCharacterInfoPanelDirty = TRUE;
SwapObjs( &pSoldier -> inv[ HANDPOS ], &pSoldier -> inv[ bPocket ] );
if (pSoldier->inv[SECONDHANDPOS].usItem == NOTHING && pSoldier->inv[bPocket].usItem != NOTHING)
{
SwapObjs(&pSoldier->inv[SECONDHANDPOS], &pSoldier->inv[bPocket]);
}
return(TRUE);
}
}
Expand Down

0 comments on commit ebcdbc0

Please sign in to comment.