ESO Lua File v100011

ingame/interactwindow/interactwindow.lua

[◄ back to folders ]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
--Interaction Manager
---------------------
ZO_InteractionManager = ZO_CallbackObject:Subclass()
function ZO_InteractionManager:New()
    local manager = ZO_CallbackObject.New(self)
    return manager
end
function ZO_InteractionManager:OnBeginInteraction(interaction)
    if(self.currentInteraction and (interaction.type ~= self.currentInteraction.type) and self.currentInteraction.End) then
        self.currentInteraction.End()
    end
    self.currentInteraction = interaction
end
function ZO_InteractionManager:OnEndInteraction(interaction)
    if(self.currentInteraction == interaction) then
        self:TerminateClientInteraction(interaction)
        self.currentInteraction = nil
    end
end
function ZO_InteractionManager:TerminateClientInteraction(interaction)
    local interactTypes = interaction.interactTypes
    if(interactTypes) then
        for i = 1, #interactTypes do
            EndInteraction(interactTypes[i])
        end
    end
end
function ZO_InteractionManager:IsInteracting(interaction)
    if interaction == nil then
        return self.currentInteraction ~= nil
    else
        return self.currentInteraction and (self.currentInteraction.type == interaction.type)
    end
end
function ZO_InteractionManager:ShowInteractWindow(bodyText)
    if IsUnderArrest() then
        PushActionLayerByName("SceneChangeInterceptLayer")
    end
    SYSTEMS:ShowScene("interact")
    self:FireCallbacks("Shown")
end
function ZO_InteractionManager:CloseChatter()
     SYSTEMS:HideScene("interact")
end
-- function wrappers as this manager function is called from
-- multiple files. Now just redirects it to the proper object
-------------------------------------------------------------
function ZO_InteractionManager:SelectChatterOptionByIndex(optionIndex)
     local obj = SYSTEMS:GetObject("interact")
end
function ZO_InteractionManager:SelectLastChatterOption(optionIndex)
     local obj = SYSTEMS:GetObject("interact")
     obj:SelectLastChatterOption()
end
-- Globals
-------------------------------------------------------------
INTERACT_WINDOW = ZO_InteractionManager:New()