Fixed reference of SpearheadAPI

This commit is contained in:
2025-05-10 15:30:43 +02:00
parent 64b6d20bdd
commit a72ec86cfc
2 changed files with 10 additions and 3 deletions
+8 -1
View File
@@ -1,7 +1,14 @@
---@type Array<OnMissionCompleteListener>
local MissionCompleteListeners = {}
---@type SpearheadAPI
---@class FullSpearheadAPI : SpearheadAPI
---@field Internal SpearheadAPIInternal
---@class SpearheadAPIInternal
---@field notifyMissionComplete fun(zone_name: string)
---@type FullSpearheadAPI
SpearheadAPI = {
Stages = {
changeStage = function(stageNumber)
@@ -114,8 +114,8 @@ function Mission:NotifyMissionComplete()
end)
end
pcall(function()
Spearhead.API.Internal.notifyMissionComplete(self.zoneName)
local succ, err = pcall(function()
SpearheadAPI.Internal.notifyMissionComplete(self.zoneName)
end)
end