129 Commits

Author SHA1 Message Date
mrSkortch
1c9e14add3 Fixed Typo
Fixed typo generating error in mist.getRandomPointInZone
2021-04-09 14:14:11 -06:00
mrSkortch
fdcbac0ac5 Removed getZone checks
Replaced multiple instances of trigger.misc.getZone to rely on mist.DBs.zonesByName instead.

getRandPointInCircle will default to a radius of 1000 if none is specified.

Added mist.vec.normalize

Added ground level optional value to mist.utils.zoneToVec3 to return that point at ground level.

Some future proofing.
2021-04-02 17:51:36 -06:00
mrSkortch
cadde17c84 Build 96
-Fixed DB entry for country names to use the values stored in the country table instead of the localized name within the miz. This fixes a missmatch when spawning units for the third reich

-Added some future proofing
-Added error messages for updating DB
-Added disableRoads variable to grouoToRandomZone and groupRandomDistSelf
2021-02-28 21:04:18 -07:00
mrSkortch
ad5af75541 Fairly big oops
Somehow screwed up the same syntax error, failed to noticed, and uplodaed. This is now fixed.
2020-11-19 17:50:36 -07:00
mrSkortch
7829d380b0 Static support for makeUnitTable
-Added support for static objects in makeUnitTable function. It still returns a list of all objects in a single table, so be careful and know that it WILL return static objects.
- Added optional value to mist.makeUnitTable to exclude categories of objects. Can be used to filter out statics or any other type. Input is a string or a table of strings.
-Added/fixed getUnitsInZones, getUnitsInPolygon,  getUnitsInMovingZones, and getUnitsLOS to support static objects. Change was made due to farp objects returning via Unit.getByName() and not checking for object category.
2020-11-17 20:43:01 -07:00
mrSkortch
4e7b4158f4 4_5 build1
-Added some definitions of static objects and model names
-added mist.getPathLength()
    given a table of points it returns the total distance between all of the points. Distance by defualt is "2d" but can be 3d. Can also return the nearest index after a given cutoff distance.
-added mist.getPathInSegments()
    sub divides a passed path into X number of segments. For example generate an on road route between 2 points, pass that table to this function and you can get the coordiantes of points relatively equidistant from each other.
-added mist.getPointAtDistanceOnPath()
    Returns a vec2 or vec3 point at a set distance along a path.
added mist.projectPoint()
      Returns a vec2 or vec 3 based on the point it was passed from that point at the angle of a given theta for a given distance.
-added mist.utils.getHeadingPoints()
   Returns the heading from the first point to the 2nd point.

modified mist.teleportToPoint to have 2 optional new variables.
-- validTerrain is a table of terrain types you wish to force the function to use
-- newGroupName is a optional value to define the new name of the group.
2020-11-01 23:19:22 -07:00
mrSkortch
d550180e58 Fix for checking CA slots
-Fixed bug due to mission file adding a string value into a table that is normally just a table of numbers. Added a type check to handle that.
2020-09-30 15:33:47 -06:00
mrSkortch
5e26588a91 Neutral coalition support
Added support for DB info in the miz regarding neutral groups. Removed the checks for the coalition name so that if there are ever more coalitions added to the game the mist code won't need to explicitly look for them.

Added local function to verify the DB entries for anything that was spawned before mist is loaded.

Set all popup messages to false.
2020-09-17 16:56:25 -06:00
mrSkortch
de4b4e0d0d removeFunction returns true/false
-Modifed mist.removeFunction to return true or false if the function was removed.
-Added more descriptive logging to dbUpdate and checkSpawnedEventsNew
2020-07-24 18:21:52 -06:00
mrSkortch
d5288a88fb Added better DB updating error handling
Due to a change in DCS open beta 2.5.6.52196 that allows errors to be logged within scheduledFunctions and the speed at which mist checks to update a DB, better error handling was required.

-Modified tempSpawnedGroups to be a table containing the object and the type.
-Added check to ensure that the group and objects still exist before running potentially error causing scripting functions on.

Added GNU v3 liscense.
Added paypal donation link
2020-07-16 16:54:56 -06:00
mrSkortch
f029de164b Fix for dynAddStatic
Fixed minor bug with dynAddStatic where it would always assign a generated name if the entry lacked the alternate name entry of unitName.
2020-07-07 04:51:50 -06:00
mrSkortch
f15b4428d0 Merged several PRs
Merged several Pull Requests. Unified the build number.
2020-06-22 03:22:28 -06:00
mrSkortch
50ddf1f337
Merge pull request #45 from MorpheusXAUT/development
isTerrainValid validation for terrain types table fails with multiple entries
2020-06-22 03:06:08 -06:00
mrSkortch
a023c7ff54
Merge pull request #52 from Lugghawk/development
#51 - playerCanDrive is no longer being overridden to true
2020-06-22 03:05:46 -06:00
mrSkortch
824c8b2bbd
Merge pull request #46 from VEAF/development
corrected a typo (log:war instead of log:warn)
2020-06-22 03:05:27 -06:00
Acidic
f5706dfad6 #51 - playerCanDrive is no longer being overridden to true 2020-06-06 14:51:05 -04:00
NachtRaveVL
cef20958d8 Adding route name fetch to getGroupRoute() 2020-01-20 15:37:36 -08:00
David Pierron
7501473978 corrected a typo (log:war instead of log:warn) 2019-12-28 15:55:17 +01:00
mrSkortch
40a186c71d Fixed teleportToPoint if radius was nil or 0 2019-11-23 16:40:55 -07:00
mrSkortch
4cccfc6a03 Slight Versioning Cerfufle 2019-11-18 23:45:05 -07:00
mrSkortch
e4fc8dfc13 Push of fixes 2019-11-18 23:40:15 -07:00
Nick 'MorpheusXAUT' Müller
6d8390cec9
Fixed isTerrainValid validation for terrain types table
terrainTypes table index is no longer being compared with SurfaceType enum values, leading to incorrect type inclusions
2019-05-03 22:00:45 +02:00
mrSkortch
acbdb0561b spawning aircraft with AGL WP DB entry fix
Fixed a issue where altitude was not correctly saved for aircraft
altitude set to AGL

