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> ---@type Array<OnMissionCompleteListener>
local MissionCompleteListeners = {} local MissionCompleteListeners = {}
---@type SpearheadAPI ---@class FullSpearheadAPI : SpearheadAPI
---@field Internal SpearheadAPIInternal
---@class SpearheadAPIInternal
---@field notifyMissionComplete fun(zone_name: string)
---@type FullSpearheadAPI
SpearheadAPI = { SpearheadAPI = {
Stages = { Stages = {
changeStage = function(stageNumber) changeStage = function(stageNumber)
@@ -114,8 +114,8 @@ function Mission:NotifyMissionComplete()
end) end)
end end
pcall(function() local succ, err = pcall(function()
Spearhead.API.Internal.notifyMissionComplete(self.zoneName) SpearheadAPI.Internal.notifyMissionComplete(self.zoneName)
end) end)
end end