ワンクリックで
pet-inventory-management
Implementation pattern for adding pet inventory management (give/take/equip/unequip items to pets)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Implementation pattern for adding pet inventory management (give/take/equip/unequip items to pets)
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | pet-inventory-management |
| description | Implementation pattern for adding pet inventory management (give/take/equip/unequip items to pets) |
| source | auto-skill |
| extracted_at | 2026-06-11T15:24:51.878Z |
This skill documents the approach for implementing pet inventory management in Remixed Dungeon, allowing players to give, take, equip, and unequip items on their pets.
The implementation follows the existing codebase patterns:
PetInventoryManager for all pet inventory operationsWndPetBag extending WndBag for pet inventory displayCommonActions constants for pet-specific actionsWndPetSelect for choosing among multiple petsBelongings (backpack + equipment slots) via Char.getBelongings()Char.storeInBundle()/restoreFromBundle()Belongings.equip()/unequip()/setItemForSlot()WndBag/ItemButton/WndItemHero taps pet → Order menu → [Move, Attack, Inventory, Expel]
↓
WndPetSelect (if >1 pet)
↓
WndPetBag (pet's inventory)
↓
Item tap → WndItem with pet actions:
[Give to Pet, Take from Pet, Equip on Pet, Unequip from Pet]
Static utility class with methods:
giveItemToPet(Hero hero, Mob pet, Item item) - Transfer from hero to pettakeItemFromPet(Hero hero, Mob pet, Item item) - Transfer from pet to heroequipItemOnPet(Mob pet, EquipableItem item, Belongings.Slot slot) - Equip on petunequipItemFromPet(Mob pet, EquipableItem item) - Unequip from petcanEquipOnPet(Mob pet, EquipableItem item, Belongings.Slot slot) - ValidationopenPetInventory(Hero hero, Mob pet) - Opens WndPetBagMob pet instead of Belongingspublic static final String AC_PET_INVENTORY = "PetInventory_ACOpen";
public static final String AC_GIVE_TO_PET = "PetInventory_ACGiveToPet";
public static final String AC_TAKE_FROM_PET = "PetInventory_ACTakeFromPet";
public static final String AC_EQUIP_ON_PET = "PetInventory_ACEquipOnPet";
public static final String AC_UNEQUIP_FROM_PET = "PetInventory_ACUnequipFromPet";
actions())if (target.isPet() && target.getOwnerId() == hero.getId()) {
actions.add(CommonActions.AC_PET_INVENTORY);
}
Add "Inventory" option alongside Move/Attack in the cell selection prompt.
In Item.actions(Char hero) or EquipableItem.actions(Char hero):
PetInventoryManager for actual operationsisPet() == truepet.getOwnerId() == hero.getId()// Give to pet
item.detach(hero.getBelongings().backpack);
item.setOwner(pet);
pet.getBelongings().collect(item);
// Take from pet
item.detach(pet.getBelongings().backpack);
item.setOwner(hero);
hero.getBelongings().collect(item);
Pets use same Belongings.Slot enum:
Belongings.equip() / unequip() work identicallyAdd @LuaInterface annotations to PetInventoryManager methods:
@LuaInterface
public static void giveItemToPet(Hero hero, Mob pet, Item item) { ... }
@LuaInterface
public static void openPetInventory(Hero hero, Mob pet) { ... }
Mob.dropAll())