Do you keep buffs if you remove GTS?

In XCOM 2 you can buy buffs to increase soldiers abilities via the Guriella Tactics School. If you remove that facility do the benefits remain?


Solution 1:

Looking at the code, destroying the GTS will temporarily disable any unlocks until it is rebuilt somewhere else.

// X2StrategyElement_DefaultFacilities.uc
static function OnGTSRemoved(StateObjectReference FacilityRef)
{
    local XComGameState NewGameState;
    local XComGameState_HeadquartersXCom NewXComHQ;

    EmptyFacilityProjectStaffSlots(FacilityRef);

    NewGameState = class'XComGameStateContext_ChangeContainer'.static.CreateChangeState("On Guerrilla Tactics School Removed");
    RemoveFacility(NewGameState, FacilityRef, NewXComHQ);
    NewXComHQ.ClearSoldierUnlockTemplates();

    `XCOMGAME.GameRuleset.SubmitGameState(NewGameState);
}

// XComGameState_HeadquartersXCom.uc
function ClearSoldierUnlockTemplates()
{
    // Saved the list in case the GTS is rebuilt, then clear it
    SavedSoldierUnlockTemplates = SoldierUnlockTemplates;
    SoldierUnlockTemplates.Length = 0;
}

And it is being used like this

// UISquadSelect.uc
simulated function bool UnlockedExtraSlot1()
{
    return XComHQ.SoldierUnlockTemplates.Find('SquadSizeIUnlock') != INDEX_NONE;
}