Skip to content

Commit

Permalink
Remove debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pledbrook committed Aug 9, 2019
1 parent 4ecfcfe commit fc33a8c
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ event Activated()

function ModifyKismetGameState(out XComGameState GameState)
{
// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: SeqAct_SpawnDelayedEvacZone - start ModifyKismetGameState");
// END

class'XComGameState_LWEvacSpawner'.static.InitiateEvacZoneDeployment(TurnsRemaining, ActualSpawnLocation, GameState, SkipCreationNarrative);
}

Expand All @@ -55,10 +51,6 @@ private function Vector GetSpawnLocation()
local float SpawnDot;
local TTile Tile;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: SeqAct_SpawnDelayedEvacZone - start GetSpawnLocation");
// END

if(MinimumTilesFromLocation < 0 && MaximumTilesFromLocation < 0)
{
// simple case, this isn't a ranged check and we just want to use the exact location
Expand Down Expand Up @@ -131,10 +123,6 @@ private function Vector GetSpawnLocation()
}
}

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: SeqAct_SpawnDelayedEvacZone - end GetSpawnLocation");
// END

// random pick
return SpawnsInRange[`SYNC_RAND(SpawnsInRange.Length)].Location;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ function EventListenerReturn OnTileDataChanged(Object EventData, Object EventSou
{
NewGameState = class'XComGameStateContext_ChangeContainer'.static.CreateChangeState("Invalidating Delayed Evac Zone");

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: UIScreenListener_TacticalHUD - pre cooldown update");
// END

// update the cooldown on the player
NewPlayerState = class'Utilities_LW'.static.FindPlayer(eTeam_XCom);
if (NewPlayerState.GetCooldown('PlaceDelayedEvacZone') > 0)
Expand All @@ -178,10 +174,6 @@ function EventListenerReturn OnTileDataChanged(Object EventData, Object EventSou
NewGameState.AddStateObject(NewPlayerState);
}

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: UIScreenListener_TacticalHUD - post cooldown update");
// END

// update the evac zone
EvacState = XComGameState_LWEvacSpawner(NewGameState.CreateStateObject(class'XComGameState_LWEvacSpawner', EvacState.ObjectID));
EvacState.ResetCountdown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,6 @@ function OpenInfiltrationMissionScreen()
{
local UIMission_LWLaunchDelayedMission MissionScreen;
local XComHQPresentationLayer HQPres;
// WOTC DEBUGGING
`LWTrace(">> Launching delayed mission UI");
// END
HQPres = `HQPRES;
MissionScreen = HQPres.Spawn(class'UIMission_LWLaunchDelayedMission', HQPres);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ simulated function XComGameState PlaceDelayedEvacZone_BuildGameState(XComGameSta

History = `XCOMHISTORY;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: X2Ability_PlaceDelayedEvacZone - start building game state");
// END

NewGameState = History.CreateNewGameState(true, Context);

AbilityContext = XComGameStateContext_Ability(NewGameState.GetContext());
Expand All @@ -174,9 +170,5 @@ simulated function XComGameState PlaceDelayedEvacZone_BuildGameState(XComGameSta
Delay = GetEvacDelay();
class'XComGameState_LWEvacSpawner'.static.InitiateEvacZoneDeployment(Delay, SpawnLocation, NewGameState);

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: X2Ability_PlaceDelayedEvacZone - finish building game state");
// END

return NewGameState;
}
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,6 @@ static function AddObjectivesToParcels()
local XComParcelManager ParcelMgr;
local PlotDefinition PlotDef;
local int i, j, k;
local string Tag; // WOTC DEBUGGING

// Go over the plot list and add new objectives to certain plots.
ParcelMgr = `PARCELMGR;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,10 +410,6 @@ static function EventListenerReturn OnBlackMarketGoodsReset(Object EventData, Ob
History = `XCOMHISTORY;
bStartState = (NewGameState.GetContext().IsStartState());

// WOTC DEBUGGING:
`LWTrace(" >> Processing Black Market goods");
// END

StratMgr = class'X2StrategyElementTemplateManager'.static.GetStrategyElementTemplateManager();
BlackMarket.ForSaleItems.Length = 0;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ static function bool OverrideFinalHitChance(X2AbilityToHitCalc AbilityToHitCalc,
local ToHitAdjustments Adjustments;
local ShotModifierInfo ModInfo;

// LWOTC DEBUGGING
`Log(" >>> OverrideFinalHitChance event fired");
// END

StandardAim = X2AbilityToHitCalc_StandardAim(AbilityToHitCalc);
if (StandardAim == none)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ class X2MissionNarrative_LWNarrativeSet extends X2MissionNarrative;
static function array<X2DataTemplate> CreateTemplates()
{
local array<X2MissionNarrativeTemplate> Templates;
// WOTC DEBUGGING:
`Log(">>> Creating mission narrative templates...");
// END

//recreation of base-game mission narratives for LW-specific variations
Templates.AddItem(AddDefaultRecoverMissionNarrativeTemplate_LW());
Templates.AddItem(AddDefaultRecover_ADVMissionNarrativeTemplate_LW());
Expand Down Expand Up @@ -55,9 +53,6 @@ static function array<X2DataTemplate> CreateTemplates()
Templates.AddItem(AddDefaultSupplyConvoyMissionNarrativeTemplate());
Templates.AddItem(AddDefaultRecruitRaidMissionNarrativeTemplate());
Templates.AddItem(AddDefaultSmashNGrabMissionNarrativeTemplate());
// WOTC DEBUGGING:
`Log(">>> Done");
// END

return Templates;
}
Expand Down
6 changes: 0 additions & 6 deletions LongWarOfTheChosen/Src/LW_Overhaul/Classes/X2MissionSet_LW.uc
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ class X2MissionSet_LW extends X2MissionSet;
static function array<X2DataTemplate> CreateTemplates()
{
local array<X2MissionTemplate> Templates;
// WOTC DEBUGGING:
`Log(">>> Creating mission templates...");
// END

// Add LW variants of missions for re-definition without obliterating Mission.ini
Templates.AddItem(AddMissionTemplate('RecoverItem_LW'));
Expand Down Expand Up @@ -53,9 +50,6 @@ static function array<X2DataTemplate> CreateTemplates()
Templates.AddItem(AddMissionTemplate('IntelRaid_LW'));
Templates.AddItem(AddMissionTemplate('SupplyConvoy_LW'));
Templates.AddItem(AddMissionTemplate('RecruitRaid_LW'));
// WOTC DEBUGGING:
`Log(">>> Done");
// END

return Templates;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,8 @@ var public localized String m_strFacilityDestroyed;
static function array<X2DataTemplate> CreateTemplates()
{
local array<X2DataTemplate> MissionSources;
// WOTC DEBUGGING:
`Log(">>> Creating mission source templates...");
// END

MissionSources.AddItem(CreateGenericMissionSourceTemplate());
// WOTC DEBUGGING:
`Log(">>> Done");
// END

return MissionSources;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ function EventListenerReturn OnEvacSpawnerCreated(Object EventData, Object Event
{
local XComGameState NewGameState;
local XComGameState_LWEvacSpawner NewSpawnerState;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - start OnEvacSpawnerCreated");
// END

// Set up visualization to drop the flare.
NewGameState = class'XComGameStateContext_ChangeContainer'.static.CreateChangeState(string(GetFuncName()));
Expand All @@ -52,10 +48,6 @@ function EventListenerReturn OnEvacSpawnerCreated(Object EventData, Object Event
NewSpawnerState.SpawnEvacZone();
}

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - end OnEvacSpawnerCreated");
// END

return ELR_NoInterrupt;
}

Expand All @@ -68,10 +60,6 @@ function BuildVisualizationForSpawnerCreation(XComGameState VisualizeGameState)
local X2Action_PlayEffect EvacSpawnerEffectAction;
local X2Action_PlayNarrative NarrativeAction;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - start BuildVisualizationForSpawnerCreation");
// END

History = `XCOMHISTORY;
EvacSpawnerState = XComGameState_LWEvacSpawner(History.GetGameStateForObjectID(ObjectID));

Expand All @@ -93,10 +81,6 @@ function BuildVisualizationForSpawnerCreation(XComGameState VisualizeGameState)
NarrativeAction.Moment = XComNarrativeMoment(DynamicLoadObject(EvacRequestedNarrativePathName, class'XComNarrativeMoment'));
NarrativeAction.WaitForCompletion = false;
}

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - end BuildVisualizationForSpawnerCreation");
// END
}

// Countdown complete: time to spawn the evac zone.
Expand All @@ -106,10 +90,6 @@ function SpawnEvacZone()
local X2EventManager EventManager;
local Object ThisObj;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - start SpawnEvacZone");
// END

EventManager = `XEVENTMGR;

// Set up visualization of the new evac zone.
Expand All @@ -125,31 +105,19 @@ function SpawnEvacZone()
EventManager.TriggerEvent('SpawnEvacZoneComplete', ThisObj, ThisObj, NewGameState);

`TACTICALRULES.SubmitGameState(NewGameState);

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - end SpawnEvacZone");
// END
}

// Evac zone has spawned. We can now clean ourselves up as this state object is no longer needed.
function EventListenerReturn OnSpawnEvacZoneComplete(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackData)
{
local XComGameState NewGameState;
local XComGameState_LWEvacSpawner NewSpawnerState;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - start OnSpawnEvacZoneComplete");
// END

NewGameState = class'XComGameStateContext_ChangeContainer'.static.CreateChangeState("Spawn Evac Zone Complete");
NewSpawnerState = XComGameState_LWEvacSpawner(NewGameState.CreateStateObject(class'XComGameState_LWEvacSpawner', ObjectID));
NewSpawnerState.ResetCountdown();
NewGameState.AddStateObject(NewSpawnerState);
`TACTICALRULES.SubmitGameState(NewGameState);

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - end OnSpawnEvacZoneComplete");
// END

return ELR_NoInterrupt;
}
Expand All @@ -158,10 +126,6 @@ function BuildVisualizationForFlareDestroyed(XComGameState VisualizeState)
{
local X2Action_PlayEffect EvacSpawnerEffectAction;
local VisualizationActionMetadata BuildTrack;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - start BuildVisualizationForFlareDestroyed");
// END

EvacSpawnerEffectAction = X2Action_PlayEffect(class'X2Action_PlayEffect'.static.AddToVisualizationTree(BuildTrack, VisualizeState.GetContext(), false, BuildTrack.LastActionAdded));
EvacSpawnerEffectAction.EffectName = FlareEffectPathName;
Expand All @@ -172,10 +136,6 @@ function BuildVisualizationForFlareDestroyed(XComGameState VisualizeState)

BuildTrack.StateObject_OldState = self;
BuildTrack.StateObject_NewState = self;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - end BuildVisualizationForFlareDestroyed");
// END
}

// Visualize the evac spawn: turn off the flare we dropped as a countdown visualizer and visualize the evac zone dropping.
Expand All @@ -188,10 +148,6 @@ function BuildVisualizationForEvacSpawn(XComGameState VisualizeState)
local XComGameState_LWEvacSpawner EvacSpawnerState;
local X2Action_PlayEffect EvacSpawnerEffectAction;
local X2Action_PlayNarrative NarrativeAction;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - start BuildVisualizationForEvacSpawn");
// END

History = `XCOMHISTORY;

Expand Down Expand Up @@ -224,10 +180,6 @@ function BuildVisualizationForEvacSpawn(XComGameState VisualizeState)
NarrativeAction = X2Action_PlayNarrative(class'X2Action_PlayNarrative'.static.AddToVisualizationTree(BuildTrack, VisualizeState.GetContext(), false, BuildTrack.LastActionAdded));
NarrativeAction.Moment = XComNarrativeMoment(DynamicLoadObject(FirebrandArrivedNarrativePathName, class'XComNarrativeMoment'));
NarrativeAction.WaitForCompletion = false;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - end BuildVisualizationForEvacSpawn");
// END
}

function InitEvac(int Turns, vector Loc)
Expand All @@ -249,10 +201,6 @@ static function InitiateEvacZoneDeployment(
local XComGameState NewGameState;
local X2EventManager EventManager;
local Object EvacObj;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - start InitiateEvacZoneDeployment");
// END

EventManager = `XEVENTMGR;

Expand All @@ -269,18 +217,10 @@ static function InitiateEvacZoneDeployment(
if (NewEvacSpawnerState != none)
{
NewEvacSpawnerState = XComGameState_LWEvacSpawner(NewGameState.ModifyStateObject(class'XComGameState_LWEvacSpawner', NewEvacSpawnerState.ObjectID));

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - Modifying existing evac spawner");
// END
}
else
{
NewEvacSpawnerState = XComGameState_LWEvacSpawner(NewGameState.CreateNewStateObject(class'XComGameState_LWEvacSpawner'));

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - Creating new evac spawner");
// END
}

// Clean up any existing evac zone.
Expand All @@ -305,10 +245,6 @@ static function InitiateEvacZoneDeployment(
{
`TACTICALRULES.SubmitGameState(NewGameState);
}

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - end InitiateEvacZoneDeployment");
// END
}

// Nothing to do here.
Expand All @@ -322,10 +258,6 @@ function SyncVisualizer(optional XComGameState GameState = none)
function AppendAdditionalSyncActions(out VisualizationActionMetadata ActionMetadata)
{
local X2Action_PlayEffect PlayEffect;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - start AppendAdditionalSyncActions");
// END

PlayEffect = X2Action_PlayEffect(class'X2Action_PlayEffect'.static.AddToVisualizationTree(ActionMetadata, GetParentGameState().GetContext(), false, ActionMetadata.LastActionAdded));

Expand All @@ -334,10 +266,6 @@ function AppendAdditionalSyncActions(out VisualizationActionMetadata ActionMetad
PlayEffect.EffectLocation = SpawnLocation;
PlayEffect.CenterCameraOnEffectDuration = 0;
PlayEffect.bStopEffect = false;

// WOTC DEBUGGING:
`LWTrace("PlaceDelayedEvacZone debugging: XCGS_LWEvacSpawner - end AppendAdditionalSyncActions");
// END
}

function int GetCountdown()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ function EventListenerReturn OnAlienTurnBegin(Object EventData, Object EventSour
AlertLevel = `ALERT_LEVEL_YELLOW;
}

// WOTC DEBUGGING:
`Log(">>> Starting alien turn at alert level " $ AlertLevel);
// END

// Don't activate pod mechanics until both we have an alert activation on a pod
// and the squad isn't concealed.
if (AlertLevel == `ALERT_LEVEL_GREEN || XComPlayer.bSquadIsConcealed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ function bool IsEffectCurrentlyRelevant(XComGameState_Effect EffectState, XComGa
local bool Relevant;

Relevant = (ComputePctHPLost(TargetUnit) > 0.0f) && IsRedFogActive(TargetUnit);
// LWOTC DEBUGGING
`LOG("X2Effect_RedFog: Unit=" $ TargetUnit.GetFullName() $ ", Relevant=" $ Relevant $ ", PctLost=" $ ComputePctHPLost(TargetUnit),, 'LW_Toolbox');
// END
return Relevant;
}

Expand Down

0 comments on commit fc33a8c

Please sign in to comment.