java.lang.Object
org.ironmaple.simulation.Goal
org.ironmaple.simulation.seasonspecific.rebuilt2026.RebuiltOutpost
All Implemented Interfaces:
SimulatedArena.Simulatable

public class RebuiltOutpost extends Goal

Simulates a OUTPOSTs on the field.

This class simulates a outpost on the field where fuel can be scored. It has a store of fuel which can be added too by scoring in it. This fuel can then be dumped via dump() or Arena2026Rebuilt.outpostDump(boolean), thrown at the goal via throwForGoal() or Arena2026Rebuilt.outpostThrowForGoal(boolean), or thrown with specific parameters via throwFuel(Rotation2d, Angle, LinearVelocity) or Arena2026Rebuilt.outpostThrow(boolean, Rotation2d, Angle, LinearVelocity),

  • Field Details

  • Constructor Details

    • RebuiltOutpost

      public RebuiltOutpost(Arena2026Rebuilt arena, boolean isBlue)

      Creates an outpost of the specified color.

      Parameters:
      arena - The host arena of this outpost.
      isBlue - Wether this is the blue outpost or the red one.
  • Method Details

    • addPoints

      protected void addPoints()
      Description copied from class: Goal

      Adds Points When a Piece Has Been Successfully Scored in This Goal

      Since this function is the only trigger called when a piece is scored it may handle other small things outside of adding points.

      Specified by:
      addPoints in class Goal
    • simulationSubTick

      public void simulationSubTick(int subTickNum)
      Description copied from class: Goal

      Handles the update triggers for the goal object.

      Specified by:
      simulationSubTick in interface SimulatedArena.Simulatable
      Overrides:
      simulationSubTick in class Goal
      Parameters:
      subTickNum - the number of this sub-tick (counting from 0 in each robot period)
    • draw

      public void draw(List<Pose3d> drawList)
      Description copied from class: Goal

      Displays Game Pieces to AdvantageScope if Applicable

      Specified by:
      draw in class Goal
      Parameters:
      drawList - a list of Pose3d objects used to visualize the positions of the game pieces on AdvantageScope
    • reset

      public void reset()
      Resets the outposts internal fuel counter too 24.
    • throwForGoal

      public void throwForGoal()

      Attempts too throw a game piece at the specified goal.

      This method comes with variance built in (to simulate human inconsistency) and will therefore only hit about half the time. Additionally if the hub does not have game pieces stored this method will not do anything. If you would like to manually control how the human player throws game pieces use #outpostThrow(boolean, Rotation2d, Angle, LinearVelocity)

    • dump

      public void dump()

      Dumps game pieces from the specified outpost.

      This function will dump up to 24 game pieces, dependent on how many game pieces are currently stored in the outpost. For more manual control of the game pieces in the outpost use #outpostThrow(boolean, Rotation2d, Angle, LinearVelocity). To have a human player attempt to throw a game piece into the hub use #outpostThrowForGoal(boolean).
    • throwFuel

      public void throwFuel(Rotation2d yaw, Angle pitch, LinearVelocity speed)

      Throws a game piece from the outpost at the specified angle and speed.

      This method comes with variance built in (to simulate human inconsistency). Additionally if the hub does not have game pieces stored this method will not do anything. If you would like to have the human player throw at the hub use #outpostThrowForGoal(boolean)

      Parameters:
      throwYaw - The yaw at which too throw the ball.
      throwPitch - The pitch at which too throw the ball.