1
0
Fork 0

Work over mp

Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
fly 2021-07-31 11:44:35 +00:00
parent a847deae80
commit 5675f78dc0
4 changed files with 14 additions and 9 deletions

View file

@ -22,10 +22,10 @@
<load><![CDATA[
var livery_update = aircraft.canvas_livery_update.init("Models/Liveries/A320/CFM", _module_id);
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", "RatDoorL", "RatDoorR"];
livery_update.createTarget("fuselage", elements, "/sim/model/livery/texture-fuselage", resolution=8192);
livery_update.createTarget("fuselage", elements, "sim/model/livery/texture-fuselage", resolution=8192);
elements = ["EngineCFM56R", "EngineCFM56L", "PylonCFM56R", "PylonCFM56L", "ReverserRDoor1", "ReverserRDoor2", "ReverserRDoor3", "ReverserRDoor4", "ReverserLDoor1", "ReverserLDoor2", "ReverserLDoor3", "ReverserLDoor4"];
livery_update.createTarget("engines", elements, "/sim/model/livery/texture-engine");
livery_update.createTarget("engines", elements, "sim/model/livery/texture-engine");
]]></load>
<unload>
livery_update.stop();

View file

@ -18,9 +18,14 @@
<!-- Nasal code -->
<nasal>
<load>
var livery_update = aircraft.livery_update.new("Aircraft/A320-family/Models/Liveries/A320/IAE");
</load>
<load><![CDATA[
var livery_update = aircraft.canvas_livery_update.init("Models/Liveries/A320/IAE", _module_id);
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", "RatDoorL", "RatDoorR"];
livery_update.createTarget("fuselage", elements, "sim/model/livery/texture-fuselage", resolution=8192);
elements = ["EngineIAEV2500R", "EngineIAEV2500L", "PylonIAEV2500R", "PylonIAEV2500R", "ReverserRDoor", "ReverserLDoor"];
livery_update.createTarget("engines", elements, "sim/model/livery/texture-engine");
]]></load>
<unload>
livery_update.stop();
</unload>

View file

@ -174,7 +174,7 @@ var canvas_livery_update = {
return nil;
}
me.targets[name].layers["base"] = me.targets[name].groups["base"].createChild("image").setFile(me.liveriesdir ~ "/" ~ resStr ~ "/" ~ getprop(property)).setSize(resolution,resolution);
me.targets[name].listener = setlistener(property, func(property) {
me.targets[name].listener = setlistener("/ai/models/multiplayer[" ~ me.module_id ~ "]/" ~ property, func(property) {
resStr = findTexByRes(me.liveriesdir, property.getValue(), resolution);
if (resStr == nil) {
return nil;

View file

@ -40,17 +40,17 @@ var aero = getprop("/sim/aero");
if (aero == "A320-200-CFM") {
var livery = aircraft.canvas_livery.init("Models/Liveries/A320/CFM");
elements = ["EngineCFM56R", "EngineCFM56L", "PylonCFM56R", "PylonCFM56L", "ReverserRDoor1", "ReverserRDoor2", "ReverserRDoor3", "ReverserRDoor4", "ReverserLDoor1", "ReverserLDoor2", "ReverserLDoor3", "ReverserLDoor4"];
livery.createTarget("engines", elements, "/sim/model/livery/texture-engine");
livery.createTarget("engines", elements, "sim/model/livery/texture-engine");
livery.addLayer("engines", "dirt", "Aircraft/A320-family/Models/Liveries/A320/CFM/engine-dirt.png");
} else if (aero == "A320-200-IAE") {
var livery = aircraft.canvas_livery.init("Models/Liveries/A320/IAE");
elements = ["EngineIAEV2500R", "EngineIAEV2500L", "PylonIAEV2500R", "PylonIAEV2500R", "ReverserRDoor", "ReverserLDoor"];
livery.createTarget("engines", elements, "/sim/model/livery/texture-engine");
livery.createTarget("engines", elements, "sim/model/livery/texture-engine");
livery.addLayer("engines", "dirt", "Aircraft/A320-family/Models/Liveries/A320/IAE/engine-dirt.png");
}
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", "RatDoorL", "RatDoorR"];
livery.createTarget("fuselage", elements, "/sim/model/livery/texture-fuselage", resolution=16384);
livery.createTarget("fuselage", elements, "sim/model/livery/texture-fuselage", resolution=16384);
livery.addLayer("fuselage", "dirt", "Aircraft/A320-family/Models/Liveries/A320/fuselage-dirt.png");
#########