Package gamedata

Class ConversionMap.Conversion

    • Constructor Detail

      • Conversion

        public Conversion​(java.lang.String name,
                          ConversionMap.Class sourceClassName,
                          java.lang.String targetClassName,
                          java.lang.String requiredExtension,
                          ConversionMap.Group group)
        Creates a new conversion option.
        Parameters:
        name - the name of the conversion option
        sourceClassName - the source class name entry, or null if this is a group conversion option
        targetClassName - the target class name
        requiredExtension - the identifier of the required extension, or null if the target belongs to the same extension
        group - the group entry, or null if this is a direct conversion option
    • Method Detail

      • getSourceClassName

        public java.lang.String getSourceClassName()
        Returns the class name of the source component type. Returns null if this is a group conversion option.
        Returns:
        the source class name
      • getTargetClassName

        public java.lang.String getTargetClassName()
        Returns the class name of the target component type.
        Returns:
        the target class name
      • getRequiredExtension

        public java.lang.String getRequiredExtension()
        Returns the identifier of the required extension for the target component type. Returns null if it belongs to the same extension as the source component type.
        Returns:
        the required extension identifier
      • getGroup

        public ConversionMap.Group getGroup()
        Returns the conversion group this conversion option belongs to. Returns null if this is a direct conversion option.
        Returns:
        the conversion group
      • hasRequiredExtension

        public boolean hasRequiredExtension()
        Checks if the required extension is installed.
        Returns:
        whether the required extension is installed or not
      • createManualConversionTrigger

        public ManualConversionTrigger createManualConversionTrigger()
        Creates a manual conversion trigger based on this conversion option.
        Returns:
        a manual conversion trigger