ositools
ositools copied to clipboard
Improve global debug functions
This pull request makes minor improvements to the existing global debug functions:
-
_C()
has been rewritten on the client to usePlayerManager
and 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 theEclItem
equipped - All these global functions (
_C
,_W
,_E
,_P
,_D
,_DS
) have been added to the IDE helpers. They are marked with@deprecated
so 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 the PlayerManager
is 2.