| 
     
      
      
      From: Emmanuel B. <he...@ba...> - 2010-05-02 17:02:59
      
     
   | 
Update of /var/cvs/FlightGear-0.9/data/Aircraft/Pterodactyl/Nasal In directory baron.flightgear.org:/tmp/cvs-serv25398/Nasal Added Files: doors.nas light.nas liveries.nas pterodactyl-keyboard.xml views.xml Log Message: - new plane --- NEW FILE "doors.nas" --- # ===== # Doors # ===== Doors = {}; Doors.new = func { obj = { parents : [Doors], crew : aircraft.door.new("instrumentation/doors/crew", 8.0), }; return obj; }; Doors.crewexport = func { me.crew.toggle(); } # ============== # Initialization # ============== # objects must be here, otherwise local to init() doorsystem = Doors.new(); --- NEW FILE "light.nas" --- var sbc1 = aircraft.light.new( "/sim/model/lights/sbc1", [0.5, 0.3] ); sbc1.interval = 0.1; sbc1.switch( 1 ); var sbc2 = aircraft.light.new( "/sim/model/lights/sbc2", [0.2, 0.3], "/sim/model/lights/sbc1/state" ); sbc2.interval = 0; sbc2.switch( 1 ); setlistener( "/sim/model/lights/sbc2/state", func(n) { var bsbc1 = sbc1.stateN.getValue(); var bsbc2 = n.getBoolValue(); var b = 0; if( bsbc1 and bsbc2 and getprop( "/controls/lighting/beacon") ) { b = 1; } else { b = 0; } setprop( "/sim/model/lights/beacon/enabled", b ); if( bsbc1 and !bsbc2 and getprop( "/controls/lighting/strobe" ) ) { b = 1; } else { b = 0; } setprop( "/sim/model/lights/strobe/enabled", b ); }); var beacon = aircraft.light.new( "/sim/model/lights/beacon", [0.05, 0.05] ); beacon.interval = 0; var strobe = aircraft.light.new( "/sim/model/lights/strobe", [0.05, 0.05, 0.05, 1] ); strobe.interval = 0; setprop( "/instrumentation/nav[0]/ident", 0 ); setprop( "/instrumentation/nav[1]/ident", 0 ); --- NEW FILE "liveries.nas" --- aircraft.livery.init("Aircraft/Pterodactyl/Models/Liveries"); --- NEW FILE "pterodactyl-keyboard.xml" --- <?xml version="1.0" encoding="UTF-8"?> <PropertyList> <key n="100"> <name>d</name> <desc>Canopy</desc> <binding> <command>nasal</command> <script>pterodactyl.doorsystem.crewexport();</script> </binding> </key> </PropertyList> --- NEW FILE "views.xml" --- <?xml version="1.0" encoding="UTF-8"?> <PropertyList> <chase-distance-m type="double" archive="y">-20.0</chase-distance-m> <view n="100"> <name>Tail Camera View</name> <type>lookfrom</type> <internal archive="y">true</internal> <config> <from-model type="bool">true</from-model> <from-model-idx type="int">0</from-model-idx> <ground-level-nearplane-m type="double">0.01f</ground-level-nearplane-m> <default-field-of-view-deg type="double">30</default-field-of-view-deg> <pitch-offset-deg>-5</pitch-offset-deg> <x-offset-m archive="y"> 0.000 </x-offset-m> <!--Right--> <y-offset-m archive="y"> 1.066 </y-offset-m> <!--Up--> <z-offset-m archive="y"> 2.700 </z-offset-m> <!--Back--> </config> </view> <view n="0"> <internal archive="y">true</internal> <config> <x-offset-m archive="y"> 0.000 </x-offset-m> <!-- Right --> <y-offset-m archive="y"> 0.981 </y-offset-m> <!-- Up --> <z-offset-m archive="y"> 1.056 </z-offset-m> <!-- Back --> <pitch-offset-deg> -15 </pitch-offset-deg> <default-field-of-view-deg> 55 </default-field-of-view-deg> </config> </view> <view n="1"> <config> <target-z-offset-m archive="y" type="double">0</target-z-offset-m> </config> </view> <view n="2"> <config> <target-z-offset-m archive="y" type="double">0</target-z-offset-m> </config> </view> <view n="3"> <config> <target-z-offset-m archive="y" type="double">0</target-z-offset-m> </config> </view> <view n="4"> <config> <target-z-offset-m archive="y" type="double">0</target-z-offset-m> </config> </view> <view n="5"> <config> <target-z-offset-m archive="y" type="double">0</target-z-offset-m> </config> </view> <view n="6"> <config> <target-z-offset-m archive="y" type="double">0</target-z-offset-m> </config> </view> </PropertyList>  |