Buzzer1977 Posted October 14, 2023 Posted October 14, 2023 Why are there no attributes for boom/drogue on tankers ? For receiver aircraft we have at least ["tankerType"], but recepticle/probe attributes would be nice for receiver aircraft too. This would make scripting much more convenient then maintaining compatibility lists. Something like this: AirTankerType = { DROGUE = "DROGUE", BOOM = "BOOM", BOOM_AND_DROGUE = "BOOM+DROGUE", } function getTankerType( unit ) if unit then local attributes = unit:getAttributes() if attributes and attributes["Tankers"] and attributes["Boom"] and attributes["Drogue"] then return AirTankerType .BOOM_AND_DROGUE end if attributes and attributes["Tankers"] and attributes["Boom"] then return AirTankerType .BOOM end if attributes and attributes["Tankers"] and attributes["Drogue"] then return AirTankerType .DROGUE end -- Not a tanker end return nil end function getRefulingType( unit ) if unit then local attributes = unit:getAttributes() if attributes and attributes ["tankerType"] ==0 then return AirTankerType .BOOM end if attributes and attributes ["tankerType"] ==1 then return AirTankerType .DROGUE end -- Not a tanker end return nil end Something compareable already works fine with aircraft carrier types to decide between CATOBAR/STOBAR/STOLV. function getCarrierType( unit ) if unit then local attributes = unit:getAttributes() if attributes and attributes["AircraftCarrier"] and attributes["Arresting Gear"] and attributes["catapult"] then return CarrierType.CATOBAR end if attributes and attributes["AircraftCarrier"] and attributes["Arresting Gear"] then return CarrierType.STOBAR end if attributes and attributes["AircraftCarrier"] then -- workaround because Type 071 reports back as a AircraftCarrier, but isn't if attributes["typeName"] == "Type_071" then return nil end return CarrierType.STOLV end -- Not a carrier end return nil end AMD Ryzen 9 5950x, MSI MEG x570 Unify, G.Skill 128GB DDR4-3200, MSI RTX3090 Ventus 3x 24GB, Samsung PCIe 4.0 M.2 1TB 980 Pro, Seagate PCIe 4.0 M.2 2TB FireCuda 520, Quest 3
Recommended Posts