Record Class SquadMemberSpawnedOutcome

java.lang.Object
java.lang.Record
idlab.colonyops.model.events.SquadMemberSpawnedOutcome
Record Components:
spawnedMembers - all squad members that were spawned in this batch
landingCraft - optional landing craft, in case this is a full squad (re)spawn; null otherwise
All Implemented Interfaces:
ActionOutcome

public record SquadMemberSpawnedOutcome(List<SquadMember> spawnedMembers, LandingCraft landingCraft) extends Record implements ActionOutcome
Outcome reported (not caused by a squad member's action) when one or more SquadMembers are spawned into the world. Covers wipeout respawns, reinforcement call-ins and delayed initial spawns. The MissionEvent.subjectEntityId() and MissionEvent.subjectLocation() refer to the first spawned member for convenience; the full list is available in spawnedMembers().
  • Constructor Details

    • SquadMemberSpawnedOutcome

      public SquadMemberSpawnedOutcome(List<SquadMember> spawnedMembers, LandingCraft landingCraft)
      Creates an instance of a SquadMemberSpawnedOutcome record class.
      Parameters:
      spawnedMembers - the value for the spawnedMembers record component
      landingCraft - the value for the landingCraft record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • spawnedMembers

      public List<SquadMember> spawnedMembers()
      Returns the value of the spawnedMembers record component.
      Returns:
      the value of the spawnedMembers record component
    • landingCraft

      public LandingCraft landingCraft()
      Returns the value of the landingCraft record component.
      Returns:
      the value of the landingCraft record component