Class MeshConsumerSupport


  • public final class MeshConsumerSupport
    extends Object
    Support class for every entity that is part of the mesh system. It contains a lot of important helper methods, create an instance per entity and keep it as part of the entity state.
    • Constructor Detail

      • MeshConsumerSupport

        public MeshConsumerSupport()
    • Method Detail

      • onClientGenerateEntityDetails

        public String onClientGenerateEntityDetails​(UUID parentCompositeId,
                                                    MeshConsumerDef entityDef,
                                                    boolean includeLaneDetails)
      • isBaseResourceStarved

        public boolean isBaseResourceStarved​(MeshLane lane)
      • isBaseResourceOut

        public boolean isBaseResourceOut​(MeshLane lane)
      • requestActionSimulated

        public double requestActionSimulated​(UUID meshConsumerId,
                                             UUID parentCompositeEntityId,
                                             MeshConsumer entity,
                                             double inAmountFactor)
      • onServerTurnPass2PostComposites

        public void onServerTurnPass2PostComposites​(GameSession gameSession,
                                                    PhysicalEntity entity)
      • getMeshConsumerLane

        public int getMeshConsumerLane()
      • setMeshConsumerLane

        public void setMeshConsumerLane​(int meshConsumerLane)
      • getMeshConsumerAmount

        public double getMeshConsumerAmount()
      • setMeshConsumerAmount

        public void setMeshConsumerAmount​(double meshConsumerAmount)
      • getMeshConsumerActionAmount

        public double getMeshConsumerActionAmount()
      • setMeshConsumerActionAmount

        public void setMeshConsumerActionAmount​(double meshConsumerActionAmount)
      • getMeshConsumerLanePrev

        public int getMeshConsumerLanePrev()
      • setMeshConsumerLanePrev

        public void setMeshConsumerLanePrev​(int meshConsumerLanePrev)
      • getMeshConsumerType

        public UUID getMeshConsumerType()
      • setMeshConsumerType

        public void setMeshConsumerType​(UUID meshConsumerType)
      • getMeshPassiveConsumerLane

        public int getMeshPassiveConsumerLane()
      • setMeshPassiveConsumerLane

        public void setMeshPassiveConsumerLane​(int meshPassiveConsumerLane)
      • getMeshPassiveConsumerLanePrev

        public int getMeshPassiveConsumerLanePrev()
      • setMeshPassiveConsumerLanePrev

        public void setMeshPassiveConsumerLanePrev​(int meshPassiveConsumerLanePrev)
      • getMeshPassiveConsumerType

        public UUID getMeshPassiveConsumerType()
      • setMeshPassiveConsumerType

        public void setMeshPassiveConsumerType​(UUID meshPassiveConsumerType)
      • setMeshConsumerAmountGranted

        public void setMeshConsumerAmountGranted​(double amount)
      • getMeshConsumerAmountGranted

        public double getMeshConsumerAmountGranted()
      • getMeshConsumerOneTimeAmountGranted

        public double getMeshConsumerOneTimeAmountGranted()
      • setMeshConsumerOneTimeAmountGranted

        public void setMeshConsumerOneTimeAmountGranted​(double meshConsumerOneTimeAmountGranted)
      • isMeshConsumerResourceOut

        public boolean isMeshConsumerResourceOut()
      • setMeshConsumerResourceOut

        public void setMeshConsumerResourceOut​(boolean meshConsumerResourceOut)
      • isClientDrawIndicatorOutWhenBaseResourceStarved

        public boolean isClientDrawIndicatorOutWhenBaseResourceStarved()
      • setClientDrawIndicatorOutWhenBaseResourceStarved

        public void setClientDrawIndicatorOutWhenBaseResourceStarved​(boolean clientDrawIndicatorOutWhenBaseResourceStarved)
      • getMeshConsumerAmountGrantedPrev

        public double getMeshConsumerAmountGrantedPrev()
      • setMeshConsumerAmountGrantedPrev

        public void setMeshConsumerAmountGrantedPrev​(double meshConsumerAmountGrantedPrev)