User Tools

Site Tools


mr:bag_item

Bag Item - Machine Readable Reference

Java Classes

  • Bag.java - Base bag/container class
  • Implements: Iterable<Item>
  • Key methods:
    • `actions(Char hero)` - Returns actions including AC_OPEN
    • `_execute(Char chr, String action)` - Handles AC_OPEN to show bag UI
    • `collect(Bag container)` - Collects items from another bag
    • `onDetach()` - Returns items to owner's inventory when detached
    • `isUpgradable()` - Returns false (bags cannot be upgraded)
    • `isIdentified()` - Returns true (bags are always identified)
    • `storeInBundle(Bundle bundle)` / `restoreFromBundle(Bundle bundle)` - Serialization
    • `contains(Item item)` - Checks if bag contains item (recursive)
    • `grab(Item item)` - Checks if item can go in this bag type
    • `getSize()` - Returns capacity based on owner
    • `getEntityKind()` - Returns class simple name for item type matching
    • `setOwner(Char owner)` - Sets owner for bag and all contained items
  • Subclasses:
    • ScrollHolder (scrolls)
    • WandHolster (wands)
    • PotionBelt (potions)
    • Quiver (arrows)
    • SeedPouch (seeds)
    • Keyring (keys)
    • Backpack (general inventory)

JSON Configuration

This entity is implemented in Java, no JSON configuration exists

String Resources

<string name="Bag_ACOpen">Open</string>

Lua Scripts

This entity is implemented in Java, no Lua script exists

Content Verification

  • Information source: Java code (Bag.java and subclasses)
  • Last updated: Based on Remixed Dungeon source code analysis
mr/bag_item.txt · Last modified: by 127.0.0.1