diff --git a/Tactical/Handle Doors.cpp b/Tactical/Handle Doors.cpp index d82b62f3..4814a8ab 100644 --- a/Tactical/Handle Doors.cpp +++ b/Tactical/Handle Doors.cpp @@ -386,6 +386,13 @@ void InteractWithOpenableStruct( SOLDIERTYPE *pSoldier, STRUCTURE *pStructure, U // Pull Up Menu if ( !fTrapsFound ) { + // In autobandage mode, assuming no traps are found, try to automatically unlock the door. If we can't, then we can't + if (gTacticalStatus.fAutoBandageMode) + { + AttemptToUnlockDoor( pSoldier, pDoor); + return; + } + InitDoorOpenMenu( pSoldier, pStructure, ubDirection, FALSE ); } else diff --git a/Tactical/Interface.cpp b/Tactical/Interface.cpp index 596f95a2..6c1416aa 100644 --- a/Tactical/Interface.cpp +++ b/Tactical/Interface.cpp @@ -2161,6 +2161,12 @@ BOOLEAN InitDoorOpenMenu( SOLDIERTYPE *pSoldier, STRUCTURE *pStructure, UINT8 ub INT16 sHeight, sWidth; INT16 sScreenX, sScreenY; + // Can't bring up this menu if in autobandage mode + if (gTacticalStatus.fAutoBandageMode) + { + return FALSE; + } + // Erase other menus.... EraseInterfaceMenus( TRUE ); diff --git a/TacticalAI/DecideAction.cpp b/TacticalAI/DecideAction.cpp index ca3d906a..35cead57 100644 --- a/TacticalAI/DecideAction.cpp +++ b/TacticalAI/DecideAction.cpp @@ -1528,7 +1528,19 @@ INT8 DecideActionYellow(SOLDIERTYPE *pSoldier) // However, civilians with no profile (and likely no weapons) do not need to be seeking out noises. Most don't // even have the body type for it (can't climb or jump). //if ( !( pSoldier->bTeam == CIV_TEAM && pSoldier->ubProfile != NO_PROFILE && pSoldier->ubProfile != ELDIN ) ) - if ( pSoldier->bTeam != CIV_TEAM || ( pSoldier->ubProfile != NO_PROFILE && pSoldier->ubProfile != ELDIN ) ) + //if ( pSoldier->bTeam != CIV_TEAM || ( !pSoldier->bNeutral && pSoldier->ubProfile != ELDIN ) ) + // ADB: Eldin is the only neutral civilian who should be seeking out noises. As the museum curator, he can be + // available to talk to. As the night watchman, he needs to look for thieves. + bool onCivTeam = (pSoldier->bTeam == CIV_TEAM); + bool isNamedCiv = (pSoldier->ubProfile != NO_PROFILE); + bool isEldin = (pSoldier->ubProfile == ELDIN);//logically flipped from the original, isNotEldin == false is confusing + // For purpose of seeking noise, cowardly civs are neutral, even if attacked by your thugs + bool isNeutral = pSoldier->bNeutral || pSoldier->uiStatusFlags & SOLDIER_COWERING; + if ( + (onCivTeam == false) || //true #1 + (onCivTeam == true && isNamedCiv == true && isNeutral == false) || //true #2 + (onCivTeam == true && isEldin == true)//true #3 + ) { // IF WE ARE MILITIA/CIV IN REALTIME, CLOSE TO NOISE, AND CAN SEE THE SPOT WHERE THE NOISE CAME FROM, FORGET IT if ( fReachable && !fClimb && !gfTurnBasedAI && (pSoldier->bTeam == MILITIA_TEAM || pSoldier->bTeam == CIV_TEAM )&& PythSpacesAway( pSoldier->sGridNo, sNoiseGridNo ) < 5 )