Cosmos Journeyer API Documentation - v1.10.1
    Preparing search index...

    Database holding all the exploration data gathered by players.

    Implements

    Index

    Constructors

    Properties

    backends: EncyclopaediaGalactica[] = []

    Methods

    • Tries to add a new astronomical object to the database under the given explorer name.

      Parameters

      • data: {
            discoveryTimestamp: number;
            explorerName: string;
            objectId: {
                idInSystem: string;
                systemCoordinates: {
                    localX: number;
                    localY: number;
                    localZ: number;
                    starSectorX: number;
                    starSectorY: number;
                    starSectorZ: number;
                };
            };
        }

        The space exploration data to add.

        • discoveryTimestamp: number

          The timestamp at which the object was discovered.

        • explorerName: string

          The name of the explorer who discovered the object.

        • objectId: {
              idInSystem: string;
              systemCoordinates: {
                  localX: number;
                  localY: number;
                  localZ: number;
                  starSectorX: number;
                  starSectorY: number;
                  starSectorZ: number;
              };
          }

          The ID of the object discovered.

          • idInSystem: string
          • systemCoordinates: {
                localX: number;
                localY: number;
                localZ: number;
                starSectorX: number;
                starSectorY: number;
                starSectorZ: number;
            }

            The coordinates of the star system.

            • localX: number

              Floating point X coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

            • localY: number

              Floating point Y coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

            • localZ: number

              Floating point Z coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

            • starSectorX: number

              Integer coordinates of the star sector along the universe X axis

            • starSectorY: number

              Integer coordinates of the star sector along the universe Y axis

            • starSectorZ: number

              Integer coordinates of the star sector along the universe Z axis

      Returns Promise<boolean>

      True if the object was added, false if it was already present.

    • Estimates the value of an astronomical object given the current encyclopaedia data.

      Parameters

      • object: {
            idInSystem: string;
            systemCoordinates: {
                localX: number;
                localY: number;
                localZ: number;
                starSectorX: number;
                starSectorY: number;
                starSectorZ: number;
            };
        }

        The object to evaluate.

        • idInSystem: string
        • systemCoordinates: {
              localX: number;
              localY: number;
              localZ: number;
              starSectorX: number;
              starSectorY: number;
              starSectorZ: number;
          }

          The coordinates of the star system.

          • localX: number

            Floating point X coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

          • localY: number

            Floating point Y coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

          • localZ: number

            Floating point Z coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

          • starSectorX: number

            Integer coordinates of the star sector along the universe X axis

          • starSectorY: number

            Integer coordinates of the star sector along the universe Y axis

          • starSectorZ: number

            Integer coordinates of the star sector along the universe Z axis

      Returns Promise<Result<number, string>>

      The estimated value of the object in credits.

    • Finds out if an object has already been discovered.

      Parameters

      • objectId: {
            idInSystem: string;
            systemCoordinates: {
                localX: number;
                localY: number;
                localZ: number;
                starSectorX: number;
                starSectorY: number;
                starSectorZ: number;
            };
        }

        The ID of the object to check.

        • idInSystem: string
        • systemCoordinates: {
              localX: number;
              localY: number;
              localZ: number;
              starSectorX: number;
              starSectorY: number;
              starSectorZ: number;
          }

          The coordinates of the star system.

          • localX: number

            Floating point X coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

          • localY: number

            Floating point Y coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

          • localZ: number

            Floating point Z coordinate of the star system inside the star sector. Must be between -0.5 and 0.5.

          • starSectorX: number

            Integer coordinates of the star sector along the universe X axis

          • starSectorY: number

            Integer coordinates of the star sector along the universe Y axis

          • starSectorZ: number

            Integer coordinates of the star sector along the universe Z axis

      Returns Promise<boolean>

      True if the object has been discovered, false otherwise.