Update not pushed live at time of update due to a few bugs. Wanted to
get commit in.
Fixed typo with mist.utils.NMToMeters causing function not to work.
added Logger 'dbLog' to mist DB code
inserted do-end blocks to make DB code block shorter in length
Purpose of DB updating refactor is to more accurately keep unit tables
updated correctly. In the old system only 'byName' DBs were updated if a
group/unit name was duplicated. So it was possible for multiple units to
share the same name in unitsByNum, byCat, etc.
The process of how it checks added groups and units has been altered
slightly. Groups spawned with player controlled units will not be
updated.
The conditions for whether or not the table gets updated are as follows:
If groupName is already in DB then check if its groupId, country, or
coalition changed. If nothing has changed then it checks if the newly
spawned units exist in a DB entry and if so it will verify if the unitId
ort ype have changed. Any single update prompts the DB to update
accordingly.
The old flagFuncs required 'stopflag' to be all lower case. I've changed
it so that the camel case spelling is also accepted. stopFlag
added camelCase named versions of flagFuncs. These are functions that
simply call the default functions that use '_' between words.
There was a conflict on merging lukrop's commit. I've fixed it and made
some other changes.
-Retabulated entire file. Fans of terrible drink from the 90s rejoice.
-Moved the mist init message back to the end of file and into the old
format.
-Commented out several of the new log:info statements that replaced old
commented out print statements.
Using scopes for various groups of functions simulating files.
Allows for use of some local functions and better organization. Using a editor
which is capable of folding this huge file gets way easier to navigate.
-Fixed issue with country names in the editor not matching enum country
name values. For example "Best Korea" could not match with "BEST_KOREA".
Thanks lukrop of this fix
-Fixed locality issue with mist.getNorthCorrection
-Added function mist.utils.unitToWP
-added function mist.utils.vecToWP
Both of these functions deal with creating a WP table from the passed
values. unitToWP also returns a speed variable based on the current
velocity of the unit.