Merge branch 'master' of https://github.com/kohashiwakaba/External-Item-Descriptions
This commit is contained in:
commit
fc81cd59c4
3 files changed
+13
-1
No files matched your search
@@ -102,6 +102,11 @@ EID.UserConfig = {
|
|||||||
["DisplayAllNearby"] = false,
|
["DisplayAllNearby"] = false,
|
||||||
-- Any descriptions displayed beyond the first one will use the "Local" display mode
|
-- 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 = 99
|
||||||
|
["MaxDescriptionsToDisplay"] = 99,
|
||||||
|
|
||||||
---------- Display Modes -----------
|
---------- Display Modes -----------
|
||||||
|
|
||||||
-- Sets the display mode of the description text
|
-- Sets the display mode of the description text
|
||||||
@@ -445,6 +450,7 @@ EID.DefaultConfig = {
|
|||||||
["CoopDescriptions"] = true,
|
["CoopDescriptions"] = true,
|
||||||
["PairedPlayerDescriptions"] = false,
|
["PairedPlayerDescriptions"] = false,
|
||||||
["DisplayAllNearby"] = false,
|
["DisplayAllNearby"] = false,
|
||||||
|
["MaxDescriptionsToDisplay"] = 99,
|
||||||
["DisableOnCurse"] = true,
|
["DisableOnCurse"] = true,
|
||||||
["DisableOnAltPath"] = true,
|
["DisableOnAltPath"] = true,
|
||||||
["DisableOnAprilFoolsChallenge"] = true,
|
["DisableOnAprilFoolsChallenge"] = true,
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -359,6 +359,10 @@ if MCMLoaded then
|
|||||||
infoText = "Distance to the object until descriptions are displayed"})
|
infoText = "Distance to the object until descriptions are displayed"})
|
||||||
EID:AddBooleanSetting("General", "DisplayAllNearby", "Display All Objects In Range",
|
EID:AddBooleanSetting("General", "DisplayAllNearby", "Display All Objects In Range",
|
||||||
{ infoText = "Descriptions besides the closest one will be shown using the Local display mode" })
|
{ 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, 99}
|
||||||
|
EID:AddScrollSetting("General", "MaxDescriptionsToDisplay", "Max Descriptions to Display", descsToDisplaySteps,
|
||||||
|
{infoText = "Max number of descriptions to display per frame"})
|
||||||
|
|
||||||
|
|
||||||
--------Reset to default
|
--------Reset to default
|
||||||
MCM.AddSpace("EID", "General")
|
MCM.AddSpace("EID", "General")
|
||||||
|
|||||||
Reference in new issue
Block a user