diff --git a/Models/A320-200-CFM.xml b/Models/A320-200-CFM.xml index d11dd6ef..e87d72d7 100644 --- a/Models/A320-200-CFM.xml +++ b/Models/A320-200-CFM.xml @@ -33,4 +33,19 @@ EnginesCFM Aircraft/A320-family/Models/Engines/XMLs/a320.cfm.xml + + + + + + livery_update.stop(); + + diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas index 0f58771c..c13715df 100644 --- a/Nasal/Libraries/libraries.nas +++ b/Nasal/Libraries/libraries.nas @@ -38,7 +38,21 @@ var stateR = 0; var tiresmoke_system = aircraft.tyresmoke_system.new(0, 1, 2); aircraft.rain.init(); -aircraft.livery.init(getprop("/sim/model/livery-dir")); +var livery = aircraft.canvas_livery.init("Models/Liveries/A320/CFM"); +var elements = ["Fuselage", "Wings", "Hstabs", "ElevatorL", "ElevatorR", "FlapL1", "FlapL2", "FlapR1", "FlapR2", "SpoilerL1", "SpoilerL2", "SpoilerL3", "SpoilerL4", "SpoilerL5", "SpoilerR1", "SpoilerR2", "SpoilerR3", "SpoilerR4", "SpoilerR5", "DoorL1", "DoorL4", "DoorR1", "DoorR4", "Cargo1", "Cargo2", "Cargo3", "MLGGearDoorR", "MLGGearDoorL", "MLGWingDoorR1", "MLGWingDoorL1", "MLGWingDoorR2", "MLGWingDoorL2", "NLGForewardDoorL", "NLGForewardDoorR", "NLGAftDoorL", "NLGAftDoorR", "GPUServiceDoor", "AvionicsVentDoor", "OutflowValveDoor1", "OutflowValveDoor2", "ApuFlap", "Rudder", "Sharklet", "WingtipFence"]; +livery.createTarget("fuselage", elements, "/sim/model/livery/texture-fuselage", resolution=8192); +livery.addLayer("fuselage", "dirt", "Aircraft/A320-family/Models/seam-dirt.png"); + +var aero = getprop("/sim/aero"); +if (aero == "A320-200-CFM") { + elements = ["EngineCFM56R", "EngineCFM56L", "PylonCFM56R", "PylonCFM56L", "ReverseRDoor1", "ReverseRDoor2", "ReverseRDoor3", "ReverseRDoor4", "ReverseLDoor1", "ReverseLDoor2", "ReverseLDoor3", "ReverseLDoor4"]; + livery.createTarget("engines", elements, "/sim/model/livery/texture-engine"); + livery.addLayer("engines", "dirt", "Aircraft/A320-family/Models/CFM-Dirt-test-s.png"); +} else if (aero == "A320-200-IAE") { + elements = ["EngineIAEV2500R", "EngineIAEV2500L", "PylonIAEV2500R", "PylonIAEV2500R", "ReverserRDoor", "ReverserLDoor"]; + livery.createTarget("engines", elements, "/sim/model/livery/texture-engine"); + livery.addLayer("engines", "dirt", "Aircraft/A320-family/Models/CFM-Dirt-test-s.png"); +} ########## # Sounds #