Enum Class SupportCapability
- All Implemented Interfaces:
Serializable,Comparable<SupportCapability>,Constable
The support vehicles a command is granted for each capability it switches on, together with everything the rest of
support generation needs to know about them: which campaign option grants them, which unit is fielded, how many,
which Table of Organisation and Equipment formation holds them, which support section crews them, and whether they
add to the mechanic demand.
This is the single list every part of support generation reads. The mechanic count, the company generator, the step that organises staff into support teams, and the campaign-option dialogs all ask this enum rather than repeating the option checks themselves. Keeping one copy is what stops them drifting apart, which is what left a command with no recovery vehicles at all (issue #10059).
- Since:
- 0.51.01
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionMobile canteens feeding the command once fatigue is tracked.Flatbed trucks for the StratCon supply convoy, generated with their own crews.MASH trucks, crewed by the medical section, scaled to treat the command's combatants.Recovery vehicles, crewed by the maintenance section, granted under CamOps salvage rules.Rifle infantry guarding prisoners. -
Method Summary
Modifier and TypeMethodDescriptioncrewRole()The role that crews these units, which decides whether they are crewed from the temporary crew pool: ground vehicle crew for the support vehicles, and soldiers for the security detail.The support section whose staff crew these vehicles, ornullwhen the vehicles come with their own crews, as the convoy, the canteens and the security detail do.The formation these vehicles are filed under in the Table of Organisation and Equipment.booleanWhether the campaign has switched this capability on.booleanjoinsSection(Campaign campaign) Whether these vehicles join a support section rather than being generated with their own crew.booleanWhether these vehicles need mechanics, so the personnel stage can count them before they exist.The resource bundle holding this capability's campaign-option dialog text.The key prefix this capability's dialog text uses inside its bundle, so the shared dialog reads the description, and the two button labels, that were written for it.inttargetCount(Campaign campaign, Faction faction) How many of the unit a command of this size should field, before subtracting whatever it already owns.The unit this capability fields, which for the security detail depends on the size of the force and whether the command is Clan.static SupportCapabilityReturns the enum constant of this class with the specified name.static SupportCapability[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SALVAGE
Recovery vehicles, crewed by the maintenance section, granted under CamOps salvage rules. -
MEDICAL
MASH trucks, crewed by the medical section, scaled to treat the command's combatants. -
LOGISTICS
Flatbed trucks for the StratCon supply convoy, generated with their own crews. -
COMMISSARY
Mobile canteens feeding the command once fatigue is tracked. -
SECURITY
Rifle infantry guarding prisoners. Infantry carry no mechanic demand.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
isEnabled
Whether the campaign has switched this capability on. This is the same check that decides whether the capability's campaign-option dialog offers its free vehicles.- Parameters:
campaign- the campaign to inspect- Returns:
truewhen the capability's campaign option is enabled
-
unitName
The unit this capability fields, which for the security detail depends on the size of the force and whether the command is Clan.- Parameters:
campaign- the campaign the vehicles are generated into- Returns:
- the unit name as the unit cache holds it
-
targetCount
How many of the unit a command of this size should field, before subtracting whatever it already owns.- Parameters:
campaign- the campaign the vehicles are generated intofaction- the faction of the command being supported, which is the campaign's own faction mid-campaign and the generated command's faction during command generation- Returns:
- the target count
-
formationType
The formation these vehicles are filed under in the Table of Organisation and Equipment.- Returns:
- the support formation type
-
crewSection
The support section whose staff crew these vehicles, ornullwhen the vehicles come with their own crews, as the convoy, the canteens and the security detail do.- Returns:
- the crewing section, or
null
-
crewRole
The role that crews these units, which decides whether they are crewed from the temporary crew pool: ground vehicle crew for the support vehicles, and soldiers for the security detail.- Returns:
- the crew role
-
needsMechanics
public boolean needsMechanics()Whether these vehicles need mechanics, so the personnel stage can count them before they exist. Infantry do not.- Returns:
truewhen the vehicles add to the mechanic demand
-
joinsSection
Whether these vehicles join a support section rather than being generated with their own crew. A capability joins its section only when it has one and the campaign uses support teams. This is the single rule that decides where every support vehicle goes.- Parameters:
campaign- the campaign the vehicles are generated into- Returns:
truewhen the vehicles are built inside their support section
-
resourceBundle
The resource bundle holding this capability's campaign-option dialog text.- Returns:
- the bundle name
-
resourceKeyPrefix
The key prefix this capability's dialog text uses inside its bundle, so the shared dialog reads the description, and the two button labels, that were written for it.- Returns:
- the resource key prefix
-