multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.32k stars 411 forks source link

Allow differentiating custom-level debug messages #3443

Open bum8hj opened 3 weeks ago

bum8hj commented 3 weeks ago

Is your feature request related to a problem? Please describe.

Debug level 3 shows all errors, warnings, info, and custom messages. This can make the debug box quite messy and annoying if you don't care about some warnings and certain info messages.

Describe the solution you'd like

Allow using levels higher than 4 for outputDebugString With this change, the custom level can be used in setPlayerScriptDebugLevel to show only messages of that level.

Describe alternatives you've considered

Another suggestion/solution on top of the above solution would be to make 'errors', 'warnings', and 'info' independent of each other when setting the player's debug level.

For example, if I could view only messages of types: error + all custom, or error + custom level 5.

However, I understand that this might make matters more confusing and counterintuitive. Maybe with the "right implementation" it can be near perfect, but I didn't think about it hard enough...yet

Additional context

No response

Security Policy

TracerDS commented 3 weeks ago

I think we could make a backwards incompatible change with bit values. Would be better and cleaner in the end but also backwards incompatible