ItemDefinitionReadable ​
Inherits: ItemDefinition < DatabaseResource < Resource
Readable items that display text content in a UI panel when used Supports multi-page documents like books, scrolls, letters, and lore texts
Properties ​
Array[String]: | pages_text | |
Texture2D | background_texture |
Methods ​
bool | can_use( user: Entity, item_instance: ItemInstance = null ) |
bool | execute_use( user: Entity, item_instance: ItemInstance ) |
String | get_use_action_name( _item_instance: ItemInstance ) |
void | on_readable_item_used( item_instance: ItemInstance, user: Entity ) |
Property descriptions ​
Array[String]: pages_text ​
Array of text content for each page of the readable item Each string represents one page - supports rich text formatting with BBCode Example: ["Page 1 content...", "Page 2 content...", "Final page..."]
Texture2D background_texture ​
Optional background texture for the readable panel
Method descriptions ​
bool can_use( user: Entity, item_instance: ItemInstance = null ) ​
Check if readable item can be used
bool execute_use( user: Entity, item_instance: ItemInstance ) ​
Execute readable item usage - signal UI to display content
String get_use_action_name( _item_instance: ItemInstance ) ​
Get display name for readable action
void on_readable_item_used( item_instance: ItemInstance, user: Entity ) ​
Virtual method for readable-specific logic when item is used Called by ItemInstance after successful usage