GDQuest / godot-steering-ai-framework

A complete framework for Godot to create beautiful and complex AI motion. Works both in 2D and in 3D.
http://gdquest.com/docs/godot-steering-ai-framework
MIT License
1.17k stars 81 forks source link

Rename parameters and add discard pattern vars #29

Closed Razoric480 closed 4 years ago

Razoric480 commented 4 years ago

The framework currently produces a lot of warnings regarding shadowed variables and unused return values. Individually, it's only 0-3, but if you start to have quite a few of those behaviors floating around, they'll all start chiming in.

They're harmless because we accounted for them with use of self or just ignoring them, but in Harvester, for example, there's some 40 warnings and only a portion of them come from the game itself rather than the framework.

For unused return values, just the discard pattern is fine.

However, for shadowed variables, right now I added underscores to differentiate them, because I struggled to come up with meaningful names to replace them by. It's not that great a naming scheme, so I'd be looking for second opinions.

NathanLovato commented 4 years ago

For most warnings you want to keep active, the way to handle them is to add comments:

# warning-ignore:warning_id

I messed up your work so I'll rebase and merge now

NathanLovato commented 4 years ago

Okay it's gonna be easier to redo than to merge, I'll do that now. Sorry for that