Class StableCavalryBuildingModule

All Implemented Interfaces:
IBuildingWorkerModule, IAssignsCitizen, IAssignsJob, IBuildingEventsModule, IBuildingModule, ICreatesResolversModule, IPersistentModule, ITickingModule, IHasDirty

public class StableCavalryBuildingModule extends GuardBuildingModule
Stable-specific assignment module for cavalry guards.

Barracks guard modules intentionally share a combined hiring limit across all guard jobs at the building. Stables need different accounting: the Stablemaster has its own worker module capped at one citizen, while cavalry should still be allowed up to the building level. This module keeps the cavalry cap local to the cavalry assignees so a stable can employ one Stablemaster plus buildingLevel cavalry units.

  • Constructor Details

    • StableCavalryBuildingModule

      public StableCavalryBuildingModule(GuardType type, boolean canWorkingDuringRain, Function<IBuilding,Integer> sizeLimit)
      Create a cavalry assignment module for the Stable.
      Parameters:
      type - the cavalry guard type.
      canWorkingDuringRain - if the cavalry can work during rain.
      sizeLimit - function defining the cavalry limit for the building.
  • Method Details