@ -8,3 +8,5 @@ L["Tinkr"] = "Tinkr"
L["Bastion"] = "Bastion"
Bastion.Locale.SetTable(L)
return L
@ -60,7 +60,7 @@ function Item:New(id)
return self
end
local GetItemInfo = Bastion.Environment:GetItemInfo(...)
local environment = Bastion.Environment
-- Get the Items id
---@return number
@ -71,13 +71,15 @@ end
-- Get the Items name
---@return string
function Item:GetName()
return GetItemInfo(self:GetID())
return environment:GetItemInfo(self:GetID())
-- return GetItemInfo(self:GetID())
-- Get the Items icon
function Item:GetIcon()
return select(3, GetItemInfo(self:GetID()))
return select(3, environment:GetItemInfo(self:GetID()))
-- return select(3, GetItemInfo(self:GetID()))
-- Get the Items cooldown
@ -6,7 +6,7 @@ Locale.__index = Locale
local private = {
locale = nil,
tbl = nil,
hasNoLocaleTable = nil
hasNoLocaleTable = false
}
private.locale = function()
@ -28,7 +28,6 @@ function Locale.ShouldLoad(locale)
function Locale.SetTable(tbl)
assert(not private.tbl)
private.tbl = setmetatable(tbl, {
__index = function(t, k)
local v = tostring(k)
@ -44,6 +43,8 @@ function Locale.SetTable(tbl)
})
Locale.SetTable({})
return Locale
@ -7,7 +7,8 @@ local Bastion = {
Bastion.__index = Bastion
Bastion._Unlocker = Tinkr
_G.Bastion = Bastion
function Bastion:Require(file)
-- If require starts with an @ then we require from the scripts/bastion/scripts folder
@ -61,6 +62,10 @@ Bastion.Globals = {}
---@type Locale
Bastion.Locale = Bastion.require("Locale")
Load("@Locales/")
Bastion.Locales = {}
Bastion.Locales.enUS = Bastion:Require("@Locales/enUS")
local L = Bastion.Locale.GetTable()
Bastion.Globals.L = L
---@type Environment
Bastion.Environment = Bastion.require("Environment")
---@type ClassMagic