summaryrefslogtreecommitdiff
path: root/server/lib/core/commands/imbue_element_command.dart
blob: 2f039d715dd85759079b52b193dc65c51b8feb40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import '../enums.dart';
import '../state/game_state.dart';
import 'command_l10n.dart';

class ImbueElementCommand extends Command {
  final Elements element;
  final bool half;
  final GameState? _gameState;

  ImbueElementCommand(this.element, this.half, {GameState? gameState})
    : _gameState = gameState;

  @override
  void execute() {
    ElementMethods.imbueElement(
      stateAccess,
      element,
      half,
      gameState: _gameState,
    );
  }

  @override
  String describe() {
    return commandL10n.cmdImbueElement(element.name);
  }
}