diff --git a/Moose Development/Moose/Core/Zone.lua b/Moose Development/Moose/Core/Zone.lua index 7095d9f62..3e15506fb 100644 --- a/Moose Development/Moose/Core/Zone.lua +++ b/Moose Development/Moose/Core/Zone.lua @@ -1510,6 +1510,7 @@ function ZONE_RADIUS:IsVec3InZone( Vec3 ) end --- Search for clear ground spawn zones within this zone. A powerful and efficient function using Disposition to find clear areas for spawning ground units avoiding trees, water and map scenery. +-- @param #ZONE_RADIUS self -- @param #number PosRadius Required clear radius around each position. -- @param #number NumPositions Number of positions to find. -- @return #table A table of DCS#Vec2 positions that are clear of map objects within the given PosRadius. nil if no clear positions are found. @@ -1519,6 +1520,7 @@ end --- Search for a random clear ground spawn coordinate within this zone. A powerful and efficient function using Disposition to find clear areas for spawning ground units avoiding trees, water and map scenery. +-- @param #ZONE_RADIUS self -- @param #number PosRadius (Optional) Required clear radius around each position. (Default is math.min(Radius/10, 200)) -- @param #number NumPositions (Optional) Number of positions to find. (Default 50) -- @return Core.Point#COORDINATE A random coordinate for a clear zone. nil if no clear positions are found. @@ -2506,6 +2508,7 @@ function ZONE_POLYGON_BASE:Flush() end --- Search for clear ground spawn zones within this zone. A powerful and efficient function using Disposition to find clear areas for spawning ground units avoiding trees, water and map scenery. +-- @param #ZONE_POLYGON_BASE self -- @param #number PosRadius Required clear radius around each position. -- @param #number NumPositions Number of positions to find. -- @return #table A table of DCS#Vec2 positions that are clear of map objects within the given PosRadius. nil if no clear positions are found. @@ -2515,6 +2518,7 @@ end --- Search for a random clear ground spawn coordinate within this zone. A powerful and efficient function using Disposition to find clear areas for spawning ground units avoiding trees, water and map scenery. +-- @param #ZONE_POLYGON_BASE self -- @param #number PosRadius (Optional) Required clear radius around each position. (Default is math.min(Radius/10, 200)) -- @param #number NumPositions (Optional) Number of positions to find. (Default 50) -- @return Core.Point#COORDINATE A random coordinate for a clear zone. nil if no clear positions are found. diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index f1a4d3e6c..b69300f1a 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -4593,6 +4593,33 @@ function UTILS.GetEnvZone(name) end end +--- net.dostring_in +function UTILS.DoStringIn(State,DoString) + return net.dostring_in(State,DoString) +end + +--- Show a picture on the screen +-- @param #string FileName File name of the picture +-- @param #number Duration Duration in seconds, defaults to 10 +-- @param #boolean ClearView If true, clears the view before showing the picture, defaults to false +-- @param #number StartDelay Delay in seconds before showing the picture, defaults to 0 +-- @param #number HorizontalAlign Horizontal alignment of the picture, defaults to 1 (left), can be 0 (center) or 2 (right) +-- @param #number VerticalAlign Vertical alignment of the picture, defaults to 1 (top), can be 0 (center) or 2 (bottom) +-- @param #number Size Size of the picture in percent, defaults to 100 +-- @param #number SizeUnits Size units, defaults to 0 (percent), can be 1 (pixels) +function UTILS.ShowPicture(FileName, Duration, ClearView, StartDelay, HorizontalAlign, VerticalAlign, Size, SizeUnits) + ClearView = ClearView or false + StartDelay = StartDelay or 0 + HorizontalAlign = HorizontalAlign or 1 + VerticalAlign = VerticalAlign or 1 + Size = Size or 100 + SizeUnits = SizeUnits or 0 + + if ClearView then ClearView = "true" else ClearView = "false" end + + net.dostring_in("mission", string.format("a_out_picture(getValueResourceByKey(\"%s\"), %d, %s, %d, \"%d\", \"%d\", %d, \"%d\")", FileName, Duration or 10, ClearView, StartDelay, HorizontalAlign, VerticalAlign, Size, SizeUnits)) +end + --- Show a helper gate at a DCS#Vec3 position -- @param DCS#Vec3 pos The position -- @param number heading Heading in degrees, can be 0..359 degrees