diff --git a/X2WOTCCommunityHighlander/Config/XComGame.ini b/X2WOTCCommunityHighlander/Config/XComGame.ini index 8c32dbe5b..2d34cfa52 100644 --- a/X2WOTCCommunityHighlander/Config/XComGame.ini +++ b/X2WOTCCommunityHighlander/Config/XComGame.ini @@ -297,3 +297,6 @@ iMixedCharacterPoolChance = 50 ;;; Issue #1398 - Change to adjust the delay of the 'Squad member dead' voiceline after a unit is killed fSquadMemberDeadVoicelineDelay = 3.0f + +; Issue #1453 - Uncomment to disable automatic photobooth poster generation (when set, only photos manually taken by the player will be saved) +;bDisableAutomaticPhotos = true diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/CHHelpers.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/CHHelpers.uc index f5ca4e042..09c67438a 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/CHHelpers.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/CHHelpers.uc @@ -267,6 +267,9 @@ var config bool bForce24hclockLeadingZero; // Variable for Issue #1398 - Number of seconds to wait after a unit is killed before playing the 'OnSquadMemberDead' voiceline var config float fSquadMemberDeadVoicelineDelay; +// Variable for Issue #1453 +var config bool bDisableAutomaticPhotos; + // Start Issue #885 enum EHLDelegateReturn { diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIAfterAction.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIAfterAction.uc index 91b1fbe6b..3b4284e89 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIAfterAction.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIAfterAction.uc @@ -1443,7 +1443,14 @@ function LoadPhotoboothAutoGenDeadSoldiers() Unit = XComGameState_Unit(`XCOMHISTORY.GetGameStateForObjectID(XComHQ.Squad[SquadIndex].ObjectID)); // Check for high ranking soldier death, - if (!Unit.bCaptured && Unit.IsDead() && Unit.GetSoldierRank() >= 3) + // Single Line for Issue #1453 - Additional config gate to disable automatic memorial photo + /// HL-Docs: feature:DisableAutoPhotobooth; issue:1453; tags:strategy,tactical + /// Several places in the game (UIAfterAction, XComHQPresentationLayer, UISoldierBondConfirmScree and UIMissionSummary) + /// request the auto-generation of photos for the photobooth. Such photos are coded to be taken when the user doesn't take + /// a photo manually at the end of a mission, when a soldier above Sergeant rank dies, when a soldier is promoted to Sergeant + /// or Major rank and when two soldiers are bonded. The auto-photos are usually of poor quality and the ability to disable + /// them is a useful feature for modders. + if (!Unit.bCaptured && Unit.IsDead() && Unit.GetSoldierRank() >= 3 && !class'CHHelpers'.default.bDisableAutomaticPhotos) { `HQPRES.GetPhotoboothAutoGen().AddDeadSoldier(Unit.GetReference()); bRequestAdded = true; diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIMissionSummary.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIMissionSummary.uc index ec796b55a..c42b02af5 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIMissionSummary.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UIMissionSummary.uc @@ -731,7 +731,8 @@ simulated function CloseScreenTakePhoto() { bClosingScreen = true; - if (!BattleData.IsMultiplayer() && !bAllSoldiersDead && !bUserPhotoTaken) + // Single Line for Issue #1453 - Additional config gate to disable automatic mission-end photo + if (!BattleData.IsMultiplayer() && !bAllSoldiersDead && !bUserPhotoTaken && !class'CHHElpers'.default.bDisableAutomaticPhotos) { NavHelp.ContinueButton.DisableButton(); diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UISoldierBondConfirmScreen.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UISoldierBondConfirmScreen.uc index 72517cb82..86678ab7d 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/UISoldierBondConfirmScreen.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/UISoldierBondConfirmScreen.uc @@ -199,8 +199,12 @@ function ConfirmClicked(UIButton Button) // Ask the player if they want to make a poster when forming the first bond if (BondData.BondLevel == 0) { - KickOffAutoGen(); - + // Begin Issue #1453 - Config gate to disable auto-generation of soldier bond photo + if(!class'CHHelpers'.default.bDisableAutomaticPhotos) + { + KickOffAutoGen(); + } + // End Issue #1453 DialogData.eType = eDialog_Normal; DialogData.bMuteAcceptSound = true; DialogData.strTitle = m_strMakePosterTitle; diff --git a/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComHQPresentationLayer.uc b/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComHQPresentationLayer.uc index ade454ec9..a9b613caf 100644 --- a/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComHQPresentationLayer.uc +++ b/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComHQPresentationLayer.uc @@ -1450,7 +1450,8 @@ function UIArmory_Promotion(StateObjectReference UnitRef, optional bool bInstant // Check for rank up to Sergeant or Major bValidRankUp = (PreviousRank < 3 && Unit.GetSoldierRank() >= 3) || (PreviousRank < 6 && Unit.GetSoldierRank() >= 6); - if (!Unit.bCaptured && Unit.IsAlive() && bValidRankUp) + // Single Line for Issue #1453 - Additional config gate to disable auto-generation of promotion photo + if (!Unit.bCaptured && Unit.IsAlive() && bValidRankUp && !class'CHHelpers'.default.bDisableAutomaticPhotos) { `HQPRES.GetPhotoboothAutoGen().AddPromotedSoldier(Unit.GetReference()); `HQPRES.GetPhotoboothAutoGen().RequestPhotos();