Added MCM Option to reset Config back to default values

This commit is contained in:
Wofsauge committed 2022-01-22 18:58:51 +01:00
1 parent 4ca7621ea3
commit e8bfefa9d6
2 files changed
+16 -1

No files matched your search

+1 -1
View File
@@ -509,7 +509,7 @@ function EID:hasDescription(entity)
end end
if entity.Type == EntityType.ENTITY_PICKUP then if entity.Type == EntityType.ENTITY_PICKUP then
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_COLLECTIBLE and EID.Config["DisplayItemInfo"]) isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_COLLECTIBLE and EID.Config["DisplayItemInfo"])
isAllowed = isAllowed or (entity.Variant == 110 and entity:GetSprite():IsPlaying("Idle") and EID.Config["DisplayItemInfo"]) isAllowed = isAllowed or (entity.Variant == 110 and entity:GetSprite():IsPlaying("Idle") and EID.Config["DisplayItemInfo"]) -- Broken Shovel
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TRINKET and EID.Config["DisplayTrinketInfo"]) isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TRINKET and EID.Config["DisplayTrinketInfo"])
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TAROTCARD and EID.Config["DisplayCardInfo"]) isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_TAROTCARD and EID.Config["DisplayCardInfo"])
isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_PILL and EID.Config["DisplayPillInfo"]) isAllowed = isAllowed or (entity.Variant == PickupVariant.PICKUP_PILL and EID.Config["DisplayPillInfo"])
+15
View File
@@ -561,6 +561,21 @@ if MCMLoaded then
} }
) )
--------Reset to default
MCM.AddSpace("EID", "General")
MCM.AddSetting(
"EID",
"General",
{
Type = ModConfigMenu.OptionType.BOOLEAN,
CurrentSetting = function() return true end,
Display = function() return "<---- RESET CONFIG TO DEFAULT ---->" end,
OnChange = function(currentBool) EID.Config = EID.DefaultConfig end,
Info = {"Press this reset the config back to its default values"}
}
)
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
---------------------------------Display----------------------------------- ---------------------------------Display-----------------------------------