Changeset 1156:8d9eb69a4c39


Ignore:
Timestamp:
04/25/24 17:42:48 (8 months ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Jetways are not available for aircraft with stairs (re #386).

Location:
src/mlx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gates.py

    r1155 r1156  
    3939            return plane is None or \
    4040                ((self.maxSpan<0.1 or plane.wingSpan <= self.maxSpan) and
    41                  (self.maxLength<0.1 or plane.fuselageLength <= self.maxLength))
     41                 (self.maxLength<0.1 or plane.fuselageLength <= self.maxLength) and
     42                 (not plane.hasStairs or self.type!="G"))
    4243        else:
    4344            return False
  • src/mlx/rpccommon.py

    r1154 r1156  
    2424               "A" if status==const.PLANE_AWAY else \
    2525               "P" if status==const.PLANE_PARKING else ""
     26
     27    @property
     28    def hasStairs(self):
     29        """Indicate if the plane has its own stairs."""
     30        return self.aircraftType in [const.AIRCRAFT_YK40,
     31                                     const.AIRCRAFT_CRJ2,
     32                                     const.AIRCRAFT_F70,
     33                                     const.AIRCRAFT_DH8D]
    2634
    2735    def _setStatus(self, letter):
Note: See TracChangeset for help on using the changeset viewer.