This PR fixes the objectives displayed on the watch.
Previously the watch would display the mainObjectiveand mainSubObjective.
As of writing these ultimately get added to progressions, along with any other progression objectives, so we just display all the progressions.
All the information normally visible in the upper-left corner of the screen should now be visible on the watch, including things like key names and uplink IP addresses.
Ultimately we just iterate through PUI_GameObjectives.m_progressionObjectives. The problem lies in getting the correct instance of PUI_GameObjectives, and knowing when to check it for changes.
As before, PlayerGuiLayer.UpdateObjectives() is patched to intercept when the main objective changes.
Unfortunately, its other objective-updated functions are not called when you would expect them to be, and most notably PlayerGuiLayer.SetProgressionObjective() is never called.
Since PlayerGuiLayer.SetProgressionObjective() is never called we are kind of stuck with patching PUI_GameObjectives.SetProgressionObjective() and its brother PUI_GameObjectives.RemoveProgressionObjective() instead, but there are multiple instances of PUI_GameObjectives, and some are either empty or don't list the same set of objectives.
We store an reference to the relevant instance of PUI_GameObjectives() before PlayerGuiLayer.UpdateObjectives(), and only execute the above patches if they are called by the same instance.
Details
The text was made slightly transparent, as otherwise it glows brightly and all the colors appear pure white.
\<Indent> is removed from the text as it breaks the formatting.
There are 3 "layers" of objectives, presumably corresponding to main, secondary, and overload.
I'm fairly sure the objectives are just swapped out wholesale for different layers, so secondary and overload objectives shouldn't break anything.
What?
This PR fixes the objectives displayed on the watch.
Previously the watch would display the
mainObjective
andmainSubObjective
. As of writing these ultimately get added toprogressions
, along with any other progression objectives, so we just display all the progressions.All the information normally visible in the upper-left corner of the screen should now be visible on the watch, including things like key names and uplink IP addresses.
https://i.imgur.com/Zm4Hrxx.jpg https://i.imgur.com/K2OkJJv.jpg https://i.imgur.com/64GOnmB.jpg
How?
Ultimately we just iterate through
PUI_GameObjectives.m_progressionObjectives
. The problem lies in getting the correct instance ofPUI_GameObjectives
, and knowing when to check it for changes.As before,
PlayerGuiLayer.UpdateObjectives()
is patched to intercept when the main objective changes. Unfortunately, its other objective-updated functions are not called when you would expect them to be, and most notablyPlayerGuiLayer.SetProgressionObjective()
is never called.Since
PlayerGuiLayer.SetProgressionObjective()
is never called we are kind of stuck with patchingPUI_GameObjectives.SetProgressionObjective()
and its brotherPUI_GameObjectives.RemoveProgressionObjective()
instead, but there are multiple instances ofPUI_GameObjectives
, and some are either empty or don't list the same set of objectives.We store an reference to the relevant instance of
PUI_GameObjectives()
beforePlayerGuiLayer.UpdateObjectives()
, and only execute the above patches if they are called by the same instance.Details
The text was made slightly transparent, as otherwise it glows brightly and all the colors appear pure white. \<Indent> is removed from the text as it breaks the formatting.
There are 3 "layers" of objectives, presumably corresponding to main, secondary, and overload. I'm fairly sure the objectives are just swapped out wholesale for different layers, so secondary and overload objectives shouldn't break anything.