parameters: (self, civ_id=-1)
return_statement: return None
docstring: Returns the mode the garrison operates in. This is used by the
          converter to determine which storage abilities the line will get.
  
          :param civ_id: Get the garrison mode for unit lines of the civ
                         with this ID.
          :type civ_id: int
          :returns: The garrison mode of the line.
          :rtype: GenieGarrisonMode
docstring_summary: Returns the mode the garrison operates in. This is used by the
          converter to determine which storage abilities the line will get.
docstring_tokens: Returns the mode the garrison operates in . This is used by the converter to determine which storage abilities the line will get .
function: def get_garrison_mode(self, civ_id=-1):
          """
          Returns the mode the garrison operates in. This is used by the
          converter to determine which storage abilities the line will get.
  
          :param civ_id: Get the garrison mode for unit lines of the civ
                         with this ID.
          :type civ_id: int
          :returns: The garrison mode of the line.
          :rtype: GenieGarrisonMode
          """
          head_unit = self.get_head_unit()
          if civ_id != -1:
              head_unit = self.data.civ_groups[civ_id]["units"][self.get_head_unit_id()]
  
          trait = head_unit["trait"].get_value()
  
          # Ram
          if trait == 1:
              return GenieGarrisonMode.UNIT_GARRISON
  
          # Transport ship
          if trait == 3:
              return GenieGarrisonMode.TRANSPORT
  
          # Natural garrison
          if head_unit.has_member("garrison_type"):
              garrison_type = head_unit["garrison_type"].get_value()
  
              if garrison_type > 0:
                  return GenieGarrisonMode.NATURAL
  
          # Production garrison
          type_id = head_unit["unit_type"].get_value()
          if len(self.creates) > 0 and type_id == 80:
              return GenieGarrisonMode.SELF_PRODUCED
  
          return None
function_tokens: def get_garrison_mode ( self , civ_id = - 1 ) : head_unit = self . get_head_unit ( ) if civ_id != - 1 : head_unit = self . data . civ_groups [ civ_id ] [ "units" ] [ self . get_head_unit_id ( ) ] trait = head_unit [ "trait" ] . get_value ( ) # Ram if trait == 1 : return GenieGarrisonMode . UNIT_GARRISON # Transport ship if trait == 3 : return GenieGarrisonMode . TRANSPORT # Natural garrison if head_unit . has_member ( "garrison_type" ) : garrison_type = head_unit [ "garrison_type" ] . get_value ( ) if garrison_type > 0 : return GenieGarrisonMode . NATURAL # Production garrison type_id = head_unit [ "unit_type" ] . get_value ( ) if len ( self . creates ) > 0 and type_id == 80 : return GenieGarrisonMode . SELF_PRODUCED return None