Inventory Descriptions functions - kohashiwakaba/Pudding-Wakaba GitHub Wiki
Inventory Descriptions is one of exclusive/standalone feature from Pudding & Wakaba. Before Item Reminder is reworked in EID, Inventory Descriptions were used for held passive items and item wisps.
Descriptions for Inventory Descriptions
Adding player descriptions
local playerType = player:GetPlayerType()
EID:addEntity(InvDescEIDType.PLAYER, InvdescEIDVariant.DEFAULT, playerType, "PlayerName", "Player Descriptions", "en_us")
Adding curse descriptions
local curse = 1 << (Isaac.GetCurseIdByName("Curse of Flames!") - 1)
EID:addEntity(InvDescEIDType.CURSE, InvdescEIDVariant.DEFAULT, curse, "CurseName", "Curse Descriptions", "en_us")
EID:AddIconToObject(InvDescEIDType.CURSE, InvdescEIDVariant.DEFAULT, curse, "CurseCustom")
Defaults and Blacklists
Adding/removing defaults
InventoryDescType
, target PlayerType
, entry EntitySubType
)
InventoryDesctriptions:addDefault(category InventoryDescType
, target PlayerType
, entry EntitySubType
)
InventoryDesctriptions:removeDefault(category Adding/removing blacklists
InventoryDescType
, target PlayerType
, entry EntitySubType
)
InventoryDesctriptions:addBlacklist(category InventoryDescType
, target PlayerType
, entry EntitySubType
)
InventoryDesctriptions:hasBlacklist(category InventoryDescType
, target PlayerType
, entry EntitySubType
)
InventoryDesctriptions:removeBlacklist(category Managing with Entries
Entry Structure
An description entry consists following values :
local entries = {
{
Type = 5,
Variant = 100,
SubType = 182,
-- Below values are optional
AllowModifiers = true, -- determine to apply EID modifiers, defaults to true
Icon = "{{Collectible182}}", -- EIDString format for main icon
LeftIcon = "{{Quality4}}", -- EIDString format for left icon, used for Quality. In grid mode, shows on top left on the list
ExtraIcon = "{{Quality4}}", -- EIDString format for right icon, prepended from ListPrimaryTitle value. In grid mode, shows on bottom right on the list
ListPrimaryTitle = "Sacred Heart", -- EIDString format for primary list name. If not set, EID Object name are shown
ListSecondaryTitle = "Pudding & Wakaba", -- EIDString format for secondary list name. If not set, mod name are shown
InnerText = "182", -- String format for inner icon text. If not set, Collectible ID are shown for collectibles
}
}
This list consists of single entry that shows in list.
Loading predefined entries
InventoryDesctriptions:getPlayers()
Returns entries list that has player descriptions.
InventoryDesctriptions:getDefaults()
Returns entries list that has default descriptions with current players.
InventoryDesctriptions:getCurses()
Returns entries list that has curse descriptions in current floor.
InventoryDesctriptions:getHeldActives()
Returns entries list that has active descriptions by all current players.
InventoryDesctriptions:getHeldCards()
Returns entries list that has card descriptions by all current players.
InventoryDesctriptions:getHeldPills()
Returns entries list that has pill descriptions by all current players.
InventoryDesctriptions:getPassives()
Returns entries list that has passive descriptions by all current players.
If REPENTOGON and History List
option is enabled, entries list that has history descriptions by all current players.
InventoryDesctriptions:getTrinkets()
Returns entries list that has trinket descriptions by all current players.
InventoryDesctriptions:getItemWisps()
Returns entries list that has Lemegeton Wisps descriptions by all current players.
Creating/Showing custom entries
InvDescEntry[]
, listType? "list" or "grid"
, stopTimer? boolean = true
, listOnly? boolean = true
)
InventoryDesctriptions:showEntries(entries Defines and shows custom entries,
listType
defines which mode should be applied. This ignores mod settings.listOnly
defines whether only list should be shown or not.
InventoryDesctriptions:ResetEntries()
Closes list and resets entries.
Retriving current entries
InventoryDesctriptions:CurrentEntries()
Returns InvDescEntry[]
that is shown in the screen. This includes overflowed entries.