ESO Lua File v100010

ingame/stable/stable_common.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
    local numUsed = 0
    for i = ACTIVE_MOUNT_INDEX, GetNumStableSlots() + ACTIVE_MOUNT_INDEX do
        if not IsStableSlotEmpty(i) then
            numUsed = numUsed + 1
        end
    end
    return numUsed
end
    for i = ACTIVE_MOUNT_INDEX, GetNumStableSlots() + ACTIVE_MOUNT_INDEX do
        if not IsStableSlotEmpty(i) then
            return true
        end
    end
    return false
end
function ZO_Stables_CanMountBeFed(timeUntilCanBeFed)
    return timeUntilCanBeFed ~= nil and timeUntilCanBeFed == 0
end
function ZO_Stables_SetupFeedButton(button, canBeFed, currencyOptions)
    local name, cost = GetMountFeedOptionInfo(button.feed)
    local canAfford = GetCurrentMoney() >= cost
    button:SetEnabled(canBeFed and canAfford)
    button.feedName = name
    ZO_CurrencyControl_SetSimpleCurrency(button.costControl, CURRENCY_TYPE_MONEY, cost, currencyOptions, CURRENCY_SHOW_ALL, not canAfford)
end
function ZO_Stable_InitializeFeedButton(button, feedType, feedSound)
    button.feed = feedType
     button.feedSound = feedSound
    button.costControl = button:GetNamedChild("Cost")
end
function ZO_Stable_FeedButtonClicked(button)
     PlaySound(button.feedSound)
    FeedMount(button.feed)
end
     control.name = control:GetNamedChild("Name")
    local barContainer = control:GetNamedChild("BarContainer")
    control.bar = barContainer:GetNamedChild("Bar")
    control.value = barContainer:GetNamedChild("Value")
end