Project Zomboid

Project Zomboid

[B42]CleanUI V2.2
42.12.0 Temporary inventory capacity fix
108600\3437629766\mods\CleanUI\42\media\lua\client\ISUI\ISInventoryPage.lua

Code to find (existing code):

-- lootAll Button & weightLabel
if not self.onCharacter and self.lootAll and self.lootAll:getIsVisible() then
if self.lootAll:isMouseOver() then
self.lootAll:setTitle(getText("IGUI_invpage_Loot_all"))
self.lootAll:setWidth(textWid)
else
self.lootAll:setTitle(weightLabel)
self.lootAll:setWidth(textWid)
end
self.lootAll:setX(self.closeButton:getX() - self.padding - self.lootAll:getWidth())
end



Modified code

-- lootAll Button & weightLabel
if not self.onCharacter then
local showLootAllButton = self.lootAll and self.lootAll:getIsVisible()

if showLootAllButton then
if self.lootAll:isMouseOver() then
self.lootAll:setTitle(getText("IGUI_invpage_Loot_all"))
self.lootAll:setWidth(textWid)
else
self.lootAll:setTitle(weightLabel)
self.lootAll:setWidth(textWid)
end
self.lootAll:setX(self.closeButton:getX() - self.padding - self.lootAll:getWidth())
else
local weightWidOnly = getTextManager():MeasureStringX(UIFont.Small, weightLabel)
local weightX = self.closeButton:getX() - self.padding - weightWidOnly
local weightY = (titleBarHeight - FONT_HGT_SMALL) / 2
self:drawText(weightLabel, weightX, weightY, 1, 1, 1, 1, UIFont.Small)
end
end

Temporary inventory capacity fix
< >
1-7 van 7 reacties weergegeven
where can i find the 108600 file?
I needed this, thanks
it works, thanks!
TBH Thank you so much! I

Origineel geplaatst door MadBeast:
where can i find the 108600 file?
SteamLibrary\steamapps\workshop\content\108600\3437629766\mods\CleanUI\42\media\lua\client\ISUI

Also I don't know why when code is posted to Steam you would not add it to a code block so the format of the if to end and the indents are not in normal locations. I know how to code but not everyone does or knows that pasting it as above will break it. Markdown like formatting allows for a code blocks helps for those who don't know .lua or code at all to just copy and paste the code needed in the location specified.

Code help

Old Code
-- lootAll Button & weightLabel if not self.onCharacter and self.lootAll and self.lootAll:getIsVisible() then if self.lootAll:isMouseOver() then self.lootAll:setTitle(getText("IGUI_invpage_Loot_all")) self.lootAll:setWidth(textWid) else self.lootAll:setTitle(weightLabel) self.lootAll:setWidth(textWid) end self.lootAll:setX(self.closeButton:getX() - self.padding - self.lootAll:getWidth()) end


New Code

-- lootAll Button & weightLabel if not self.onCharacter then local showLootAllButton = self.lootAll and self.lootAll:getIsVisible() if showLootAllButton then if showLootAllButton then self.lootAll:setTitle(getText("IGUI_invpage_Loot_all")) self.lootAll:setWidth(textWid) else self.lootAll:setTitle(weightLabel) self.lootAll:setWidth(textWid) end self.lootAll:setX(self.closeButton:getX() - self.padding - self.lootAll:getWidth()) else local weightWidOnly = getTextManager():MeasureStringX(UIFont.Small, weightLabel) local weightX = self.closeButton:getX() - self.padding - weightWidOnly local weightY = (titleBarHeight - FONT_HGT_SMALL) / 2 self:drawText(weightLabel, weightX, weightY, 1, 1, 1, 1, UIFont.Small) end end
steam for long code runs makes it look like the code goes on line down but when you copy and paste it is pasted normal

I think this is correct but its based off my Python work im no Lua coder.

http://psteamcommunity.yuanyoumao.com_to->formattinghelp
Laatst bewerkt door Darkerowl; 1 okt om 19:10
i dun really understand. how do these lines of code fix it? where do we enter this code?
Origineel geplaatst door House of Rahl:
i dun really understand. how do these lines of code fix it? where do we enter this code?
I can tell you were to put the code if needed, unless you figured it out? LMK and ill leave a detail to follow the best that I can, the code I think fixes the inventory cap idk the full issue but worth doing just in case. Once you do it once its get easier after that.
Laatst bewerkt door Darkerowl; 6 okt om 17:55
< >
1-7 van 7 reacties weergegeven
Per pagina: 1530 50