max descriptions to display option

This commit is contained in:
Buurazu authored and GitHub committed 2022-05-06 01:50:50 -04:00
1 parent aa275c7bdf
commit ed5d69837c
1 file changed
+3 -1
+3 -1
View File
@@ -461,6 +461,7 @@ end
function EID:addDescriptionToPrint(desc) function EID:addDescriptionToPrint(desc)
if desc.Entity and EID.entitiesToPrint[GetPtrHash(desc.Entity)] then return end 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) table.insert(EID.descriptionsToPrint, desc)
if desc.Entity then EID.entitiesToPrint[GetPtrHash(desc.Entity)] = true end if desc.Entity then EID.entitiesToPrint[GetPtrHash(desc.Entity)] = true end
end end
@@ -1267,7 +1268,8 @@ local function onRender(t)
end end
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 -- Searching for the closest describable entity to this player
EID.lastDescriptionEntity = nil EID.lastDescriptionEntity = nil
EID.lastDist = 10000 EID.lastDist = 10000