From ed5d69837c21ddefc646f70d7679d2fccc6c0734 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 6 May 2022 01:50:50 -0400 Subject: [PATCH] max descriptions to display option --- main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.lua b/main.lua index e010f370..a8589746 100644 --- a/main.lua +++ b/main.lua @@ -461,6 +461,7 @@ end function EID:addDescriptionToPrint(desc) if desc.Entity and EID.entitiesToPrint[GetPtrHash(desc.Entity)] then return end + if #EID.descriptionsToPrint == EID.Config["MaxDescriptionsToDisplay"] then return end table.insert(EID.descriptionsToPrint, desc) if desc.Entity then EID.entitiesToPrint[GetPtrHash(desc.Entity)] = true end end @@ -1267,7 +1268,8 @@ local function onRender(t) end end - if not displayedDesc or EID.Config["DisplayAllNearby"] then + if (not displayedDesc or EID.Config["DisplayAllNearby"]) and + #EID.descriptionsToPrint < EID.Config["MaxDescriptionsToDisplay"] then -- Searching for the closest describable entity to this player EID.lastDescriptionEntity = nil EID.lastDist = 10000