Added Mark panel stuff. Currently WIP.
Fixed typos in function names where Celsius was spelled wrong:
mist.utils.kelvinToCelsius
mist.utils.FahreneitToCelsius
mist.utils.celsiusToFahrenheit

mist logger now defined in mistSettings.logLevel for easy access.
2017-08-25 00:22:18 -06:00
mrSkortch
4f4b890339 Uhh
Last commit didnt work.
2017-02-23 03:06:03 -07:00
mrSkortch
073279a7fd getQFE minor change
Changed getQFE function to be based on Ground level position of point
given. Whoops.
2017-02-22 05:14:07 -07:00
mrSkortch
60503b2426 r 78
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. :)
2017-02-22 05:12:20 -07:00
mrSkortch
b4567df7c1 Logger fix
fixed issue with logging level being set for all loggers and not just
the logger it was logging logs for.
2017-02-08 23:13:44 -07:00
mrSkortch
ef56349efc Build 76
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.
2017-02-08 04:17:00 -07:00
mrSkortch
9ff6be9311 rev 74
Minor fix to mist.getCurrentGroupData.
2016-09-20 02:16:13 -06:00
mrSkortch
7171a8f483 Assorted fixes
-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.
2016-07-10 20:57:27 -06:00
mrSkortch
4ff3d57d66 actual commit
Fixed an oops
2016-06-01 01:03:20 -06:00
mrSkortch
9dfd4929ea v71
Fixed a bug with flagFuncs to stop assigning the unitTableDef if the
corresponding units entry was invalid.
2016-06-01 01:02:31 -06:00
mrSkortch
586d374075 4.3 Release Files
Re-export of DBs and updated files needed for release.
2016-05-27 02:46:43 -06:00
mrSkortch
e936df61dc added shapename DB entry
This is the shapeNames DB. It is a simple look up table for static
objects which may require a shapename to correctly spawn static objects.
2016-05-26 05:02:57 -06:00
mrSkortch
79e44112f5 Some error checking
Added some error checking functionality to existing functions.
2016-05-23 04:53:04 -06:00
mrSkortch
e24d8d267d Set loggers to warn
Set loggers to warning level.
2016-05-09 00:20:47 -06:00
mrSkortch
f96edc14bd Moar slight changes
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.
2016-05-09 00:14:28 -06:00
mrSkortch
3386d0daa5 Update DB slightRefactor-start
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.
2016-05-08 04:20:52 -06:00
mrSkortch
34c4082938 4.2 Release Files 2016-04-19 03:25:09 -06:00
mrSkortch
ff506e0ec2 Changed build number
Changed the build number
2016-03-11 02:29:23 -07:00
mrSkortch
d333ea3d64 Merge pull request #25 from lukrop/alive-units-hotfix
Fix updating of alive units.
2016-03-11 02:24:58 -07:00
Lukas Kropatschek
fc0467f372 Fix updating of alive units. 2016-03-10 15:52:59 +01:00
Lukas Kropatschek
c2fddb436a vim modeline, fixed indention
See https://www.cs.swarthmore.edu/help/vim/modelines.html
2016-03-09 18:55:06 +01:00
Lukas Kropatschek
6761878ce3 fix missing line number and func name 2016-03-09 18:46:37 +01:00
Lukas Kropatschek
3c9da5754b Replaced spaces with tabs. Removed trailing spaces. 2016-03-05 17:04:27 +01:00
Lukas Kropatschek
5fdaa269fd Fix logger if debug module is sanitized. 2016-03-05 13:24:48 +01:00
mrSkortch
f74c5b488a Whoops
Derp. That was silly of me.
2016-01-18 05:00:53 -07:00
mrSkortch
b8da182cb8 FlagFuncs changes
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.
2016-01-18 04:48:07 -07:00
mrSkortch
b40a919bb0 Fixed the botched merge
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.
2016-01-18 04:33:36 -07:00
mrSkortch
e312ec70c3 Merge remote-tracking branch 'origin/development' into development
# Conflicts:
#	mist.lua
2016-01-18 03:38:47 -07:00