Spearhead API
NOTE: The Spearhead.API space is only released in the Beta branch at the moment.
Introduction
The Spearhead.API space is specifically created to make sure mission makers can interact with the framework.
Simply alter logic, get the current state in Spearhead, and give the whole Mission Editor more control.
For example, late activate the entire framework by calling Spearhead.API.Stages.changeStage(1) later or on demand and setting the starting config stage to -1 in the Spearhead configuration file.
Stages
---@class SpearheadAPI ---@field Stages SpearheadStagesAPI ---@field Missions MissionAPI SpearheadAPI = SpearheadAPI ---@class SpearheadStagesAPI ---@field changeStage fun(stageNumber: number): boolean, string @Changes the active stage of spearhead. <br/> All other stages will change based on the normal logic. (CAP, BLUE etc.) ---@field getCurrentStage fun(): number | nil @Returns the current stange number <br/> Returns nil when the stagenumber was not set before ever, which means Spearhead was not started. ---@field isStageComplete fun(stageNumber: number): boolean | nil, string @returns whether a stage (by index) is complete. <br/> @param stageNumber number <br/> @return boolean | nil <br/> @return string ---@class OnMissionCompleteListener ---@field onMissionComplete fun(self: OnMissionCompleteListener, zone_name: string) @Called when a mission is completed. @return void ---@class MissionAPI ---@field addOnMissionCompleteListener fun(listener: OnMissionCompleteListener) @Adds a listener to the mission. <br/> @param listener OnMissionCompleteListener <br/> @return void