mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-18 20:12:45 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a3d77a5a71 | |||
| 394f3ffd88 | |||
| bff5f79282 | |||
| a3d7b4eba9 |
@@ -340,7 +340,7 @@ function AIRWING:AddSquadron(Squadron)
|
||||
local NAssets = Squadron.Ngroups * Nunits
|
||||
local storage = STORAGE:New(airbasename)
|
||||
--self:T(self.lid.."Adding "..typename.." #"..NAssets)
|
||||
if storage and storage:IsLimitedAircraft() and typename ~= "none" then
|
||||
if storage and storage.warehouse and storage:IsLimitedAircraft() and typename ~= "none" then
|
||||
local NInStore = storage:GetItemAmount(typename) or 0
|
||||
if NAssets > NInStore then
|
||||
storage:AddItem(typename,NAssets)
|
||||
|
||||
@@ -529,6 +529,7 @@ ENUMS.ReportingName =
|
||||
Orion = "P-3C",
|
||||
Viking = "S-3B",
|
||||
Osprey = "V-22",
|
||||
Intruder = "A6E",
|
||||
-- Bomber Rus
|
||||
Badger = "H6-J",
|
||||
Bear_J = "Tu-142", -- also Tu-95
|
||||
|
||||
@@ -1664,7 +1664,9 @@ end
|
||||
self:E(string.format("ERROR: Cound not get position Vec2 of airbase %s", AirbaseName))
|
||||
end
|
||||
|
||||
self:GetMinimumBoundingCircleFromParkingSpots( )
|
||||
if Nrunways>0 then
|
||||
self:GetMinimumBoundingCircleFromParkingSpots()
|
||||
end
|
||||
|
||||
-- Debug info.
|
||||
self:T2(string.format("Registered airbase %s", tostring(self.AirbaseName)))
|
||||
@@ -2230,6 +2232,7 @@ function AIRBASE:GetMinimumBoundingCircleFromParkingSpots(mark)
|
||||
if self.isAirdrome then
|
||||
if not self.parkingCircle then
|
||||
local spots = self:GetParkingSpotsVec2s()
|
||||
if #spots == 0 then return self.AirbaseZone end
|
||||
local center, radius = UTILS.GetMinimumBoundingCircle(spots)
|
||||
self.parkingCircle = ZONE_RADIUS:New(self.AirbaseName.." ParkingCircle",center,radius+50)
|
||||
if mark == true then
|
||||
|
||||
Reference in New Issue
Block a user