six-updater-web 0.21.4 → 0.21.5
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -102,7 +102,8 @@ class Appsetting < ActiveRecord::Base
|
|
102
102
|
|
103
103
|
def real_params
|
104
104
|
if self.params.nil?
|
105
|
-
self.detect_edition
|
105
|
+
edition = self.detect_edition
|
106
|
+
edition ? edition::DEFAULT_PARAMS : nil
|
106
107
|
else
|
107
108
|
self.params
|
108
109
|
end
|
@@ -209,7 +210,8 @@ class Appsetting < ActiveRecord::Base
|
|
209
210
|
def detect_edition
|
210
211
|
# TODO: Read the appsetting.exe to figure out an edition, as a static setting by the user?
|
211
212
|
return self.class if self.class::SPECIFIC
|
212
|
-
return
|
213
|
+
return nil unless self.real_path
|
214
|
+
#return self.class unless self.real_path
|
213
215
|
game = nil
|
214
216
|
cond = nil
|
215
217
|
ed = nil
|
@@ -275,16 +277,17 @@ class Appsetting < ActiveRecord::Base
|
|
275
277
|
#Arma2StAppsetting
|
276
278
|
# TODO: Add detection support based on user settings (exe/path)
|
277
279
|
return self.class unless self.real_path
|
278
|
-
|
279
|
-
d ? d : self.class
|
280
|
+
self.detect_edition
|
280
281
|
end
|
281
282
|
|
282
283
|
def found_types
|
283
|
-
self.found_type
|
284
|
+
t = self.found_type
|
285
|
+
t ? t.types : []
|
284
286
|
end
|
285
287
|
|
286
288
|
def nice_found_type
|
287
|
-
self.found_type
|
289
|
+
t = self.found_type
|
290
|
+
t ? t.label : nil
|
288
291
|
end
|
289
292
|
|
290
293
|
def self.types
|
@@ -19,10 +19,13 @@ class Sixconfig < ActiveRecord::Base
|
|
19
19
|
m += srv.mods if srv
|
20
20
|
self.mods.each { |mod| m << mod unless m.include?(mod) }
|
21
21
|
if setting.beta
|
22
|
-
setting.found_type
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
t = setting.found_type
|
23
|
+
if t
|
24
|
+
t::DEFAULT_BETA_MODS.each do |mf|
|
25
|
+
mod = Mod.find_by_name(mf)
|
26
|
+
next unless mod
|
27
|
+
m << mod unless m.include?(mod)
|
28
|
+
end
|
26
29
|
end
|
27
30
|
end
|
28
31
|
m.each {|mod| if (mod.new_record? && !mod.exists?(self.appsetting)); mod.disabled = true; end }
|
@@ -38,6 +38,7 @@
|
|
38
38
|
%a{:title => "Enable (dedicated) server mode" }
|
39
39
|
Server
|
40
40
|
= select( "system", "server_bool", ["default", "true", "false"], {:selected => @server_bool.to_s})
|
41
|
+
|
41
42
|
%a{:title => "Only update mods whos online version doesnt match local" }
|
42
43
|
Autoskip
|
43
44
|
= check_box :system, :autoskip, {:checked => @autoskip}
|