From ed5d69837c21ddefc646f70d7679d2fccc6c0734 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 6 May 2022 01:50:50 -0400 Subject: [PATCH 1/5] 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 From 7e73544a8f954995095b9d156539afe2a484552b Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 6 May 2022 01:53:36 -0400 Subject: [PATCH 2/5] max descriptions to display option --- eid_config.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eid_config.lua b/eid_config.lua index 7bdb8e29..5b8b8757 100644 --- a/eid_config.lua +++ b/eid_config.lua @@ -101,6 +101,11 @@ EID.UserConfig = { -- Default = false ["DisplayAllNearby"] = false, -- Any descriptions displayed beyond the first one will use the "Local" display mode + + -- Set the max number of descriptions to display per frame + -- Set to 1 if you don't want any Local Mode descriptions printed in co-op + -- Default = 9999 + ["MaxDescriptionsToDisplay"] = 9999, ---------- Display Modes ----------- @@ -445,6 +450,7 @@ EID.DefaultConfig = { ["CoopDescriptions"] = true, ["PairedPlayerDescriptions"] = false, ["DisplayAllNearby"] = false, + ["MaxDescriptionsToDisplay"] = 9999, ["DisableOnCurse"] = true, ["DisableOnAltPath"] = true, ["DisableOnAprilFoolsChallenge"] = true, From 05e6d5e0d23dc7941de9c7af0257f8398b610615 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 6 May 2022 01:56:36 -0400 Subject: [PATCH 3/5] max descriptions to display option --- mod_config_menu.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mod_config_menu.lua b/mod_config_menu.lua index 8b66377d..42cd7635 100644 --- a/mod_config_menu.lua +++ b/mod_config_menu.lua @@ -359,6 +359,10 @@ if MCMLoaded then infoText = "Distance to the object until descriptions are displayed"}) EID:AddBooleanSetting("General", "DisplayAllNearby", "Display All Objects In Range", { infoText = "Descriptions besides the closest one will be shown using the Local display mode" }) + local descsToDisplaySteps = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9999} + EID:AddScrollSetting("General", "MaxDescriptionsToDisplay", "Max Descriptions to Display", descsToDisplaySteps, + {infoText = "Max number of descriptions to display per frame"}) + --------Reset to default MCM.AddSpace("EID", "General") From 918b5250ada3648cc351375a0207b19deb4a9a60 Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 6 May 2022 03:40:41 -0400 Subject: [PATCH 4/5] lower the default descs to display --- mod_config_menu.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod_config_menu.lua b/mod_config_menu.lua index 42cd7635..ba9181e3 100644 --- a/mod_config_menu.lua +++ b/mod_config_menu.lua @@ -359,7 +359,7 @@ if MCMLoaded then infoText = "Distance to the object until descriptions are displayed"}) EID:AddBooleanSetting("General", "DisplayAllNearby", "Display All Objects In Range", { infoText = "Descriptions besides the closest one will be shown using the Local display mode" }) - local descsToDisplaySteps = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9999} + local descsToDisplaySteps = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 99} EID:AddScrollSetting("General", "MaxDescriptionsToDisplay", "Max Descriptions to Display", descsToDisplaySteps, {infoText = "Max number of descriptions to display per frame"}) From a084f33d765c98e0878ee40eee57621f612a918d Mon Sep 17 00:00:00 2001 From: Buurazu Date: Fri, 6 May 2022 03:41:20 -0400 Subject: [PATCH 5/5] lower the default max descs --- eid_config.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eid_config.lua b/eid_config.lua index 5b8b8757..9597b36a 100644 --- a/eid_config.lua +++ b/eid_config.lua @@ -104,8 +104,8 @@ EID.UserConfig = { -- Set the max number of descriptions to display per frame -- Set to 1 if you don't want any Local Mode descriptions printed in co-op - -- Default = 9999 - ["MaxDescriptionsToDisplay"] = 9999, + -- Default = 99 + ["MaxDescriptionsToDisplay"] = 99, ---------- Display Modes ----------- @@ -450,7 +450,7 @@ EID.DefaultConfig = { ["CoopDescriptions"] = true, ["PairedPlayerDescriptions"] = false, ["DisplayAllNearby"] = false, - ["MaxDescriptionsToDisplay"] = 9999, + ["MaxDescriptionsToDisplay"] = 99, ["DisableOnCurse"] = true, ["DisableOnAltPath"] = true, ["DisableOnAprilFoolsChallenge"] = true,