Temperature Conversions added.
-Kelvin to Celcius
-Celcius to Farhenheit
-Farhenheit to Celcius
getQFE modified to use new atmosphere function to return pressure. Will
use QNH as defined in editor to figure out QFE if function doesn't
return anything.
added mist.utils.converter() and shortcut mist.converter().
This function is a shortcut based method of converting a coordinate from
one format to another. Conversions exist for distance, temperature,
pressure, and speed. I may need to double check some conversions. :)
Added extra checks to unit spawn events
Fixed stupid errors with mist.getNextUnitId and mist.getNextGroupId
ground vehicles spawns via mist.dynAdd will now have playerCanDrive set
to true if value not present.
Fixed typo in mist.getUnitsInPolyGon
added mist.utils.getQFE. Values returned have some error, need to figure
it out, but added it for testing purposes.
Added 2 extra values to mist.getRandPointInCircle to specify a min and
max angle in degrees. Funtion currently assumes both are positive
numbers. Need to add extra checks to it.
added mist.getRandomPointInPoly. Returns a random vec2 coordinate inside
a polyzone
Added checks to getLeadPos related functions to ensure the lead unit is
returned if it exists.
-fixed mist.time.getDate to account for changes made to the mission file
format related to how the mission start time and date are saved. Also
added in code to correctly account for leap years.
- fixed issue in DB updating checking the incorrect value
- fixed mist.getUnitSkill. Slightly reworked how the function got the
data.
Some minor fixes to code implemented last update
Updated mission used to create DBs. There should no longer be any unit
names that are the same as group names.
Dynamically generated names will now be indexed accordingly to their
category. Used to be just a single counter shared between all.
Several changes and fixes to dynAddStatic
-Fixed function wasn't working when given certain params.
-fixed country checker to better account for country names with spaces.
This fix was applied to dynAdd but not dynAddStatic, I corrected this.
-Optimized it slightly. Trimmed the fat of some of the code.
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.