Dramatic changes

For announcing, describing and discussing code changes to BNT.

Post Reply
Posts: 94
Joined: Sat Apr 19, 2014 22:32 UTC

Dramatic changes

Post by thekabal » Mon May 12, 2014 04:52 UTC

Check out todays change log entries.. I've been busy!

Change "HandleFuelScoop" to BntMove::calcFuelScooped, in classes directory
Move database configuration include from global includes to inside the database class & init method itself. And then there were three (global_includes left)..
Switch all functions out of Planet report ce, and into BadPlanetReportCE class
Move functions out of log.php, and into BadLog
Move functions out of planet_report.php, and into BadPlanetReport
Move functions out of traderoute.php, and into BadTraderoute
Eliminate footer.php, replace with BadFooter::display class & method
Eliminate header.php, replace with BntHeader::display class & method

That is right - there is no header.php or footer.php any more!

This brings us down to just 108 include/include_once/require/require_once calls left.

Check_fighters (5), check_mines (3), and sector_fighters (4) will be converted to classes, but they will take a while, as it will take a bunch of testing to determine all the variables needed to pass to them.

admin_config.php will be moved into a single class call, which should reduce them down from 5 to 1.

global_includes (68) will be with us until we switch to a router pattern (long ways away, if at all).

The error handler (17) will be eliminated from CU, admin, and scheduler by switching them to be class driven.

Admin, create universe, and scheduler will be redone to be class-driven, and those will bring another 14.

There are some duplicates, so that looks like a negative number, but in the end it will be just a handful of include/include_once/require/require_once calls left.

This also helped reduce the number of global variables calls down to just 131, which we are also aiming to get down to just a handful.

I feel this is incredibly tremendous progress. I hope you are all excited about it also!

Posts: 3
Joined: Wed Jun 04, 2014 08:17 UTC

Re: Dramatic changes

Post by bluebear » Wed Jun 04, 2014 08:22 UTC

Thanks for all of your hard work! We can see the difference!

Post Reply