mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Warehouse v0.5.7
- Added check if spawn zones are on land - Removed check that ground units cannot go to ships - Added check that spawn zone is 5 km from warehouse (needs to be revised). Coordinate: - added surface type checks api functions
This commit is contained in:
@@ -1383,9 +1383,53 @@ do -- COORDINATE
|
||||
return surface
|
||||
end
|
||||
|
||||
--- Checks if the surface type is on land.
|
||||
-- @param #COORDINATE self
|
||||
-- @return #boolean If true, the surface type at the coordinate is land.
|
||||
function COORDINATE:IsSurfaceTypeLand()
|
||||
return self:GetSurfaceType()==land.SurfaceType.LAND
|
||||
end
|
||||
|
||||
--- Checks if the surface type is road.
|
||||
-- @param #COORDINATE self
|
||||
-- @return #boolean If true, the surface type at the coordinate is land.
|
||||
function COORDINATE:IsSurfaceTypeLand()
|
||||
return self:GetSurfaceType()==land.SurfaceType.LAND
|
||||
end
|
||||
|
||||
|
||||
--- Checks if the surface type is road.
|
||||
-- @param #COORDINATE self
|
||||
-- @return #boolean If true, the surface type at the coordinate is a road.
|
||||
function COORDINATE:IsSurfaceTypeRoad()
|
||||
return self:GetSurfaceType()==land.SurfaceType.ROAD
|
||||
end
|
||||
|
||||
--- Checks if the surface type is runway.
|
||||
-- @param #COORDINATE self
|
||||
-- @return #boolean If true, the surface type at the coordinate is a runway or taxi way.
|
||||
function COORDINATE:IsSurfaceTypeRunway()
|
||||
return self:GetSurfaceType()==land.SurfaceType.RUNWAY
|
||||
end
|
||||
|
||||
--- Checks if the surface type is shallow water.
|
||||
-- @param #COORDINATE self
|
||||
-- @return #boolean If true, the surface type at the coordinate is a shallow water.
|
||||
function COORDINATE:IsSurfaceTypeShallowWater()
|
||||
return self:GetSurfaceType()==land.SurfaceType.SHALLOW_WATER
|
||||
end
|
||||
|
||||
--- Checks if the surface type is water.
|
||||
-- @param #COORDINATE self
|
||||
-- @return #boolean If true, the surface type at the coordinate is a deep water.
|
||||
function COORDINATE:IsSurfaceTypeWater()
|
||||
return self:GetSurfaceType()==land.SurfaceType.WATER
|
||||
end
|
||||
|
||||
|
||||
--- Creates an explosion at the point of a certain intensity.
|
||||
-- @param #COORDINATE self
|
||||
-- @param #number ExplosionIntensity
|
||||
-- @param #number ExplosionIntensity Intensity of the explosion in kg TNT.
|
||||
function COORDINATE:Explosion( ExplosionIntensity )
|
||||
self:F2( { ExplosionIntensity } )
|
||||
trigger.action.explosion( self:GetVec3(), ExplosionIntensity )
|
||||
|
||||
Reference in New Issue
Block a user