Ignore:
Timestamp:
03/16/18 08:58:18 (6 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Aircraft type information (currently DOW, and crew-specific DOW values) are queried via RPC when logging in.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/acft.py

    r895 r898  
    9797class Aircraft(object):
    9898    """Base class for aircraft."""
     99    dowCockpit = 2
     100    dowCabin = 3
     101
    99102    @staticmethod
    100103    def create(flight, bookedFlight):
     
    829832class B734(Boeing737CL):
    830833    """Boeing 737-400 aircraft."""
     834    dow = 35100
     835
    831836    def __init__(self, flight):
    832837        super(B734, self).__init__(flight)
    833         self.dow = 35100
    834838        self.mtow = 62822
    835839        self.mlw = 54885
     
    13011305#---------------------------------------------------------------------------------------
    13021306
     1307def setupTypes(aircraftTypes):
     1308    """Setup the values in the given types using the info retrieved
     1309    from the server."""
     1310    for aircraftTypeInfo in aircraftTypes:
     1311        clazz = getClass(aircraftTypeInfo.aircraftType)
     1312
     1313        clazz.dow = aircraftTypeInfo.dow
     1314        clazz.dowCockpit = aircraftTypeInfo.dowCockpit
     1315        clazz.dowCabin = aircraftTypeInfo.dowCabin
     1316
     1317#---------------------------------------------------------------------------------------
     1318
    13031319if __name__ == "__main__":
    13041320    value = SmoothedValue()
Note: See TracChangeset for help on using the changeset viewer.