Updated Moose.lua

This commit is contained in:
funkyfranky
2024-01-01 22:48:35 +00:00
parent d0ce19b779
commit 966a374f98
150 changed files with 6601 additions and 6601 deletions
@@ -1,76 +1,76 @@
---
-- Name: RAT-010 - Traffic at McCarran International
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
-- Updated: 10 Oct 2023
--
-- # Situation:
--
-- We want to generate some random air traffic at McCarran International Airport.
--
-- # Test cases:
--
-- 1. KC-135 aircraft are spawned at zones north and east heading to McCarran.
-- 2. E-3A aircraft are spawned at McCarran with random destinations.
-- 3. Yak-40 aircraft are spawned at random airports heading for McCarran.
-- 3. TF-51D aircraft are spawned at Henderson, Boulder City or Echo Bay heading for McCarran.
-- Create RAT object from KC-135 template.
local kc135=RAT:New("RAT_KC135")
kc135:SetCoalition("same")
-- Set departure zones. We need takeoff "air" for that.
kc135:SetDeparture({"RAT Zone North", "RAT Zone East"})
-- Set spawn in air.
kc135:SetTakeoff("air")
-- Aircraft will fly to McCarran
kc135:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn two aircraft.
kc135:Spawn(2)
-- Create RAT object from E-3A template.
local e3=RAT:New("RAT_E3")
e3:SetCoalition("same")
-- Aircraft are spawned at McCarran. Destinations are random.
e3:SetDeparture(AIRBASE.Nevada.McCarran_International_Airport)
-- Enable respawn after landing with a delay of six minutes.
e3:RespawnAfterLanding(360)
-- Spawn two aircraft.
e3:Spawn(2)
-- Create RAT object from Yak-40 template.
local yak=RAT:New("RAT_YAK")
-- These are the airports a Yak-40 gets a parking slot.
yak:SetDeparture({AIRBASE.Nevada.Tonopah_Airport, AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Henderson_Executive_Airport, AIRBASE.Nevada.Nellis_AFB, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Laughlin_Airport})
-- Destination McCarran.
yak:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn eight Yak-40.
yak:Spawn(8)
-- Create RAT object from E-3A template.
local tf51=RAT:New("RAT_TF51")
tf51:SetCoalition("same")
-- Departure airport will be chosen from this list.
tf51:SetDeparture({AIRBASE.Nevada.Henderson_Executive_Airport, AIRBASE.Nevada.Boulder_City_Airport, AIRBASE.Nevada.Echo_Bay})
-- All will fly to McCarran.
tf51:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn four TF-51D
tf51:Spawn(4)
---
-- Name: RAT-010 - Traffic at McCarran International
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
-- Updated: 10 Oct 2023
--
-- # Situation:
--
-- We want to generate some random air traffic at McCarran International Airport.
--
-- # Test cases:
--
-- 1. KC-135 aircraft are spawned at zones north and east heading to McCarran.
-- 2. E-3A aircraft are spawned at McCarran with random destinations.
-- 3. Yak-40 aircraft are spawned at random airports heading for McCarran.
-- 3. TF-51D aircraft are spawned at Henderson, Boulder City or Echo Bay heading for McCarran.
-- Create RAT object from KC-135 template.
local kc135=RAT:New("RAT_KC135")
kc135:SetCoalition("same")
-- Set departure zones. We need takeoff "air" for that.
kc135:SetDeparture({"RAT Zone North", "RAT Zone East"})
-- Set spawn in air.
kc135:SetTakeoff("air")
-- Aircraft will fly to McCarran
kc135:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn two aircraft.
kc135:Spawn(2)
-- Create RAT object from E-3A template.
local e3=RAT:New("RAT_E3")
e3:SetCoalition("same")
-- Aircraft are spawned at McCarran. Destinations are random.
e3:SetDeparture(AIRBASE.Nevada.McCarran_International_Airport)
-- Enable respawn after landing with a delay of six minutes.
e3:RespawnAfterLanding(360)
-- Spawn two aircraft.
e3:Spawn(2)
-- Create RAT object from Yak-40 template.
local yak=RAT:New("RAT_YAK")
-- These are the airports a Yak-40 gets a parking slot.
yak:SetDeparture({AIRBASE.Nevada.Tonopah_Airport, AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Henderson_Executive_Airport, AIRBASE.Nevada.Nellis_AFB, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Laughlin_Airport})
-- Destination McCarran.
yak:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn eight Yak-40.
yak:Spawn(8)
-- Create RAT object from E-3A template.
local tf51=RAT:New("RAT_TF51")
tf51:SetCoalition("same")
-- Departure airport will be chosen from this list.
tf51:SetDeparture({AIRBASE.Nevada.Henderson_Executive_Airport, AIRBASE.Nevada.Boulder_City_Airport, AIRBASE.Nevada.Echo_Bay})
-- All will fly to McCarran.
tf51:SetDestination(AIRBASE.Nevada.McCarran_International_Airport)
-- Spawn four TF-51D
tf51:Spawn(4)
@@ -1,101 +1,101 @@
---
-- Name: RAT-011 - Traffic at Nellis AFB
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
-- Updated: 10 Oct 2023
--
-- # Situation:
--
-- We want to generate some random air traffic at Nellis AFB.
--
-- # Test cases:
--
-- 1. F-15C are spawned at Nellis with desitation Tonopah, Groom Lake or Creech.
-- 2. A-10C are spawned at Nellis with desitation Tonopah, Groom Lake or Creech.
-- 3. F/A-18C are spawned at Tonopah, Groom Lake or Creech and fly to Nellis.
-- 4. KC-135 are spawned in air at two zones heading for Nellis.
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from F-15C template.
local f15=RAT:New("RAT_F15C")
-- Departure Nellis.
f15:SetDeparture(AIRBASE.Nevada.Nellis_AFB)
f15:SetCoalition("same")
-- Destination Tonopah, Groom Lake or Creech.
f15:SetDestination({AIRBASE.Nevada.Tonopah_Airport, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Spawn three flights.
f15:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
local a10=RAT:New("RAT_A10C")
-- Departure Nellis.
a10:SetDeparture(AIRBASE.Nevada.Nellis_AFB)
a10:SetCoalition("same")
-- Destination Tonopa, Groom Lake or Creech.
a10:SetDestination({AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Spawning will happen 60 seconds after mission start.
a10:SetSpawnDelay(60)
-- Spawn three flights.
a10:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Creat RAT object from F/A-18C template.
local f18=RAT:New("RAT_F18C")
f18:SetCoalition("same")
-- Departure airports.
f18:SetDeparture({AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Destination Nellis.
f18:SetDestination(AIRBASE.Nevada.Nellis_AFB)
-- Spawn three flights.
f18:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from KC-135 template.
local kc135=RAT:New("RAT_KC135")
-- Set departure zones. We need takeoff "air" for that.
kc135:SetDeparture({"RAT Zone North", "RAT Zone East"})
-- Set spawn in air.
kc135:SetTakeoff("air")
-- Aircraft will fly to McCarran
kc135:SetDestination(AIRBASE.Nevada.Nellis_AFB)
-- Spawning of aircraft will happen in 2 minute intervalls.
kc135:SetSpawnInterval(120)
-- Spawn two aircraft.
kc135:Spawn(2)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Store time at mission start
local T0=timer.getTime()
-- Send message with current misson time to all coalisions
local function print_mission_time()
local Tnow=timer.getTime()
local mission_time=Tnow-T0
local mission_time_minutes=mission_time/60
local mission_time_seconds=mission_time%60
local text=string.format("Mission Time: %i:%02d", mission_time_minutes,mission_time_seconds)
MESSAGE:New(text, 5):ToAll()
end
-- Start scheduler to report mission time.
---
-- Name: RAT-011 - Traffic at Nellis AFB
-- Author: funkyfranky
-- Date Created: 24 Sep 2017
-- Updated: 10 Oct 2023
--
-- # Situation:
--
-- We want to generate some random air traffic at Nellis AFB.
--
-- # Test cases:
--
-- 1. F-15C are spawned at Nellis with desitation Tonopah, Groom Lake or Creech.
-- 2. A-10C are spawned at Nellis with desitation Tonopah, Groom Lake or Creech.
-- 3. F/A-18C are spawned at Tonopah, Groom Lake or Creech and fly to Nellis.
-- 4. KC-135 are spawned in air at two zones heading for Nellis.
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from F-15C template.
local f15=RAT:New("RAT_F15C")
-- Departure Nellis.
f15:SetDeparture(AIRBASE.Nevada.Nellis_AFB)
f15:SetCoalition("same")
-- Destination Tonopah, Groom Lake or Creech.
f15:SetDestination({AIRBASE.Nevada.Tonopah_Airport, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Spawn three flights.
f15:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
local a10=RAT:New("RAT_A10C")
-- Departure Nellis.
a10:SetDeparture(AIRBASE.Nevada.Nellis_AFB)
a10:SetCoalition("same")
-- Destination Tonopa, Groom Lake or Creech.
a10:SetDestination({AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Spawning will happen 60 seconds after mission start.
a10:SetSpawnDelay(60)
-- Spawn three flights.
a10:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Creat RAT object from F/A-18C template.
local f18=RAT:New("RAT_F18C")
f18:SetCoalition("same")
-- Departure airports.
f18:SetDeparture({AIRBASE.Nevada.Tonopah_Test_Range_Airfield, AIRBASE.Nevada.Groom_Lake_AFB, AIRBASE.Nevada.Creech_AFB})
-- Destination Nellis.
f18:SetDestination(AIRBASE.Nevada.Nellis_AFB)
-- Spawn three flights.
f18:Spawn(3)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Create RAT object from KC-135 template.
local kc135=RAT:New("RAT_KC135")
-- Set departure zones. We need takeoff "air" for that.
kc135:SetDeparture({"RAT Zone North", "RAT Zone East"})
-- Set spawn in air.
kc135:SetTakeoff("air")
-- Aircraft will fly to McCarran
kc135:SetDestination(AIRBASE.Nevada.Nellis_AFB)
-- Spawning of aircraft will happen in 2 minute intervalls.
kc135:SetSpawnInterval(120)
-- Spawn two aircraft.
kc135:Spawn(2)
-- -----------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Store time at mission start
local T0=timer.getTime()
-- Send message with current misson time to all coalisions
local function print_mission_time()
local Tnow=timer.getTime()
local mission_time=Tnow-T0
local mission_time_minutes=mission_time/60
local mission_time_seconds=mission_time%60
local text=string.format("Mission Time: %i:%02d", mission_time_minutes,mission_time_seconds)
MESSAGE:New(text, 5):ToAll()
end
-- Start scheduler to report mission time.
local Scheduler_Mission_Time = SCHEDULER:New(nil, print_mission_time, {}, 0, 10)