Module: Factorix::CLI::Commands::RequiresGameStopped

Defined in:
lib/factorix/cli/commands/requires_game_stopped.rb

Overview

Mixin for commands that require the game to be stopped

This module provides automatic validation that the game is not running before executing commands that modify MOD installation state or mod-list.json/mod-settings.dat files.

Prepend this module in commands that should not run while the game is active (e.g., install, uninstall, enable, disable)

Instance Method Summary collapse

Instance Method Details

#call(**options) ⇒ void

This method returns an undefined value.

Wrapper for command call that checks game state

Parameters:

  • options (Hash)

    command options passed to the original call method



18
19
20
21
# File 'lib/factorix/cli/commands/requires_game_stopped.rb', line 18

def call(**options)
  check_game_stopped
  super
end