Interface CustomCampaignEntityPlugin

All Known Implementing Classes:
AbyssalLightEntityPlugin, BaseCampaignObjectivePlugin, BaseCustomEntityPlugin, CargoPodsEntityPlugin, CommRelayEntityPlugin, CryosleeperEntityPlugin, DerelictShipEntityPlugin, ExampleCustomEntityPlugin, ExplosionEntityPlugin, FusionLampEntityPlugin, GateEntityPlugin, GateHaulerEntityPlugin, GenericProbeEntityPlugin, HiddenCacheEntityPlugin, NavBuoyEntityPlugin, SensorArrayEntityPlugin, SlipstreamEntityPlugin, SlipstreamEntityPlugin2, SupplyCacheEntityPlugin, TurbulenceEntityPlugin, WarningBeaconEntityPlugin

public interface CustomCampaignEntityPlugin
  • Method Details

    • init

      void init(SectorEntityToken entity, Object params)
    • advance

      void advance(float amount)
      Parameters:
      amount - in seconds. Use SectorAPI.getClock() to figure out how many campaign days that is.
    • render

      void render(CampaignEngineLayers layer, ViewportAPI viewport)
      Should only render for specified layer. Will be called once per each layer, per frame. Needs to respect viewport.getAlphaMult() - i.e. use that alpha value for rendering. Needs to render at the entity's location - there's no translation before this method call. If a sprite is specified, it will be rendered in the bottommost layer of the layers this entity renders for. This method will be called after the sprite has rendered.
      Parameters:
      layer -
      viewport -
    • getRenderRange

      float getRenderRange()
      How far away from the viewport the center of this entity can be before it stops being rendered. Should at least be the radius of the entity; sometimes more may be necessary depending on the visual effect desired.
      Returns:
    • hasCustomMapTooltip

      boolean hasCustomMapTooltip()
    • getMapTooltipWidth

      float getMapTooltipWidth()
    • isMapTooltipExpandable

      boolean isMapTooltipExpandable()
    • createMapTooltip

      void createMapTooltip(TooltipMakerAPI tooltip, boolean expanded)
    • appendToCampaignTooltip

      void appendToCampaignTooltip(TooltipMakerAPI tooltip, SectorEntityToken.VisibilityLevel level)
    • isRenderWhenViewportAlphaMultIsZero

      default boolean isRenderWhenViewportAlphaMultIsZero()