window.artifact

Provides functions related to Ingress artifacts, including setup, data request, and processing functions. Added as part of the ingress #13magnus in november 2013, artifacts are additional game elements overlayed on the intel map

currently there are only jarvis-related entities

  • shards: move between portals (along links) each hour. more than one can be at a portal.
  • targets: specific portals - one per team.

The artifact data includes details for the specific portals, so can be useful. 2014-02-06: intel site updates hint at new 'amar artifacts', likely following the same system as above

Methods

static clearData()

Clears all stored artifact data.

static entityInject(data)

Inject artifact portals into render process

Parameters:
Name Type Description
data Object

static getArtifactEntities() → {Array}

Used to render portals that would otherwise be below the visible level.

Returns:
Array -

array of Portal entities with shards or shard targets

unused by IITC

static getArtifactTypes() → {Array}

Returns the types of artifacts currently known.

Returns:
Array -

An array of artifact type strings.

static getInterestingPortals() → {Array}

Gets the portals that are relevant to the artifacts.

Returns:
Array -

An array of portal GUIDs.

static getPortalData(guid, artifactId) → {Object|false}

Retrieves the artifact data for a specified artifact id (e.g. 'jarvis'), if available.

Parameters:
Name Type Description
guid string

The GUID of the portal.

artifactId string

The ID of the artifact type.

Returns:
Object | false -

Artifact data for the specified portal and type, or undefined if not available.

unused by IITC

static handleFailure()

Handles failure in artifact data request. Schedules a new request after a short delay.

static handleSuccess(data)

Handles successful artifact data response from the server.

Parameters:
Name Type Description
data Object

Artifact data received from the server.

static idleResume()

Resumes artifact data requests when coming out of idle mode.

static isArtifact(type) → {boolean}

Determines if a given type is a knowable artifact.

Parameters:
Name Type Description
type string

The type to check.

Returns:
boolean -

True if the type is an artifact, false otherwise.

static isInterestingPortal(guid) → {boolean}

Quickly checks if a portal is relevant to any type of artifacts.

Parameters:
Name Type Description
guid string

The GUID of the portal to check.

Returns:
boolean -

True if the portal is involved in artifacts, false otherwise.

static processData(data)

Processes artifact data. Clears previous data, processes new results, runs hooks, and updates the artifact layer.

Parameters:
Name Type Description
data Object

Artifact data to process.

static processResult(portals)

Processes the results from artifact portal data. Extracts and stores portal data for each artifact type.

Parameters:
Name Type Description
portals Object

The artifact portal data.

static requestData()

Requests artifact data from the server. If the map is in idle mode, sets a flag instead of sending a request.

static setup()

Sets up artifact data fetching, layer creation, and UI elements.

static showArtifactList()

Displays a dialog listing all portals involved with artifacts, organized by artifact types.

static updateLayer()

Updates the artifact layer on the map based on the current artifact data.