From 08ac0f858dfe7f27c1018b27e575239d9d6f8080 Mon Sep 17 00:00:00 2001 From: Mestima Date: Wed, 6 Oct 2021 03:04:58 +0300 Subject: [PATCH] added support for integrated backpack mode this is a bad way to set interface widget position, it will be good to rewrite it later --- data/scripts/main/watch_container.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/data/scripts/main/watch_container.lua b/data/scripts/main/watch_container.lua index c574dda..9b30172 100644 --- a/data/scripts/main/watch_container.lua +++ b/data/scripts/main/watch_container.lua @@ -5,17 +5,27 @@ local storable = { ["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 = { pocketwatchpack = { widget = { slotpos = {}, animbank = "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, - type = "pack" + type = "chest" } }