Skip to content

Commit

Permalink
- Fixed engine not being tracked, reduced logging
Browse files Browse the repository at this point in the history
  • Loading branch information
IceRaptor committed Jan 28, 2020
1 parent ab16a02 commit 9598355
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions SkillBasedInit/SkillBasedInit/objects/ActorInitiative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ public ActorInitiative(AbstractActor actor) {
int componentsMod = UnitHelper.GetNormalizedComponentModifier(actor);

// Modifier from the engine
// TODO: FIX WHEN CC IS BACK?
//int engineMod = UnitHelper.GetEngineModifier(actor);
int engineMod = 0;
int engineMod = UnitHelper.GetEngineModifier(actor);

// --- PILOT IMPACTS ---
Pilot pilot = actor.GetPilot();
Expand Down
8 changes: 4 additions & 4 deletions SkillBasedInit/SkillBasedInit/patches/UI/HUDPhaseTrack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,18 @@ public static bool Prefix(CombatHUDPhaseTrack __instance, CombatHUDIconTracker t

int[] bounds = PhaseHelper.CalcPhaseIconBounds(___currentPhase);
int phaseAsInit = (Mod.MaxPhase + 1) - phase;
Mod.Log.Info($"Phase {phase} is init {phaseAsInit} within currentPhase: {___currentPhase} with bounds: {bounds[0]}-{bounds[4]}");
Mod.Log.Trace($"Phase {phase} is init {phaseAsInit} within currentPhase: {___currentPhase} with bounds: {bounds[0]}-{bounds[4]}");

if (phaseAsInit > bounds[1]) {
Mod.Log.Info($" -- Phase icon is higher than {bounds[1]}, setting to P phase.");
Mod.Log.Trace($" -- Phase icon is higher than {bounds[1]}, setting to P phase.");
___PhaseIcons[0].AddIconTrackerToPhase(tracker);
} else if (phaseAsInit < bounds[3]) {
Mod.Log.Info($" -- Phase icon is higher than {bounds[3]}, setting to F phase.");
Mod.Log.Trace($" -- Phase icon is higher than {bounds[3]}, setting to F phase.");
___PhaseIcons[4].AddIconTrackerToPhase(tracker);
} else {
for (int i = 0; i < 5; i++) {
if (bounds[i] == phaseAsInit) {
Mod.Log.Info($" -- Setting phase icon for phaseAsInit: {phaseAsInit} / bounds: {bounds[i]} at index {i}");
Mod.Log.Trace($" -- Setting phase icon for phaseAsInit: {phaseAsInit} / bounds: {bounds[i]} at index {i}");
___PhaseIcons[i].AddIconTrackerToPhase(tracker);
}
}
Expand Down

0 comments on commit 9598355

Please sign in to comment.