Metroidvania-System icon indicating copy to clipboard operation
Metroidvania-System copied to clipboard

Change MetSysModule game variable to _game?

Open naturally-intelligent opened this issue 1 year ago • 1 comments

This is more of a request than an issue, but wanted to discuss feasibility here

Can we change MetSysModule.game to MetSysModule._game?

We have a global autoload called "game" that is conflicting with it. And when we make our own modules we want to use that global variable... so it's confusing! I've changed it in our own copy so it's not a deal-breaking issue. But going forward I do worry about upgrading and having to redo the changes.

Obviously I wouldnt request this just based on our situation, but maybe for best practice it should should be "_game" anyways even without our issue?

naturally-intelligent avatar Oct 31 '24 15:10 naturally-intelligent

I could call it _game if it was a "private" variable, but it's supposed to be used by modules, so current name is better. Maybe you can rename the singleton instead? Using lowercase name for a singleton seems strange to me 🤔

KoBeWi avatar Nov 02 '24 12:11 KoBeWi