Improve global debug functions #101
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request makes minor improvements to the existing global debug functions:
_C()has been rewritten on the client to usePlayerManagerand now takes the player index as an optional parameter, allowing it to be used to fetch the player 2's character in local co-op. In addition it now works while in the controller UI (which it previously didn't as it relied on KB+M UIs)_W()has been implemented on the client, returning theEclItemequipped_C,_W,_E,_P,_D,_DS) have been added to the IDE helpers. They are marked with@deprecatedso as to trigger an IDE warning with a message stating they should not be left in mod releases. One could argue that these functions should not be present in the IDE helpers - but I thought it would offer users a way to learn about them that doesn't involve browsing the source code.Note: I have not actually tested using
_C(2)to fetch player 2's character as I currently do not have a second controller to test splitscreen stuff. It should work if player 2's index in thePlayerManageris 2.