max descriptions to display option
This commit is contained in:
1 parent
aa275c7bdf
commit
ed5d69837c
1 file changed
+3
-1
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user