P1X-in / tanks-of-freedom-ii

Indie Turn Based Strategy in Isometric Voxel Art http://tof.p1x.in
Other
194 stars 19 forks source link

Added global types to GameBoard, Map and autoloads #24

Closed dfgworm closed 2 months ago

dfgworm commented 2 months ago

I used ctrl+shift+R for all changes here, overall it did not take much time. Did exactly 3 things here:

  1. Replaced all preload with load.
  2. Changed most (maybe all?) autoload singleton calls to their static versions. This step required a bit of attention in Settings and MouseLayer singletons due to similarly named variables. Also had to fix some self.map.X calls that were used to access these singletons.
  3. Changed some classes used by Map and Gameboard to global classes and added direct reference to Map/Gameboard class inside them.

(Plus, i also disabled type warnings for now, since they create a lot of messages)

Game launches without any problems.