Interface StorageEntitySupport


  • public interface StorageEntitySupport
    Helpers to handle storage (inventory) of entities You can access the corresponding bean implementation via EngineFacade::getBusinessObject / ServerFacade::getBusinessObject
    • Method Detail

      • storageAdd

        int storageAdd​(StorageProviderEntity storageProviderEntity,
                       int entityDefIdx,
                       int units)
        Adds items to the storage
      • storageTake

        int storageTake​(StorageProviderEntity storageProviderEntity,
                        int entityDefIdx,
                        int units)
        Takes items from the storage
      • storageEject

        void storageEject​(StorageProviderEntity storageProviderEntity)
        Ejects all items from storage
      • storageEjectSingle

        void storageEjectSingle​(StorageProviderEntity storageProviderEntity,
                                int entityDefIdx,
                                int amount)
        Ejects single items from storage
      • storageExplode

        void storageExplode​(StorageProviderEntity storageProviderEntity)
        Let's the storage contents explode, e.g. when the storage has been destroyed
      • storageRecreate

        void storageRecreate​(StorageProviderEntity entity)
        Resets internal storage state, required when storage entity has been loaded from disk. If you derive from core storage entities this is already handled
      • create

        void create​(StorageProviderEntity entity)
        Callback from entity to make storage functionality work. If you derive from core storage entities this is already handled, otherwise call it from the respective entity method
      • localInit

        void localInit​(StorageProviderEntity entity,
                       StorageProviderEntityDef entityDef)
        Callback from entity to make storage functionality work. If you derive from core storage entities this is already handled, otherwise call it from the respective entity method
      • update

        void update​(StorageProviderEntity entity,
                    StorageProviderEntity other)
        Callback from entity to make storage functionality work. If you derive from core storage entities this is already handled, otherwise call it from the respective entity method
      • onClientDrawEntityAction

        void onClientDrawEntityAction​(PhysicalEntity storageProviderEntity,
                                      List<RenderingBo> renderingBo,
                                      String action,
                                      boolean pending,
                                      CoordI2 subTileOffset)
        Callback from entity to make storage functionality work. If you derive from core storage entities this is already handled, otherwise call it from the respective entity method
      • onClientDrawEntityActions

        void onClientDrawEntityActions​(PhysicalEntity storageProviderEntity,
                                       List<RenderingBo> renderingBo)
        Callback from entity to make storage functionality work. If you derive from core storage entities this is already handled, otherwise call it from the respective entity method
      • onClientDrawConsoleControls

        void onClientDrawConsoleControls​(StorageProviderEntity entity,
                                         ScrollBar clientInventoryScrollBar,
                                         List<org.apache.commons.lang3.tuple.Pair<String,​String>> additionalDisplayItems,
                                         boolean controlsActive,
                                         List<ClientConsoleControlSet> consoleControls)
        Callback from entity to make storage functionality work. If you derive from core storage entities this is already handled, otherwise call it from the respective entity method
      • onClientActionMessage

        void onClientActionMessage​(PhysicalEntity storageProviderEntity,
                                   GameActionMessage message)
        Callback from entity to make storage functionality work. If you derive from core storage entities this is already handled, otherwise call it from the respective entity method
      • onServerTurnPass0

        void onServerTurnPass0​(PhysicalEntity storageProviderEntity,
                               GameSession gameSession)
        Callback from entity to make storage functionality work. If you derive from core storage entities this is already handled, otherwise call it from the respective entity method
      • onServerDamage

        void onServerDamage​(PhysicalEntity storageProviderEntity,
                            GameSession gameSession,
                            double oldHealth)
        Callback from entity to make storage functionality work. If you derive from core storage entities this is already handled, otherwise call it from the respective entity method
      • onServerConsoleControlEvent

        void onServerConsoleControlEvent​(PhysicalEntity storageProviderEntity,
                                         GameSession gameSession,
                                         UUID sender,
                                         String controlId,
                                         Object payload)
        Callback from entity to make storage functionality work. If you derive from core storage entities this is already handled, otherwise call it from the respective entity method