10 if not SystemDisabler.getAllowDebugConnections() and getDebug() and not isAdmin() and not isCoopHost() and not SystemDisabler.getOverrideServerConnectDebugCheck() then
14 connectionManagerLog("connect-state-finish", "lua-connected");
16 self:setVisible(false)
17 if not checkSavePlayerExists() then
18 if not getWorld():getMap() then
19 getWorld():setMap("Muldraugh, KY")
22 if MainScreen.
instance.createWorld then
23 createWorld(getWorld():getWorld())
26 GameWindow.doRenderEvent(false)
27 forceChangeState(LoadingQueueState.new())
29 GameWindow.doRenderEvent(false)
30 forceChangeState(LoadingQueueState.new())
45 print("[FZ] Player teleported to limbo. Disconnecting now...")
47 print("[FZ] Failed to teleport
player to limbo. Disconnecting anyways...")
60 LoadMainScreenPanelInt(true)
62Events.OnGameStart.Remove(LoadMainScreenPanelIngame)
68 local maxLineLength = 28
74 for word in
string.gmatch(text,
"%S+")
do
75 table.insert(words,
word)
82 if lineLength +
wordLength <= maxLineLength then
83 line = line ..
" " ..
word
86 table.insert(lines, line)
92 table.insert(lines, line)
102 local textureWidth, textureHeight = 64, 64
103 local
font = objTooltip:getFont()
104 local lineSpace = objTooltip:getLineSpacing()
111 objTooltip:DrawText(
font, itemName, 5.0,
yOffset, 1.0, 1.0, 0.8, 1.0)
112 objTooltip:adjustWidth(5, itemName)
115 local yTextureOffset = textureHeight + 10
116 objTooltip:DrawTextureScaled(
item:
getTexture(), panel:getWidth() - textureWidth - 15, 5, textureWidth, textureHeight, 0.75)
122 objTooltip:adjustWidth(5,
v)
126 if yTextureOffset >
yOffset then
134 objTooltip:DrawText(
font,
item:getDisplayName(), 5.0,
yOffset, 1.0, 1.0, 0.8, 1.0)
135 objTooltip:adjustWidth(5,
item:getDisplayName())
138 local yTextureOffset = textureHeight + 10
139 objTooltip:DrawTextureScaled(
item:
getTexture(), panel:getWidth() - textureWidth - 15, 5, textureWidth, textureHeight, 0.75)
146 objTooltip:adjustWidth(5,
v)
151 if yTextureOffset >
yOffset then
160 local layoutTooltip = objTooltip:beginLayout()
161 layoutTooltip:setMinLabelWidth(128)
168 for k,
v in pairs(itemCustomFields) do
169 layout = layoutTooltip:addItem()
170 layout:setLabel(k .. ":", 1, 1, 0.8, 1)
172 if
type(
v) == "
boolean" then
174 layout:setValue("Yes", 1, 1, 1, 1)
176 layout:setValue("No", 1, 1, 1, 1)
182 if
type(values) == "table" then
183 local displayString = ""
185 for _, v2 in pairs(values) do
186 displayString = displayString .. tostring(v2) .. "\n"
189 layout:setValue(displayString, 1, 1, 1, 1)
194 layout:setValue(
v, 1, 1, 1, 1)
200 local weightEquipped =
item:getCleanString(
item:getEquippedWeight())
201 local weightUnequipped =
item:getUnequippedWeight()
202 layout = layoutTooltip:addItem()
203 layout:setLabel("Weight (Unequipped):", 1, 1, 0.8, 1)
205 if weightUnequipped > 0 and weightUnequipped < 0.01 then
206 weightUnequipped = "<0.01"
208 weightUnequipped =
item:getCleanString(weightUnequipped)
211 if not
item:isEquipped() then
212 layout:setValue("*" .. tostring(weightUnequipped) .. "*", 1, 1, 1, 1)
214 layout:setValue(tostring(weightUnequipped), 1, 1, 1, 1)
217 layout = layoutTooltip:addItem()
218 layout:setLabel("Weight (Equipped):", 1, 1, 0.8, 1)
220 if
item:isEquipped() then
221 layout:setValue("*" .. tostring(weightEquipped) .. "*", 1, 1, 1, 1)
223 layout:setValue(tostring(weightEquipped), 1, 1, 1, 1)
227 if not
item:IsWeapon() and not
item:IsClothing() and not
item:IsDrainable() and not
string.match(
item:getFullType(), "Walkie") then
228 local unequippedWeight =
item:getUnequippedWeight()
230 if unequippedWeight > 0 and unequippedWeight < 0.01 then
231 unequippedWeight = 0.01
234 layout:setValueRightNoPlus(unequippedWeight)
235 elseif
item:isEquipped() then
236 local equippedWeight =
item:getCleanString(
item:getEquippedWeight())
238 layout:setValue(equippedWeight .. " (" ..
item:getCleanString(
item:getUnequippedWeight()) .. " " .. getText("Tooltip_item_Unequipped") .. ")", 1.0, 1.0, 1.0, 1.0)
239 elseif
item:getAttachedSlot() > -1 then
240 local hotbarEquippedWeight =
item:getCleanString(
item:getHotbarEquippedWeight())
242 layout:setValue(hotbarEquippedWeight .. " (" ..
item:getCleanString(
item:getUnequippedWeight()) .. " " .. getText("Tooltip_item_Unequipped") .. ")", 1.0, 1.0, 1.0, 1.0)
244 local unequippedWeight =
item:getCleanString(
item:getUnequippedWeight())
246 layout:setValue(unequippedWeight .. " (" ..
item:getCleanString(
item:getEquippedWeight()) .. " " .. getText("Tooltip_item_Equipped") .. ")", 1.0, 1.0, 1.0, 1.0)
250 if
item:getTooltip() ~=
nil then
251 layout = layoutTooltip:addItem()
252 layout:setLabel(getText(
item:getTooltip()), 1, 1, 0.8, 1)
256 objTooltip:endLayout(layoutTooltip)
260 if objTooltip:getWidth() < 256 then
261 objTooltip:setWidth(256)
269 if not
self.followMouse then
272 if
self.anchorBottomLeft then
273 mx =
self.anchorBottomLeft.
x
274 my =
self.anchorBottomLeft.
y
278 self.tooltip:setX(mx + 11);
279 self.tooltip:setY(my);
281 self.tooltip:setWidth(50)
282 self.tooltip:setMeasureOnly(true)
290 self.tooltip:setMeasureOnly(false)
294 local myCore = getCore();
295 local maxX = myCore:getScreenWidth();
296 local maxY = myCore:getScreenHeight();
298 local tw =
self.tooltip:getWidth();
299 local th =
self.tooltip:getHeight();
301 self.tooltip:setX(math.max(0, math.min(mx + 11, maxX - tw - 1)));
303 if not
self.followMouse and
self.anchorBottomLeft then
304 self.tooltip:setY(math.max(0, math.min(my - th, maxY - th - 1)));
306 self.tooltip:setY(math.max(0, math.min(my, maxY - th - 1)));
309 self:setX(
self.tooltip:getX() - 11);
311 self:setWidth(tw + 11);
314 if
self.followMouse then
315 self:adjustPositionToAvoidOverlap({
void local itemInstance()
void self createCharacterButton font()
void self FrameworkZ UI self nil
void processingNotification backgroundColor a()
void self textCloseButton internal()
void self playerListPanel render()
void button borderColor()
void button backgroundColor()
void FrameworkZ Foundation()
Foundation for FrameworkZ.
void onMenuItemMouseDownMainMenu(item, x, y)
void DoTooltip(objTooltip, item, panel)
void FrameworkZ Overrides ISToolTipInv_render()
void ConnectToServer OnConnected()
void FrameworkZ Overrides()
void FrameworkZ Overrides MainScreen_onMenuItemMouseDownMainMenu()