added support for integrated backpack mode

this is a bad way to set interface widget position, it will be good to rewrite it later
This commit is contained in:
Mestima 2021-10-06 03:04:58 +03:00
parent 2a952328f5
commit 08ac0f858d
No known key found for this signature in database
GPG Key ID: 30B59EB1D7F18807

View File

@ -5,17 +5,27 @@ local storable = {
["pocketwatch_parts"] = GetModConfigData("time_pieces") ["pocketwatch_parts"] = GetModConfigData("time_pieces")
} }
local bpMode = {
x = -136,
s = true
}
if (Profile:GetIntegratedBackpack()) then
local W, H = TheSim:GetScreenSize()
bpMode.x = W/2 - 130
bpMode.s = false
end
local params = { local params = {
pocketwatchpack = { pocketwatchpack = {
widget = { widget = {
slotpos = {}, slotpos = {},
animbank = "ui_piggyback_2x6", animbank = "ui_piggyback_2x6",
animbuild = "ui_piggyback_2x6", animbuild = "ui_piggyback_2x6",
pos = Vector3(-5, -50, 0) pos = Vector3(bpMode.x, -50, 0)
}, },
issidewidget = true, issidewidget = bpMode.s,
openlimit = 1, openlimit = 1,
type = "pack" type = "chest"
} }
} }