Search in sources :

Example 1 with ContainerDataSource

use of eidolons.libgdx.gui.panels.dc.inventory.container.ContainerDataSource in project Eidolons by IDemiurge.

the class ContainerMaster method actionActivated.

@Override
protected boolean actionActivated(CONTAINER_ACTION sub, Unit unit, DungeonObj obj) {
    /*
        pickUpAction
         */
    unit.getGame().getInventoryManager().setHero(unit);
    unit.getGame().getInventoryManager().setOperationsPool(5);
    CharacterCreator.getHeroManager().addHero(unit);
    Pair<InventoryDataSource, ContainerDataSource> param = new ImmutablePair<>(new InventoryDataSource(unit), new ContainerDataSource(obj, unit));
    GuiEventManager.trigger(GuiEventType.SHOW_LOOT_PANEL, param);
    // return true;
    return (boolean) WaitMaster.waitForInput(InventoryTransactionManager.OPERATION);
}
Also used : InventoryDataSource(eidolons.libgdx.gui.panels.dc.inventory.datasource.InventoryDataSource) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) ContainerDataSource(eidolons.libgdx.gui.panels.dc.inventory.container.ContainerDataSource)

Aggregations

ContainerDataSource (eidolons.libgdx.gui.panels.dc.inventory.container.ContainerDataSource)1 InventoryDataSource (eidolons.libgdx.gui.panels.dc.inventory.datasource.InventoryDataSource)1 ImmutablePair (org.apache.commons.lang3.tuple.ImmutablePair)1