Refactored grid entity handling to allow for custom grid entity descriptions

relates to #866
This commit is contained in:
Wofsauge committed 2025-06-05 23:54:03 +02:00
1 parent 498af83e4f
commit 75461bedfe
7 files changed
+161 -65

No files matched your search

+4 -4
View File
@@ -3,7 +3,7 @@ local GLITCH_ITEM_FLAG = 4294967296
local currentBlacklist
local lastInputTime = 0
local lastScrollDirection = 1 -- used for automatic scroll feature, if no description is visible for a category
local autoScrollTriesLeft = -999 -- Stores how many tries the automatic category skip has left to do. This prevents infinite loops, when the player has no items
local autoScrollTriesLeft = math.mininteger -- Stores how many tries the automatic category skip has left to do. This prevents infinite loops, when the player has no items
local numAvailableDescriptionSlots = 0
EID.ItemReminderBlacklist = { ["5.100.714"] = true, ["5.100.715"] = true } -- Dont display these in the Item reminder view
@@ -886,7 +886,7 @@ function EID:ItemReminderGetDescription()
-- Skip category if nothing is in it
if #EID.ItemReminderTempDescriptions == 0 then
if autoScrollTriesLeft == -999 then
if autoScrollTriesLeft == math.mininteger then
-- auto scroll was started
autoScrollTriesLeft = #EID.ItemReminderCategories - 1
end
@@ -908,11 +908,11 @@ function EID:ItemReminderGetDescription()
end
end
-- auto scroll was stopped. reset scroll value
autoScrollTriesLeft = -999
autoScrollTriesLeft = math.mininteger
EID.InsideItemReminder = false
return "{{Blank}}#{{Blank}} " .. EID:getDescriptionEntry("ItemReminder", "InventoryEmpty")
end
autoScrollTriesLeft = -999
autoScrollTriesLeft = math.mininteger
local finalHoldMapDesc = ""
EID.ItemReminderDisplayingScrollbar = false