Constructor
new RechargeCommand(populationEngineNumber, volumeEngineNumber, duration)
Create a new RechargeCommand.
Parameters:
| Name | Type | Description |
|---|---|---|
populationEngineNumber |
EngineNumber | Population amount and units to recharge. |
volumeEngineNumber |
EngineNumber | Volume per unit amount and units. |
duration |
YearMatcher | null | Duration specification or null for all years. |
- Source:
Methods
buildCommand(substance) → {string}
Build the command string for this recharge with original number formatting preserved.
Parameters:
| Name | Type | Description |
|---|---|---|
substance |
string | The substance name (unused but kept for consistency). |
- Source:
Returns:
The generated recharge command.
- Type
- string
getDuration() → {YearMatcher|null}
Get the duration for which this recharge command applies.
- Source:
Returns:
The duration specification, or null for all years.
- Type
- YearMatcher | null
getIsCompatible() → {boolean}
Check if this recharge command is compatible with UI editing.
- Source:
Returns:
Always returns true as recharge commands are UI-compatible.
- Type
- boolean
getPopulationEngineNumber() → {EngineNumber}
Get the population EngineNumber.
- Source:
Returns:
The population amount and units.
- Type
- EngineNumber
getTarget() → {EngineNumber}
Get the target for this recharge command (population - Command interface compatibility).
- Source:
Returns:
The population EngineNumber.
- Type
- EngineNumber
getTypeName() → {string}
Get the type name of this command.
- Source:
Returns:
The command type name.
- Type
- string
getValue() → {EngineNumber}
Get the value for this recharge command (volume - Command interface compatibility).
- Source:
Returns:
The volume EngineNumber.
- Type
- EngineNumber
getVolumeEngineNumber() → {EngineNumber}
Get the volume EngineNumber.
- Source:
Returns:
The volume per unit amount and units.
- Type
- EngineNumber