Class: Arma2OaCoAppsetting

Inherits:
Arma2OaAppsetting show all
Defined in:
lib/six-updater-web/app/models/arma2_oa_co_appsetting.rb

Constant Summary collapse

FRIENDLY_NAME =
"A2 Op. Arrowhead (Combined Ops)"
SPECIFIC =
true
STATIC_TYPES =

TODO: Evaluate Perhaps look at adding a boolean: specific, so when it is enabled, non of the inherited editions can be used? Since Arma2 standalone addons should work on OaCo, yet you would loose the specific ‘arma2standalone only’ option

[Arma2CaAppsetting]
GAMESPY_TYPES =
["arma2oapc", "arma2pc"]
GAME_MIN_VERSIONS =
["1.5", "1.0"]

Constants inherited from Arma2OaAppsetting

Arma2OaAppsetting::DEFAULT_BETA_EXE, Arma2OaAppsetting::DEFAULT_BETA_EXE_PATH, Arma2OaAppsetting::DEFAULT_BETA_MODS, Arma2OaAppsetting::DEFAULT_EXE, Arma2OaAppsetting::DEFAULT_SERVER_EXE, Arma2OaAppsetting::DEFAULT_SERVER_EXE_PATH, Arma2OaAppsetting::FAMILY, Arma2OaAppsetting::MODS, Arma2OaAppsetting::REGKEYS

Constants inherited from Appsetting

Appsetting::DEFAULT_BETA_EXE, Appsetting::DEFAULT_BETA_EXE_PATH, Appsetting::DEFAULT_BETA_MODS, Appsetting::DEFAULT_EXE, Appsetting::DEFAULT_EXE_PATH, Appsetting::DEFAULT_MODS_PARAM, Appsetting::DEFAULT_PARAMS, Appsetting::DEFAULT_SERVER_EXE, Appsetting::DEFAULT_SERVER_EXE_PATH, Appsetting::FAMILY, Appsetting::FOLDER, Appsetting::MODS, Appsetting::OVERRIDE_MODEL, Appsetting::REGKEYS

Instance Method Summary collapse

Methods inherited from Appsetting

#allowance, #any_exe?, beta_exe, beta_server_exe, #default_params, default_path, #detect_edition, #edition, #explore, #found_types, #full_path, #kill!, #label, label, #logfile, #nice_edition, normal_exe, #process_name, #processes, #read_logfile, #real_exe, #real_logpath, #real_modpath, #real_params, #real_path, #rpt, server_exe, short, #to_updater_yml, types

Methods inherited from ActiveRecord::Base

#associated_valid?, #no_errors_in_associated?, #save_associated, #save_associated!, #save_with_unsaved_flag, #to_label, #unsaved=, #unsaved?

Instance Method Details

#modfoldersObject



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/six-updater-web/app/models/arma2_oa_co_appsetting.rb', line 12

def modfolders
  v = Appsetting::REGKEYS["Arma2"]
  @mpath = begin; Win32::Registry.open(Win32::Registry::HKEY_LOCAL_MACHINE, v[0])[v[1]]; rescue; nil; end
  m = !File.directory?(File.join(self.real_path, 'addons')) && !@mpath.nil? && @mpath != self.class.default_path ? [@mpath] : []
  if !m.empty?
    m = m + self.class::MODS
  end
  if self.beta
    m + self.edition::DEFAULT_BETA_MODS
  else
    m
  end
end