mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'master' into funkyfranky
This commit is contained in:
@@ -437,44 +437,44 @@ end
|
||||
--- Handles the OnPlayerEnterUnit event to fill the active players table (with the unit filter applied).
|
||||
-- @param #SET_BASE self
|
||||
-- @param Core.Event#EVENTDATA Event
|
||||
function SET_BASE:_EventOnPlayerEnterUnit( Event )
|
||||
self:F3( { Event } )
|
||||
|
||||
if Event.IniDCSUnit then
|
||||
local ObjectName, Object = self:AddInDatabase( Event )
|
||||
self:T3( ObjectName, Object )
|
||||
if self:IsIncludeObject( Object ) then
|
||||
self:Add( ObjectName, Object )
|
||||
--self:_EventOnPlayerEnterUnit( Event )
|
||||
end
|
||||
end
|
||||
end
|
||||
--function SET_BASE:_EventOnPlayerEnterUnit( Event )
|
||||
-- self:F3( { Event } )
|
||||
--
|
||||
-- if Event.IniDCSUnit then
|
||||
-- local ObjectName, Object = self:AddInDatabase( Event )
|
||||
-- self:T3( ObjectName, Object )
|
||||
-- if self:IsIncludeObject( Object ) then
|
||||
-- self:Add( ObjectName, Object )
|
||||
-- --self:_EventOnPlayerEnterUnit( Event )
|
||||
-- end
|
||||
-- end
|
||||
--end
|
||||
|
||||
--- Handles the OnPlayerLeaveUnit event to clean the active players table.
|
||||
-- @param #SET_BASE self
|
||||
-- @param Core.Event#EVENTDATA Event
|
||||
function SET_BASE:_EventOnPlayerLeaveUnit( Event )
|
||||
self:F3( { Event } )
|
||||
|
||||
local ObjectName = Event.IniDCSUnit
|
||||
if Event.IniDCSUnit then
|
||||
if Event.IniDCSGroup then
|
||||
local GroupUnits = Event.IniDCSGroup:getUnits()
|
||||
local PlayerCount = 0
|
||||
for _, DCSUnit in pairs( GroupUnits ) do
|
||||
if DCSUnit ~= Event.IniDCSUnit then
|
||||
if DCSUnit:getPlayerName() ~= nil then
|
||||
PlayerCount = PlayerCount + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
self:E(PlayerCount)
|
||||
if PlayerCount == 0 then
|
||||
self:Remove( Event.IniDCSGroupName )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
--function SET_BASE:_EventOnPlayerLeaveUnit( Event )
|
||||
-- self:F3( { Event } )
|
||||
--
|
||||
-- local ObjectName = Event.IniDCSUnit
|
||||
-- if Event.IniDCSUnit then
|
||||
-- if Event.IniDCSGroup then
|
||||
-- local GroupUnits = Event.IniDCSGroup:getUnits()
|
||||
-- local PlayerCount = 0
|
||||
-- for _, DCSUnit in pairs( GroupUnits ) do
|
||||
-- if DCSUnit ~= Event.IniDCSUnit then
|
||||
-- if DCSUnit:getPlayerName() ~= nil then
|
||||
-- PlayerCount = PlayerCount + 1
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- self:E(PlayerCount)
|
||||
-- if PlayerCount == 0 then
|
||||
-- self:Remove( Event.IniDCSGroupName )
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
--end
|
||||
|
||||
-- Iterators
|
||||
|
||||
|
||||
@@ -1231,6 +1231,8 @@ function SPAWN:SpawnFromVec3( Vec3, SpawnIndex )
|
||||
if SpawnTemplate then
|
||||
|
||||
self:T( { "Current point of ", self.SpawnTemplatePrefix, Vec3 } )
|
||||
|
||||
local TemplateHeight = SpawnTemplate.route.points[1].alt
|
||||
|
||||
-- Translate the position of the Group Template to the Vec3.
|
||||
for UnitID = 1, #SpawnTemplate.units do
|
||||
@@ -1245,7 +1247,7 @@ function SPAWN:SpawnFromVec3( Vec3, SpawnIndex )
|
||||
SpawnTemplate.units[UnitID].x = TX
|
||||
SpawnTemplate.units[UnitID].y = TY
|
||||
if SpawnTemplate.CategoryID ~= Group.Category.SHIP then
|
||||
SpawnTemplate.units[UnitID].alt = Vec3.y
|
||||
SpawnTemplate.units[UnitID].alt = Vec3.y or TemplateHeight
|
||||
end
|
||||
self:T( 'After Translation SpawnTemplate.units['..UnitID..'].x = ' .. SpawnTemplate.units[UnitID].x .. ', SpawnTemplate.units['..UnitID..'].y = ' .. SpawnTemplate.units[UnitID].y )
|
||||
end
|
||||
@@ -1253,11 +1255,11 @@ function SPAWN:SpawnFromVec3( Vec3, SpawnIndex )
|
||||
SpawnTemplate.route.points[1].x = Vec3.x
|
||||
SpawnTemplate.route.points[1].y = Vec3.z
|
||||
if SpawnTemplate.CategoryID ~= Group.Category.SHIP then
|
||||
SpawnTemplate.route.points[1].alt = Vec3.y
|
||||
SpawnTemplate.route.points[1].alt = Vec3.y or TemplateHeight
|
||||
end
|
||||
|
||||
SpawnTemplate.x = Vec3.x
|
||||
SpawnTemplate.y = Vec3.z
|
||||
SpawnTemplate.alt = Vec3.y or TemplateHeight
|
||||
|
||||
return self:SpawnWithIndex( self.SpawnIndex )
|
||||
end
|
||||
@@ -1272,14 +1274,31 @@ end
|
||||
-- You can use the returned group to further define the route to be followed.
|
||||
-- @param #SPAWN self
|
||||
-- @param Dcs.DCSTypes#Vec2 Vec2 The Vec2 coordinates where to spawn the group.
|
||||
-- @param #number MinHeight (optional) The minimum height to spawn an airborne group into the zone.
|
||||
-- @param #number MaxHeight (optional) The maximum height to spawn an airborne group into the zone.
|
||||
-- @param #number SpawnIndex (optional) The index which group to spawn within the given zone.
|
||||
-- @return Wrapper.Group#GROUP that was spawned.
|
||||
-- @return #nil Nothing was spawned.
|
||||
function SPAWN:SpawnFromVec2( Vec2, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, Vec2, SpawnIndex } )
|
||||
-- @usage
|
||||
--
|
||||
-- local SpawnVec2 = ZONE:New( ZoneName ):GetVec2()
|
||||
--
|
||||
-- -- Spawn at the zone center position at the height specified in the ME of the group template!
|
||||
-- SpawnAirplanes:SpawnFromVec2( SpawnVec2 )
|
||||
--
|
||||
-- -- Spawn from the static position at the height randomized between 2000 and 4000 meters.
|
||||
-- SpawnAirplanes:SpawnFromVec2( SpawnVec2, 2000, 4000 )
|
||||
--
|
||||
function SPAWN:SpawnFromVec2( Vec2, MinHeight, MaxHeight, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, self.SpawnIndex, Vec2, MinHeight, MaxHeight, SpawnIndex } )
|
||||
|
||||
local PointVec2 = POINT_VEC2:NewFromVec2( Vec2 )
|
||||
return self:SpawnFromVec3( PointVec2:GetVec3(), SpawnIndex )
|
||||
local Height = nil
|
||||
|
||||
if MinHeight and MaxHeight then
|
||||
Height = math.random( MinHeight, MaxHeight)
|
||||
end
|
||||
|
||||
return self:SpawnFromVec3( { x = Vec2.x, y = Height, z = Vec2.y }, SpawnIndex ) -- y can be nil. In this case, spawn on the ground for vehicles, and in the template altitude for air.
|
||||
end
|
||||
|
||||
|
||||
@@ -1288,14 +1307,26 @@ end
|
||||
-- You can use the returned group to further define the route to be followed.
|
||||
-- @param #SPAWN self
|
||||
-- @param Wrapper.Unit#UNIT HostUnit The air or ground unit dropping or unloading the group.
|
||||
-- @param #number MinHeight (optional) The minimum height to spawn an airborne group into the zone.
|
||||
-- @param #number MaxHeight (optional) The maximum height to spawn an airborne group into the zone.
|
||||
-- @param #number SpawnIndex (optional) The index which group to spawn within the given zone.
|
||||
-- @return Wrapper.Group#GROUP that was spawned.
|
||||
-- @return #nil Nothing was spawned.
|
||||
function SPAWN:SpawnFromUnit( HostUnit, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, HostUnit, SpawnIndex } )
|
||||
-- @usage
|
||||
--
|
||||
-- local SpawnStatic = STATIC:FindByName( StaticName )
|
||||
--
|
||||
-- -- Spawn from the static position at the height specified in the ME of the group template!
|
||||
-- SpawnAirplanes:SpawnFromUnit( SpawnStatic )
|
||||
--
|
||||
-- -- Spawn from the static position at the height randomized between 2000 and 4000 meters.
|
||||
-- SpawnAirplanes:SpawnFromUnit( SpawnStatic, 2000, 4000 )
|
||||
--
|
||||
function SPAWN:SpawnFromUnit( HostUnit, MinHeight, MaxHeight, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, HostUnit, MinHeight, MaxHeight, SpawnIndex } )
|
||||
|
||||
if HostUnit and HostUnit:IsAlive() ~= nil then -- and HostUnit:getUnit(1):inAir() == false then
|
||||
return self:SpawnFromVec3( HostUnit:GetVec3(), SpawnIndex )
|
||||
return self:SpawnFromVec2( HostUnit:GetVec2(), MinHeight, MaxHeight, SpawnIndex )
|
||||
end
|
||||
|
||||
return nil
|
||||
@@ -1305,14 +1336,26 @@ end
|
||||
-- You can use the returned group to further define the route to be followed.
|
||||
-- @param #SPAWN self
|
||||
-- @param Wrapper.Static#STATIC HostStatic The static dropping or unloading the group.
|
||||
-- @param #number MinHeight (optional) The minimum height to spawn an airborne group into the zone.
|
||||
-- @param #number MaxHeight (optional) The maximum height to spawn an airborne group into the zone.
|
||||
-- @param #number SpawnIndex (optional) The index which group to spawn within the given zone.
|
||||
-- @return Wrapper.Group#GROUP that was spawned.
|
||||
-- @return #nil Nothing was spawned.
|
||||
function SPAWN:SpawnFromStatic( HostStatic, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, HostStatic, SpawnIndex } )
|
||||
-- @usage
|
||||
--
|
||||
-- local SpawnStatic = STATIC:FindByName( StaticName )
|
||||
--
|
||||
-- -- Spawn from the static position at the height specified in the ME of the group template!
|
||||
-- SpawnAirplanes:SpawnFromStatic( SpawnStatic )
|
||||
--
|
||||
-- -- Spawn from the static position at the height randomized between 2000 and 4000 meters.
|
||||
-- SpawnAirplanes:SpawnFromStatic( SpawnStatic, 2000, 4000 )
|
||||
--
|
||||
function SPAWN:SpawnFromStatic( HostStatic, MinHeight, MaxHeight, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, HostStatic, MinHeight, MaxHeight, SpawnIndex } )
|
||||
|
||||
if HostStatic and HostStatic:IsAlive() then
|
||||
return self:SpawnFromVec3( HostStatic:GetVec3(), SpawnIndex )
|
||||
return self:SpawnFromVec2( HostStatic:GetVec2(), MinHeight, MaxHeight, SpawnIndex )
|
||||
end
|
||||
|
||||
return nil
|
||||
@@ -1325,17 +1368,38 @@ end
|
||||
-- @param #SPAWN self
|
||||
-- @param Core.Zone#ZONE Zone The zone where the group is to be spawned.
|
||||
-- @param #boolean RandomizeGroup (optional) Randomization of the @{Group} position in the zone.
|
||||
-- @param #number MinHeight (optional) The minimum height to spawn an airborne group into the zone.
|
||||
-- @param #number MaxHeight (optional) The maximum height to spawn an airborne group into the zone.
|
||||
-- @param #number SpawnIndex (optional) The index which group to spawn within the given zone.
|
||||
-- @return Wrapper.Group#GROUP that was spawned.
|
||||
-- @return #nil when nothing was spawned.
|
||||
function SPAWN:SpawnInZone( Zone, RandomizeGroup, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, Zone, RandomizeGroup, SpawnIndex } )
|
||||
-- @usage
|
||||
--
|
||||
-- local SpawnZone = ZONE:New( ZoneName )
|
||||
--
|
||||
-- -- Spawn at the zone center position at the height specified in the ME of the group template!
|
||||
-- SpawnAirplanes:SpawnInZone( SpawnZone )
|
||||
--
|
||||
-- -- Spawn in the zone at a random position at the height specified in the Me of the group template.
|
||||
-- SpawnAirplanes:SpawnInZone( SpawnZone, true )
|
||||
--
|
||||
-- -- Spawn in the zone at a random position at the height randomized between 2000 and 4000 meters.
|
||||
-- SpawnAirplanes:SpawnInZone( SpawnZone, true, 2000, 4000 )
|
||||
--
|
||||
-- -- Spawn at the zone center position at the height randomized between 2000 and 4000 meters.
|
||||
-- SpawnAirplanes:SpawnInZone( SpawnZone, false, 2000, 4000 )
|
||||
--
|
||||
-- -- Spawn at the zone center position at the height randomized between 2000 and 4000 meters.
|
||||
-- SpawnAirplanes:SpawnInZone( SpawnZone, nil, 2000, 4000 )
|
||||
--
|
||||
function SPAWN:SpawnInZone( Zone, RandomizeGroup, MinHeight, MaxHeight, SpawnIndex )
|
||||
self:F( { self.SpawnTemplatePrefix, Zone, RandomizeGroup, MinHeight, MaxHeight, SpawnIndex } )
|
||||
|
||||
if Zone then
|
||||
if RandomizeGroup then
|
||||
return self:SpawnFromVec2( Zone:GetRandomVec2(), SpawnIndex )
|
||||
return self:SpawnFromVec2( Zone:GetRandomVec2(), MinHeight, MaxHeight, SpawnIndex )
|
||||
else
|
||||
return self:SpawnFromVec2( Zone:GetVec2(), SpawnIndex )
|
||||
return self:SpawnFromVec2( Zone:GetVec2(), MinHeight, MaxHeight, SpawnIndex )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--- **Functional** -- The AIRBASEPOLICE classes monitor airbase traffic and regulate speed while taxiing.
|
||||
--- **Functional** -- The ATC_GROUND classes monitor airbase traffic and regulate speed while taxiing.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
@@ -7,34 +7,34 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- @module AirbasePolice
|
||||
-- @module ATC_Ground
|
||||
|
||||
|
||||
--- @type AIRBASEPOLICE_BASE
|
||||
--- @type ATC_GROUND
|
||||
-- @field Core.Set#SET_CLIENT SetClient
|
||||
-- @extends Core.Base#BASE
|
||||
|
||||
--- Base class for AIRBASEPOLICE implementations.
|
||||
-- @field #AIRBASEPOLICE_BASE
|
||||
AIRBASEPOLICE_BASE = {
|
||||
ClassName = "AIRBASEPOLICE_BASE",
|
||||
--- Base class for ATC_GROUND implementations.
|
||||
-- @field #ATC_GROUND
|
||||
ATC_GROUND = {
|
||||
ClassName = "ATC_GROUND",
|
||||
SetClient = nil,
|
||||
Airbases = nil,
|
||||
AirbaseNames = nil,
|
||||
}
|
||||
|
||||
--- @type AIRBASEPOLICE_BASE.AirbaseNames
|
||||
--- @type ATC_GROUND.AirbaseNames
|
||||
-- @list <#string>
|
||||
|
||||
|
||||
--- Creates a new AIRBASEPOLICE_BASE object.
|
||||
-- @param #AIRBASEPOLICE_BASE self
|
||||
--- Creates a new ATC_GROUND object.
|
||||
-- @param #ATC_GROUND self
|
||||
-- @param Airbases A table of Airbase Names.
|
||||
-- @return #AIRBASEPOLICE_BASE self
|
||||
function AIRBASEPOLICE_BASE:New( Airbases, AirbaseList )
|
||||
-- @return #ATC_GROUND self
|
||||
function ATC_GROUND:New( Airbases, AirbaseList )
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #AIRBASEPOLICE_BASE
|
||||
local self = BASE:Inherit( self, BASE:New() ) -- #ATC_GROUND
|
||||
self:E( { self.ClassName, Airbases } )
|
||||
|
||||
self.Airbases = Airbases
|
||||
@@ -88,10 +88,10 @@ end
|
||||
|
||||
|
||||
--- Smoke the airbases runways.
|
||||
-- @param #AIRBASEPOLICE_BASE self
|
||||
-- @param #ATC_GROUND self
|
||||
-- @param Utilities.Utils#SMOKECOLOR SmokeColor The color of the smoke around the runways.
|
||||
-- @return #AIRBASEPOLICE_BASE self
|
||||
function AIRBASEPOLICE_BASE:SmokeRunways( SmokeColor )
|
||||
-- @return #ATC_GROUND self
|
||||
function ATC_GROUND:SmokeRunways( SmokeColor )
|
||||
|
||||
for AirbaseID, Airbase in pairs( self.Airbases ) do
|
||||
for PointsRunwayID, PointsRunway in pairs( Airbase.PointsRunways ) do
|
||||
@@ -102,136 +102,134 @@ end
|
||||
|
||||
|
||||
--- Set the maximum speed in Kmph until the player gets kicked.
|
||||
-- @param #AIRBASEPOLICE_BASE self
|
||||
-- @param #ATC_GROUND self
|
||||
-- @param #number KickSpeed Set the maximum speed in Kmph until the player gets kicked.
|
||||
-- @return #AIRBASEPOLICE_BASE self
|
||||
function AIRBASEPOLICE_BASE:SetKickSpeedKmph( KickSpeed )
|
||||
-- @return #ATC_GROUND self
|
||||
function ATC_GROUND:SetKickSpeedKmph( KickSpeed )
|
||||
|
||||
self.KickSpeed = UTILS.KmphToMps( KickSpeed )
|
||||
end
|
||||
|
||||
--- Set the maximum speed in Miph until the player gets kicked.
|
||||
-- @param #AIRBASEPOLICE_BASE self
|
||||
-- @param #ATC_GROUND self
|
||||
-- @param #number KickSpeedMiph Set the maximum speed in Mph until the player gets kicked.
|
||||
-- @return #AIRBASEPOLICE_BASE self
|
||||
function AIRBASEPOLICE_BASE:SetKickSpeedMiph( KickSpeedMiph )
|
||||
-- @return #ATC_GROUND self
|
||||
function ATC_GROUND:SetKickSpeedMiph( KickSpeedMiph )
|
||||
|
||||
self.KickSpeed = UTILS.MiphToMps( KickSpeedMiph )
|
||||
end
|
||||
|
||||
|
||||
|
||||
--- @param #AIRBASEPOLICE_BASE self
|
||||
function AIRBASEPOLICE_BASE:_AirbaseMonitor()
|
||||
--- @param #ATC_GROUND self
|
||||
function ATC_GROUND:_AirbaseMonitor()
|
||||
|
||||
self:E( "In Scheduler")
|
||||
self.SetClient:ForEachClient(
|
||||
--- @param Wrapper.Client#CLIENT Client
|
||||
function( Client )
|
||||
|
||||
for AirbaseID, AirbaseMeta in pairs( self.Airbases ) do
|
||||
if Client:IsAlive() then
|
||||
|
||||
if AirbaseMeta.Monitor == true then
|
||||
local IsOnGround = Client:InAir() == false
|
||||
|
||||
self:E( AirbaseID, AirbaseMeta.MaximumSpeed )
|
||||
for AirbaseID, AirbaseMeta in pairs( self.Airbases ) do
|
||||
self:E( AirbaseID, AirbaseMeta.MaximumSpeed )
|
||||
|
||||
if AirbaseMeta.Monitor == true and Client:IsInZone( AirbaseMeta.ZoneBoundary ) then
|
||||
|
||||
self.SetClient:ForEachClientInZone( AirbaseMeta.ZoneBoundary,
|
||||
|
||||
--- @param Wrapper.Client#CLIENT Client
|
||||
function( Client )
|
||||
|
||||
self:E( Client.UnitName )
|
||||
if Client and Client:IsAlive() then
|
||||
local NotInRunwayZone = true
|
||||
for ZoneRunwayID, ZoneRunway in pairs( AirbaseMeta.ZoneRunways ) do
|
||||
NotInRunwayZone = ( Client:IsNotInZone( ZoneRunway ) == true ) and NotInRunwayZone or false
|
||||
end
|
||||
|
||||
if NotInRunwayZone then
|
||||
local Taxi = Client:GetState( self, "Taxi" )
|
||||
self:E( Taxi )
|
||||
if Taxi == false then
|
||||
Client:Message( "Welcome at " .. AirbaseID .. ". The maximum taxiing speed is " .. AirbaseMeta.MaximumSpeed .. " km/h.", 20, "ATC" )
|
||||
Client:SetState( self, "Taxi", true )
|
||||
end
|
||||
|
||||
-- TODO: GetVelocityKMH function usage
|
||||
local Velocity = VELOCITY_POSITIONABLE:New( Client )
|
||||
--MESSAGE:New( "Velocity = " .. Velocity:ToString(), 1 ):ToAll()
|
||||
local IsAboveRunway = Client:IsAboveRunway()
|
||||
local IsOnGround = Client:InAir() == false
|
||||
self:T( IsAboveRunway, IsOnGround )
|
||||
|
||||
|
||||
if IsOnGround then
|
||||
if Velocity:Get() > self.KickSpeed then
|
||||
MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll()
|
||||
Client:Destroy()
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
local Taxi = Client:GetState( self, "Taxi" )
|
||||
self:E( Taxi )
|
||||
if Taxi == false then
|
||||
Client:Message( "Welcome at " .. AirbaseID .. ". The maximum taxiing speed is " .. AirbaseMeta.MaximumSpeed .. " km/h.", 20, "ATC" )
|
||||
Client:SetState( self, "Taxi", true )
|
||||
end
|
||||
|
||||
-- TODO: GetVelocityKMH function usage
|
||||
local Velocity = VELOCITY_POSITIONABLE:New( Client )
|
||||
--MESSAGE:New( "Velocity = " .. Velocity:ToString(), 1 ):ToAll()
|
||||
local IsAboveRunway = Client:IsAboveRunway()
|
||||
self:T( IsAboveRunway, IsOnGround )
|
||||
|
||||
if IsOnGround then
|
||||
if Velocity:Get() > self.KickSpeed then
|
||||
MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll()
|
||||
Client:Destroy()
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if IsOnGround then
|
||||
|
||||
if Velocity:GetKmph() > AirbaseMeta.MaximumSpeed then
|
||||
local IsSpeeding = Client:GetState( self, "Speeding" )
|
||||
|
||||
if IsSpeeding == true then
|
||||
local SpeedingWarnings = Client:GetState( self, "Warnings" )
|
||||
self:T( SpeedingWarnings )
|
||||
|
||||
if SpeedingWarnings <= 3 then
|
||||
Client:Message( "Warning " .. SpeedingWarnings .. "/3! Airbase traffic rule violation! Slow down now! Your speed is " ..
|
||||
string.format( "%s", Velocity:ToString() ), 5, "ATC" )
|
||||
Client:SetState( self, "Warnings", SpeedingWarnings + 1 )
|
||||
else
|
||||
MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll()
|
||||
--- @param Wrapper.Client#CLIENT Client
|
||||
Client:Destroy()
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
end
|
||||
|
||||
else
|
||||
Client:Message( "Attention! You are speeding on the taxiway, slow down! Your speed is " .. string.format( "%s", Velocity:ToString() ), 5, "ATC" )
|
||||
Client:SetState( self, "Speeding", true )
|
||||
Client:SetState( self, "Warnings", 1 )
|
||||
end
|
||||
|
||||
else
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if IsOnGround then
|
||||
|
||||
if Velocity:GetKmph() > AirbaseMeta.MaximumSpeed then
|
||||
local IsSpeeding = Client:GetState( self, "Speeding" )
|
||||
|
||||
if IsSpeeding == true then
|
||||
local SpeedingWarnings = Client:GetState( self, "Warnings" )
|
||||
self:T( SpeedingWarnings )
|
||||
|
||||
if SpeedingWarnings <= 3 then
|
||||
Client:Message( "Warning " .. SpeedingWarnings .. "/3! Airbase traffic rule violation! Slow down now! Your speed is " ..
|
||||
string.format( "%s", Velocity:ToString() ), 5, "ATC" )
|
||||
Client:SetState( self, "Warnings", SpeedingWarnings + 1 )
|
||||
if IsOnGround and not IsAboveRunway then
|
||||
|
||||
local IsOffRunway = Client:GetState( self, "IsOffRunway" )
|
||||
|
||||
if IsOffRunway == true then
|
||||
local OffRunwayWarnings = Client:GetState( self, "OffRunwayWarnings" )
|
||||
self:T( OffRunwayWarnings )
|
||||
|
||||
if OffRunwayWarnings <= 3 then
|
||||
Client:Message( "Warning " .. OffRunwayWarnings .. "/3! Airbase traffic rule violation! Get back on the taxi immediately!", 5, "ATC" )
|
||||
Client:SetState( self, "OffRunwayWarnings", OffRunwayWarnings + 1 )
|
||||
else
|
||||
MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll()
|
||||
--- @param Wrapper.Client#CLIENT Client
|
||||
Client:Destroy()
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
Client:SetState( self, "IsOffRunway", false )
|
||||
Client:SetState( self, "OffRunwayWarnings", 0 )
|
||||
end
|
||||
|
||||
else
|
||||
Client:Message( "Attention! You are speeding on the taxiway, slow down! Your speed is " .. string.format( "%s", Velocity:ToString() ), 5, "ATC" )
|
||||
Client:SetState( self, "Speeding", true )
|
||||
Client:SetState( self, "Warnings", 1 )
|
||||
Client:Message( "Attention! You are off the taxiway. Get back on the taxiway immediately!", 5, "ATC" )
|
||||
Client:SetState( self, "IsOffRunway", true )
|
||||
Client:SetState( self, "OffRunwayWarnings", 1 )
|
||||
end
|
||||
|
||||
|
||||
else
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
Client:SetState( self, "IsOffRunway", false )
|
||||
Client:SetState( self, "OffRunwayWarnings", 0 )
|
||||
end
|
||||
end
|
||||
|
||||
if IsOnGround and not IsAboveRunway then
|
||||
|
||||
local IsOffRunway = Client:GetState( self, "IsOffRunway" )
|
||||
|
||||
if IsOffRunway == true then
|
||||
local OffRunwayWarnings = Client:GetState( self, "OffRunwayWarnings" )
|
||||
self:T( OffRunwayWarnings )
|
||||
|
||||
if OffRunwayWarnings <= 3 then
|
||||
Client:Message( "Warning " .. OffRunwayWarnings .. "/3! Airbase traffic rule violation! Get back on the taxi immediately!", 5, "ATC" )
|
||||
Client:SetState( self, "OffRunwayWarnings", OffRunwayWarnings + 1 )
|
||||
else
|
||||
MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. " is kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll()
|
||||
--- @param Wrapper.Client#CLIENT Client
|
||||
Client:Destroy()
|
||||
Client:SetState( self, "IsOffRunway", false )
|
||||
Client:SetState( self, "OffRunwayWarnings", 0 )
|
||||
end
|
||||
else
|
||||
Client:Message( "Attention! You are off the taxiway. Get back on the taxiway immediately!", 5, "ATC" )
|
||||
Client:SetState( self, "IsOffRunway", true )
|
||||
Client:SetState( self, "OffRunwayWarnings", 1 )
|
||||
end
|
||||
|
||||
else
|
||||
Client:SetState( self, "IsOffRunway", false )
|
||||
Client:SetState( self, "OffRunwayWarnings", 0 )
|
||||
end
|
||||
|
||||
|
||||
else
|
||||
Client:SetState( self, "Speeding", false )
|
||||
Client:SetState( self, "Warnings", 0 )
|
||||
@@ -245,22 +243,24 @@ function AIRBASEPOLICE_BASE:_AirbaseMonitor()
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
else
|
||||
Client:SetState( self, "Taxi", false )
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
--- @type AIRBASEPOLICE_CAUCASUS
|
||||
-- @extends #AIRBASEPOLICE_BASE
|
||||
--- @type ATC_GROUND_CAUCASUS
|
||||
-- @extends #ATC_GROUND
|
||||
|
||||
--- # AIRBASEPOLICE_CAUCASUS, extends @{#AIRBASEPOLICE_BASE}
|
||||
--- # ATC_GROUND_CAUCASUS, extends @{#ATC_GROUND}
|
||||
--
|
||||
-- 
|
||||
-- 
|
||||
--
|
||||
-- The AIRBASEPOLICE_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi.
|
||||
-- The ATC_GROUND_CAUCASUS class monitors the speed of the airplanes at the airbase during taxi.
|
||||
-- The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.
|
||||
--
|
||||
-- The maximum speed for the airbases at Caucasus is **50 km/h**.
|
||||
@@ -272,44 +272,45 @@ end
|
||||
--
|
||||
-- # Airbases monitored
|
||||
--
|
||||
-- The following airbases are monitored at the Caucasus region:
|
||||
-- The following airbases are monitored at the Caucasus region.
|
||||
-- Use the AIRBASE.Caucasus enumeration to select the airbases to be monitored.
|
||||
--
|
||||
-- * Anapa Vityazevo
|
||||
-- * Batumi
|
||||
-- * Beslan
|
||||
-- * Gelendzhik
|
||||
-- * Gudauta
|
||||
-- * Kobuleti
|
||||
-- * Krasnodar Center
|
||||
-- * Krasnodar Pashkovsky
|
||||
-- * Krymsk
|
||||
-- * Kutaisi
|
||||
-- * Maykop Khanskaya
|
||||
-- * Mineralnye Vody
|
||||
-- * Mozdok
|
||||
-- * Nalchik
|
||||
-- * Novorossiysk
|
||||
-- * Senaki Kolkhi
|
||||
-- * Sochi Adler
|
||||
-- * Soganlug
|
||||
-- * Sukhumi Babushara
|
||||
-- * Tbilisi Lochini
|
||||
-- * Vaziani
|
||||
-- * ´AIRBASE.Caucasus.Anapa_Vityazevo´
|
||||
-- * ´AIRBASE.Caucasus.Batumi´
|
||||
-- * ´AIRBASE.Caucasus.Beslan´
|
||||
-- * ´AIRBASE.Caucasus.Gelendzhik´
|
||||
-- * ´AIRBASE.Caucasus.Gudauta´
|
||||
-- * ´AIRBASE.Caucasus.Kobuleti´
|
||||
-- * ´AIRBASE.Caucasus.Krasnodar_Center´
|
||||
-- * ´AIRBASE.Caucasus.Krasnodar_Pashkovsky´
|
||||
-- * ´AIRBASE.Caucasus.Krymsk´
|
||||
-- * ´AIRBASE.Caucasus.Kutaisi´
|
||||
-- * ´AIRBASE.Caucasus.Maykop_Khanskaya´
|
||||
-- * ´AIRBASE.Caucasus.Mineralnye_Vody´
|
||||
-- * ´AIRBASE.Caucasus.Mozdok´
|
||||
-- * ´AIRBASE.Caucasus.Nalchik´
|
||||
-- * ´AIRBASE.Caucasus.Novorossiysk´
|
||||
-- * ´AIRBASE.Caucasus.Senaki_Kolkhi´
|
||||
-- * ´AIRBASE.Caucasus.Sochi_Adler´
|
||||
-- * ´AIRBASE.Caucasus.Soganlug´
|
||||
-- * ´AIRBASE.Caucasus.Sukhumi_Babushara´
|
||||
-- * ´AIRBASE.Caucasus.Tbilisi_Lochini´
|
||||
-- * ´AIRBASE.Caucasus.Vaziani´
|
||||
--
|
||||
--
|
||||
-- # Installation
|
||||
--
|
||||
-- ## In Single Player Missions
|
||||
--
|
||||
-- AIRBASEPOLICE is fully functional in single player.
|
||||
-- ATC_GROUND is fully functional in single player.
|
||||
--
|
||||
-- ## In Multi Player Missions
|
||||
--
|
||||
-- AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission.
|
||||
-- ATC_GROUND is NOT functional in multi player, for client machines connecting to the server, running the mission.
|
||||
-- Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player.
|
||||
-- To work around this problem, a much better solution has been made, using the slot blocker script designed
|
||||
-- by Ciribob. With the help of __Ciribob__, this script has been extended to also kick client players while in flight.
|
||||
-- AIRBASEPOLICE is communicating with this modified script to kick players!
|
||||
-- ATC_GROUND is communicating with this modified script to kick players!
|
||||
--
|
||||
-- Install the file **SimpleSlotBlockGameGUI.lua** on the server, following the installation instructions described by Ciribob.
|
||||
--
|
||||
@@ -317,18 +318,26 @@ end
|
||||
--
|
||||
-- # Script it!
|
||||
--
|
||||
-- ## 1. AIRBASEPOLICE_CAUCASUS Constructor
|
||||
-- ## 1. ATC_GROUND_CAUCASUS Constructor
|
||||
--
|
||||
-- Creates a new AIRBASEPOLICE_CAUCASUS object that will monitor pilots taxiing behaviour.
|
||||
-- Creates a new ATC_GROUND_CAUCASUS object that will monitor pilots taxiing behaviour.
|
||||
--
|
||||
-- -- This creates a new AIRBASEPOLICE_CAUCASUS object.
|
||||
-- -- This creates a new ATC_GROUND_CAUCASUS object.
|
||||
--
|
||||
-- -- Monitor for these clients the airbases.
|
||||
-- AirbasePoliceCaucasus = AIRBASEPOLICE_CAUCASUS:New()
|
||||
-- -- Monitor all the airbases.
|
||||
-- AirbasePoliceCaucasus = ATC_GROUND_CAUCASUS:New()
|
||||
--
|
||||
-- -- Monitor specific airbases only.
|
||||
--
|
||||
-- @field #AIRBASEPOLICE_CAUCASUS
|
||||
AIRBASEPOLICE_CAUCASUS = {
|
||||
ClassName = "AIRBASEPOLICE_CAUCASUS",
|
||||
-- ATC_Ground = ATC_GROUND_CAUCASUS:New(
|
||||
-- { AIRBASE.Caucasus.Gelendzhik,
|
||||
-- AIRBASE.Caucasus.Krymsk
|
||||
-- }
|
||||
-- )
|
||||
--
|
||||
-- @field #ATC_GROUND_CAUCASUS
|
||||
ATC_GROUND_CAUCASUS = {
|
||||
ClassName = "ATC_GROUND_CAUCASUS",
|
||||
Airbases = {
|
||||
[AIRBASE.Caucasus.Anapa_Vityazevo] = {
|
||||
PointsRunways = {
|
||||
@@ -615,14 +624,14 @@ AIRBASEPOLICE_CAUCASUS = {
|
||||
},
|
||||
}
|
||||
|
||||
--- Creates a new AIRBASEPOLICE_CAUCASUS object.
|
||||
-- @param #AIRBASEPOLICE_CAUCASUS self
|
||||
--- Creates a new ATC_GROUND_CAUCASUS object.
|
||||
-- @param #ATC_GROUND_CAUCASUS self
|
||||
-- @param AirbaseNames A list {} of airbase names (Use AIRBASE.Caucasus enumerator).
|
||||
-- @return #AIRBASEPOLICE_CAUCASUS self
|
||||
function AIRBASEPOLICE_CAUCASUS:New( AirbaseNames )
|
||||
-- @return #ATC_GROUND_CAUCASUS self
|
||||
function ATC_GROUND_CAUCASUS:New( AirbaseNames )
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( self.Airbases, AirbaseNames ) )
|
||||
local self = BASE:Inherit( self, ATC_GROUND:New( self.Airbases, AirbaseNames ) )
|
||||
|
||||
|
||||
|
||||
@@ -838,15 +847,15 @@ end
|
||||
|
||||
|
||||
|
||||
--- @type AIRBASEPOLICE_NEVADA
|
||||
-- @extends #AIRBASEPOLICE_BASE
|
||||
--- @type ATC_GROUND_NEVADA
|
||||
-- @extends #ATC_GROUND
|
||||
|
||||
|
||||
--- # AIRBASEPOLICE_NEVADA, extends @{#AIRBASEPOLICE_BASE}
|
||||
--- # ATC_GROUND_NEVADA, extends @{#ATC_GROUND}
|
||||
--
|
||||
-- 
|
||||
-- 
|
||||
--
|
||||
-- The AIRBASEPOLICE_NEVADA class monitors the speed of the airplanes at the airbase during taxi.
|
||||
-- The ATC_GROUND_NEVADA class monitors the speed of the airplanes at the airbase during taxi.
|
||||
-- The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.
|
||||
--
|
||||
-- The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving
|
||||
@@ -856,27 +865,41 @@ end
|
||||
--
|
||||
-- # Airbases monitored
|
||||
--
|
||||
-- The following airbases are monitored at the Caucasus region:
|
||||
-- The following airbases are monitored at the Nevada region.
|
||||
-- Use the AIRBASE.Nevada enumeration to select the airbases to be monitored.
|
||||
--
|
||||
-- * Nellis
|
||||
-- * McCarran
|
||||
-- * Creech
|
||||
-- * GroomLake
|
||||
--
|
||||
-- * `AIRBASE.Nevada.Beatty_Airport`
|
||||
-- * `AIRBASE.Nevada.Boulder_City_Airport`
|
||||
-- * `AIRBASE.Nevada.Creech_AFB`
|
||||
-- * `AIRBASE.Nevada.Echo_Bay`
|
||||
-- * `AIRBASE.Nevada.Groom_Lake_AFB`
|
||||
-- * `AIRBASE.Nevada.Henderson_Executive_Airport`
|
||||
-- * `AIRBASE.Nevada.Jean_Airport`
|
||||
-- * `AIRBASE.Nevada.Laughlin_Airport`
|
||||
-- * `AIRBASE.Nevada.Lincoln_County`
|
||||
-- * `AIRBASE.Nevada.McCarran_International_Airport`
|
||||
-- * `AIRBASE.Nevada.Mellan_Airstrip`
|
||||
-- * `AIRBASE.Nevada.Mesquite`
|
||||
-- * `AIRBASE.Nevada.Mina_Airport_3Q0`
|
||||
-- * `AIRBASE.Nevada.Nellis_AFB`
|
||||
-- * `AIRBASE.Nevada.North_Las_Vegas`
|
||||
-- * `AIRBASE.Nevada.Pahute_Mesa_Airstrip`
|
||||
-- * `AIRBASE.Nevada.Tonopah_Airport`
|
||||
-- * `AIRBASE.Nevada.Tonopah_Test_Range_Airfield`
|
||||
--
|
||||
-- # Installation
|
||||
--
|
||||
-- ## In Single Player Missions
|
||||
--
|
||||
-- AIRBASEPOLICE is fully functional in single player.
|
||||
-- ATC_GROUND is fully functional in single player.
|
||||
--
|
||||
-- ## In Multi Player Missions
|
||||
--
|
||||
-- AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission.
|
||||
-- ATC_GROUND is NOT functional in multi player, for client machines connecting to the server, running the mission.
|
||||
-- Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player.
|
||||
-- To work around this problem, a much better solution has been made, using the slot blocker script designed
|
||||
-- by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight.
|
||||
-- AIRBASEPOLICE is communicating with this modified script to kick players!
|
||||
-- ATC_GROUND is communicating with this modified script to kick players!
|
||||
--
|
||||
-- Install the file **SimpleSlotBlockGameGUI.lua** on the server, following the installation instructions described by Ciribob.
|
||||
--
|
||||
@@ -884,18 +907,29 @@ end
|
||||
--
|
||||
-- # Script it!
|
||||
--
|
||||
-- ## 1. AIRBASEPOLICE_NEVADA Constructor
|
||||
-- ## 1. ATC_GROUND_NEVADA Constructor
|
||||
--
|
||||
-- Creates a new AIRBASEPOLICE_NEVADA object that will monitor pilots taxiing behaviour.
|
||||
-- Creates a new ATC_GROUND_NEVADA object that will monitor pilots taxiing behaviour.
|
||||
--
|
||||
-- -- This creates a new AIRBASEPOLICE_NEVADA object.
|
||||
-- -- This creates a new ATC_GROUND_NEVADA object.
|
||||
--
|
||||
-- -- Monitor for these clients the airbases.
|
||||
-- AirbasePoliceCaucasus = AIRBASEPOLICE_NEVADA:New()
|
||||
-- -- Monitor all the airbases.
|
||||
-- AirbasePoliceCaucasus = ATC_GROUND_NEVADA:New()
|
||||
--
|
||||
-- @field #AIRBASEPOLICE_NEVADA
|
||||
AIRBASEPOLICE_NEVADA = {
|
||||
ClassName = "AIRBASEPOLICE_NEVADA",
|
||||
--
|
||||
-- -- Monitor specific airbases.
|
||||
-- ATC_Ground = ATC_GROUND_NEVADA:New(
|
||||
-- { AIRBASE.Nevada.Laughlin_Airport,
|
||||
-- AIRBASE.Nevada.Mellan_Airstrip,
|
||||
-- AIRBASE.Nevada.Lincoln_County,
|
||||
-- AIRBASE.Nevada.North_Las_Vegas,
|
||||
-- AIRBASE.Nevada.McCarran_International_Airport
|
||||
-- }
|
||||
-- )
|
||||
--
|
||||
-- @field #ATC_GROUND_NEVADA
|
||||
ATC_GROUND_NEVADA = {
|
||||
ClassName = "ATC_GROUND_NEVADA",
|
||||
Airbases = {
|
||||
|
||||
[AIRBASE.Nevada.Beatty_Airport] = {
|
||||
@@ -1165,14 +1199,14 @@ AIRBASEPOLICE_NEVADA = {
|
||||
},
|
||||
}
|
||||
|
||||
--- Creates a new AIRBASEPOLICE_NEVADA object.
|
||||
-- @param #AIRBASEPOLICE_NEVADA self
|
||||
--- Creates a new ATC_GROUND_NEVADA object.
|
||||
-- @param #ATC_GROUND_NEVADA self
|
||||
-- @param AirbaseNames A list {} of airbase names (Use AIRBASE.Nevada enumerator).
|
||||
-- @return #AIRBASEPOLICE_NEVADA self
|
||||
function AIRBASEPOLICE_NEVADA:New( AirbaseNames )
|
||||
-- @return #ATC_GROUND_NEVADA self
|
||||
function ATC_GROUND_NEVADA:New( AirbaseNames )
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( self.Airbases, AirbaseNames ) )
|
||||
local self = BASE:Inherit( self, ATC_GROUND:New( self.Airbases, AirbaseNames ) )
|
||||
|
||||
|
||||
|
||||
@@ -1335,15 +1369,15 @@ function AIRBASEPOLICE_NEVADA:New( AirbaseNames )
|
||||
|
||||
end
|
||||
|
||||
--- @type AIRBASEPOLICE_NORMANDY
|
||||
-- @extends Functional.AirbasePolice#AIRBASEPOLICE_BASE
|
||||
--- @type ATC_GROUND_NORMANDY
|
||||
-- @extends #ATC_GROUND
|
||||
|
||||
|
||||
--- # AIRBASEPOLICE_NORMANDY, extends @{#AIRBASEPOLICE_BASE}
|
||||
--- # ATC_GROUND_NORMANDY, extends @{#ATC_GROUND}
|
||||
--
|
||||
-- 
|
||||
-- 
|
||||
--
|
||||
-- The AIRBASEPOLICE_NORMANDY class monitors the speed of the airplanes at the airbase during taxi.
|
||||
-- The ATC_GROUND_NORMANDY class monitors the speed of the airplanes at the airbase during taxi.
|
||||
-- The pilots may not drive faster than the maximum speed for the airbase, or they will be despawned.
|
||||
--
|
||||
-- The pilot will receive 3 times a warning during speeding. After the 3rd warning, if the pilot is still driving
|
||||
@@ -1353,27 +1387,54 @@ end
|
||||
--
|
||||
-- # Airbases monitored
|
||||
--
|
||||
-- The following airbases are monitored at the Caucasus region:
|
||||
-- The following airbases are monitored at the Normandy region.
|
||||
-- Use the AIRBASE.Normandy enumeration to select the airbases to be monitored.
|
||||
--
|
||||
-- * Nellis
|
||||
-- * McCarran
|
||||
-- * Creech
|
||||
-- * GroomLake
|
||||
--
|
||||
-- * ´AIRBASE.Normandy.Azeville´
|
||||
-- * ´AIRBASE.Normandy.Bazenville´
|
||||
-- * ´AIRBASE.Normandy.Beny_sur_Mer´
|
||||
-- * ´AIRBASE.Normandy.Beuzeville´
|
||||
-- * ´AIRBASE.Normandy.Biniville´
|
||||
-- * ´AIRBASE.Normandy.Brucheville´
|
||||
-- * ´AIRBASE.Normandy.Cardonville´
|
||||
-- * ´AIRBASE.Normandy.Carpiquet´
|
||||
-- * ´AIRBASE.Normandy.Chailey´
|
||||
-- * ´AIRBASE.Normandy.Chippelle´
|
||||
-- * ´AIRBASE.Normandy.Cretteville´
|
||||
-- * ´AIRBASE.Normandy.Cricqueville_en_Bessin´
|
||||
-- * ´AIRBASE.Normandy.Deux_Jumeaux´
|
||||
-- * ´AIRBASE.Normandy.Evreux´
|
||||
-- * ´AIRBASE.Normandy.Ford´
|
||||
-- * ´AIRBASE.Normandy.Funtington´
|
||||
-- * ´AIRBASE.Normandy.Lantheuil´
|
||||
-- * ´AIRBASE.Normandy.Le_Molay´
|
||||
-- * ´AIRBASE.Normandy.Lessay´
|
||||
-- * ´AIRBASE.Normandy.Lignerolles´
|
||||
-- * ´AIRBASE.Normandy.Longues_sur_Mer´
|
||||
-- * ´AIRBASE.Normandy.Maupertus´
|
||||
-- * ´AIRBASE.Normandy.Meautis´
|
||||
-- * ´AIRBASE.Normandy.Needs_Oar_Point´
|
||||
-- * ´AIRBASE.Normandy.Picauville´
|
||||
-- * ´AIRBASE.Normandy.Rucqueville´
|
||||
-- * ´AIRBASE.Normandy.Saint_Pierre_du_Mont´
|
||||
-- * ´AIRBASE.Normandy.Sainte_Croix_sur_Mer´
|
||||
-- * ´AIRBASE.Normandy.Sainte_Laurent_sur_Mer´
|
||||
-- * ´AIRBASE.Normandy.Sommervieu´
|
||||
-- * ´AIRBASE.Normandy.Tangmere´
|
||||
--
|
||||
-- # Installation
|
||||
--
|
||||
-- ## In Single Player Missions
|
||||
--
|
||||
-- AIRBASEPOLICE is fully functional in single player.
|
||||
-- ATC_GROUND is fully functional in single player.
|
||||
--
|
||||
-- ## In Multi Player Missions
|
||||
--
|
||||
-- AIRBASEPOLICE is NOT functional in multi player, for client machines connecting to the server, running the mission.
|
||||
-- ATC_GROUND is NOT functional in multi player, for client machines connecting to the server, running the mission.
|
||||
-- Due to a bug in DCS since release 1.5, the despawning of clients are not anymore working in multi player.
|
||||
-- To work around this problem, a much better solution has been made, using the slot blocker script designed
|
||||
-- by Ciribob. With the help of Ciribob, this script has been extended to also kick client players while in flight.
|
||||
-- AIRBASEPOLICE is communicating with this modified script to kick players!
|
||||
-- ATC_GROUND is communicating with this modified script to kick players!
|
||||
--
|
||||
-- Install the file **SimpleSlotBlockGameGUI.lua** on the server, following the installation instructions described by Ciribob.
|
||||
--
|
||||
@@ -1381,18 +1442,25 @@ end
|
||||
--
|
||||
-- # Script it!
|
||||
--
|
||||
-- ## 1. AIRBASEPOLICE_NORMANDY Constructor
|
||||
-- ## 1. ATC_GROUND_NORMANDY Constructor
|
||||
--
|
||||
-- Creates a new AIRBASEPOLICE_NORMANDY object that will monitor pilots taxiing behaviour.
|
||||
-- Creates a new ATC_GROUND_NORMANDY object that will monitor pilots taxiing behaviour.
|
||||
--
|
||||
-- -- This creates a new AIRBASEPOLICE_NORMANDY object.
|
||||
-- -- This creates a new ATC_GROUND_NORMANDY object.
|
||||
--
|
||||
-- -- Monitor for these clients the airbases.
|
||||
-- AirbasePoliceCaucasus = AIRBASEPOLICE_NORMANDY:New()
|
||||
-- AirbasePoliceCaucasus = ATC_GROUND_NORMANDY:New()
|
||||
--
|
||||
-- ATC_Ground = ATC_GROUND_NORMANDY:New(
|
||||
-- { AIRBASE.Normandy.Chippelle,
|
||||
-- AIRBASE.Normandy.Beuzeville
|
||||
-- }
|
||||
-- )
|
||||
--
|
||||
--
|
||||
-- @field #AIRBASEPOLICE_NORMANDY
|
||||
AIRBASEPOLICE_NORMANDY = {
|
||||
ClassName = "AIRBASEPOLICE_NORMANDY",
|
||||
-- @field #ATC_GROUND_NORMANDY
|
||||
ATC_GROUND_NORMANDY = {
|
||||
ClassName = "ATC_GROUND_NORMANDY",
|
||||
Airbases = {
|
||||
[AIRBASE.Normandy.Azeville] = {
|
||||
PointsRunways = {
|
||||
@@ -1784,14 +1852,14 @@ AIRBASEPOLICE_NORMANDY = {
|
||||
}
|
||||
|
||||
|
||||
--- Creates a new AIRBASEPOLICE_NORMANDY object.
|
||||
-- @param #AIRBASEPOLICE_NORMANDY self
|
||||
--- Creates a new ATC_GROUND_NORMANDY object.
|
||||
-- @param #ATC_GROUND_NORMANDY self
|
||||
-- @param AirbaseNames A list {} of airbase names (Use AIRBASE.Normandy enumerator).
|
||||
-- @return #AIRBASEPOLICE_NORMANDY self
|
||||
function AIRBASEPOLICE_NORMANDY:New( AirbaseNames )
|
||||
-- @return #ATC_GROUND_NORMANDY self
|
||||
function ATC_GROUND_NORMANDY:New( AirbaseNames )
|
||||
|
||||
-- Inherits from BASE
|
||||
local self = BASE:Inherit( self, AIRBASEPOLICE_BASE:New( self.Airbases, AirbaseNames ) )
|
||||
local self = BASE:Inherit( self, ATC_GROUND:New( self.Airbases, AirbaseNames ) )
|
||||
|
||||
-- These lines here are for the demonstration mission.
|
||||
-- They create in the dcs.log the coordinates of the runway polygons, that are then
|
||||
@@ -57,7 +57,33 @@ AIRBASE = {
|
||||
},
|
||||
}
|
||||
|
||||
--- @field Caucasus
|
||||
--- Enumeration to identify the airbases in the Caucasus region.
|
||||
--
|
||||
-- These are all airbases of Caucasus:
|
||||
--
|
||||
-- * AIRBASE.Caucasus.Gelendzhik
|
||||
-- * AIRBASE.Caucasus.Krasnodar_Pashkovsky
|
||||
-- * AIRBASE.Caucasus.Sukhumi_Babushara
|
||||
-- * AIRBASE.Caucasus.Gudauta
|
||||
-- * AIRBASE.Caucasus.Batumi
|
||||
-- * AIRBASE.Caucasus.Senaki_Kolkhi
|
||||
-- * AIRBASE.Caucasus.Kobuleti
|
||||
-- * AIRBASE.Caucasus.Kutaisi
|
||||
-- * AIRBASE.Caucasus.Tbilisi_Lochini
|
||||
-- * AIRBASE.Caucasus.Soganlug
|
||||
-- * AIRBASE.Caucasus.Vaziani
|
||||
-- * AIRBASE.Caucasus.Anapa_Vityazevo
|
||||
-- * AIRBASE.Caucasus.Krasnodar_Center
|
||||
-- * AIRBASE.Caucasus.Novorossiysk
|
||||
-- * AIRBASE.Caucasus.Krymsk
|
||||
-- * AIRBASE.Caucasus.Maykop_Khanskaya
|
||||
-- * AIRBASE.Caucasus.Sochi_Adler
|
||||
-- * AIRBASE.Caucasus.Mineralnye_Vody
|
||||
-- * AIRBASE.Caucasus.Nalchik
|
||||
-- * AIRBASE.Caucasus.Mozdok
|
||||
-- * AIRBASE.Caucasus.Beslan
|
||||
--
|
||||
-- @field Caucasus
|
||||
AIRBASE.Caucasus = {
|
||||
["Gelendzhik"] = "Gelendzhik",
|
||||
["Krasnodar_Pashkovsky"] = "Krasnodar-Pashkovsky",
|
||||
@@ -83,6 +109,28 @@ AIRBASE.Caucasus = {
|
||||
}
|
||||
|
||||
--- @field Nevada
|
||||
--
|
||||
-- These are all airbases of Nevada:
|
||||
--
|
||||
-- * AIRBASE.Nevada.Creech_AFB
|
||||
-- * AIRBASE.Nevada.Groom_Lake_AFB
|
||||
-- * AIRBASE.Nevada.McCarran_International_Airport
|
||||
-- * AIRBASE.Nevada.Nellis_AFB
|
||||
-- * AIRBASE.Nevada.Beatty_Airport
|
||||
-- * AIRBASE.Nevada.Boulder_City_Airport
|
||||
-- * AIRBASE.Nevada.Echo_Bay
|
||||
-- * AIRBASE.Nevada.Henderson_Executive_Airport
|
||||
-- * AIRBASE.Nevada.Jean_Airport
|
||||
-- * AIRBASE.Nevada.Laughlin_Airport
|
||||
-- * AIRBASE.Nevada.Lincoln_County
|
||||
-- * AIRBASE.Nevada.Mellan_Airstrip
|
||||
-- * AIRBASE.Nevada.Mesquite
|
||||
-- * AIRBASE.Nevada.Mina_Airport_3Q0
|
||||
-- * AIRBASE.Nevada.North_Las_Vegas
|
||||
-- * AIRBASE.Nevada.Pahute_Mesa_Airstrip
|
||||
-- * AIRBASE.Nevada.Tonopah_Airport
|
||||
-- * AIRBASE.Nevada.Tonopah_Test_Range_Airfield
|
||||
--
|
||||
AIRBASE.Nevada = {
|
||||
["Creech_AFB"] = "Creech AFB",
|
||||
["Groom_Lake_AFB"] = "Groom Lake AFB",
|
||||
@@ -105,6 +153,40 @@ AIRBASE.Nevada = {
|
||||
}
|
||||
|
||||
--- @field Normandy
|
||||
--
|
||||
-- These are all airbases of Normandy:
|
||||
--
|
||||
-- * AIRBASE.Normandy.Saint_Pierre_du_Mont
|
||||
-- * AIRBASE.Normandy.Lignerolles
|
||||
-- * AIRBASE.Normandy.Cretteville
|
||||
-- * AIRBASE.Normandy.Maupertus
|
||||
-- * AIRBASE.Normandy.Brucheville
|
||||
-- * AIRBASE.Normandy.Meautis
|
||||
-- * AIRBASE.Normandy.Cricqueville_en_Bessin
|
||||
-- * AIRBASE.Normandy.Lessay
|
||||
-- * AIRBASE.Normandy.Sainte_Laurent_sur_Mer
|
||||
-- * AIRBASE.Normandy.Biniville
|
||||
-- * AIRBASE.Normandy.Cardonville
|
||||
-- * AIRBASE.Normandy.Deux_Jumeaux
|
||||
-- * AIRBASE.Normandy.Chippelle
|
||||
-- * AIRBASE.Normandy.Beuzeville
|
||||
-- * AIRBASE.Normandy.Azeville
|
||||
-- * AIRBASE.Normandy.Picauville
|
||||
-- * AIRBASE.Normandy.Le_Molay
|
||||
-- * AIRBASE.Normandy.Longues_sur_Mer
|
||||
-- * AIRBASE.Normandy.Carpiquet
|
||||
-- * AIRBASE.Normandy.Bazenville
|
||||
-- * AIRBASE.Normandy.Sainte_Croix_sur_Mer
|
||||
-- * AIRBASE.Normandy.Beny_sur_Mer
|
||||
-- * AIRBASE.Normandy.Rucqueville
|
||||
-- * AIRBASE.Normandy.Sommervieu
|
||||
-- * AIRBASE.Normandy.Lantheuil
|
||||
-- * AIRBASE.Normandy.Evreux
|
||||
-- * AIRBASE.Normandy.Chailey
|
||||
-- * AIRBASE.Normandy.Needs_Oar_Point
|
||||
-- * AIRBASE.Normandy.Funtington
|
||||
-- * AIRBASE.Normandy.Tangmere
|
||||
-- * AIRBASE.Normandy.Ford
|
||||
AIRBASE.Normandy = {
|
||||
["Saint_Pierre_du_Mont"] = "Saint Pierre du Mont",
|
||||
["Lignerolles"] = "Lignerolles",
|
||||
@@ -149,7 +231,7 @@ function AIRBASE:Register( AirbaseName )
|
||||
|
||||
local self = BASE:Inherit( self, POSITIONABLE:New( AirbaseName ) )
|
||||
self.AirbaseName = AirbaseName
|
||||
self.AirbaseZone = ZONE_RADIUS:New( AirbaseName, self:GetVec2(), 8000 )
|
||||
self.AirbaseZone = ZONE_RADIUS:New( AirbaseName, self:GetVec2(), 2500 )
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user