Interface IAssignsCitizen

All Superinterfaces:
IBuildingModule, IHasDirty
All Known Subinterfaces:
IAltersBuildingFootprint, IAssignsJob
All Known Implementing Classes:
AbstractAssignedCitizenModule, ChildrenBuildingModule, CourierAssignmentModule, CraftingWorkerBuildingModule, DeliverymanAssignmentModule, GuardBuildingModule, HospitalAssignmentModule, LivingBuildingModule, LumberjackAssignmentModule, MinerBuildingModule, NoPrivateCrafterWorkerModule, QuarryModule, StableCavalryBuildingModule, TavernLivingBuildingModule, WorkAtHomeBuildingModule, WorkerBuildingModule

public interface IAssignsCitizen extends IBuildingModule
Interface for all modules that need special assignment handling.
  • Method Details

    • removeCitizen

      boolean removeCitizen(@NotNull @NotNull ICitizenData citizen)
      Specific citizen removal hook for modules.
      Parameters:
      citizen - the removed citizen.
      Returns:
      true if one was removed.
    • assignCitizen

      boolean assignCitizen(ICitizenData citizen)
      Specific citizen assignment hook for modules.
      Parameters:
      citizen - the added citizen.
      Returns:
      true if one was added.
    • getAssignedCitizen

      List<ICitizenData> getAssignedCitizen()
      Get all assigned citizens to this module.
      Returns:
      the list.
    • isFull

      boolean isFull()
      Check if we can fit additional citizens into the module.
      Returns:
      true if so.
    • getModuleMax

      int getModuleMax()
      Get the max number of citizens this module supports.
      Returns:
      the modules max.
    • hasAssignedCitizen

      boolean hasAssignedCitizen(ICitizenData citizen)
      Check if a given citizen is assigned to this module.
      Parameters:
      citizen - the citizen to check.
      Returns:
      true if so.
    • getAssignedEntities

      List<Optional<AbstractEntityCitizen>> getAssignedEntities()
      Get a list of entities from the assigned citizens.
      Returns:
      optional list of entities.
    • hasAssignedCitizen

      boolean hasAssignedCitizen()
      Check if there are any assigned citizens in the module.
      Returns:
      true if so.
    • setHiringMode

      void setHiringMode(HiringMode hiringMode)
      Set the hiring mode (automatic or manual or colony default).
      Parameters:
      hiringMode - the mode to set.
    • getHiringMode

      HiringMode getHiringMode()
      Get the hiring mode of the module.
      Returns:
      the mode.