mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 09:12:35 +00:00
Fixed token refresh happening to often at startup, replace missing game icon image with question mark, add support for more wwconfig.exe naming funkiness...
This commit is contained in:
@@ -9,7 +9,7 @@ class W3DHub
|
||||
@games = []
|
||||
|
||||
games.each { |hash| @games << Game.new(hash) }
|
||||
@games.sort_by! { |a| a.slot }.reverse
|
||||
@games.sort_by! { |a| a.name }.reverse
|
||||
end
|
||||
|
||||
def games
|
||||
@@ -17,13 +17,11 @@ class W3DHub
|
||||
end
|
||||
|
||||
class Game
|
||||
attr_reader :slot, :id, :name, :type, :category, :studio_id, :channels, :web_links, :color
|
||||
attr_reader :id, :name, :type, :category, :studio_id, :channels, :web_links, :color
|
||||
|
||||
def initialize(hash)
|
||||
@data = hash
|
||||
|
||||
@slot = slot_index(@data[:id])
|
||||
|
||||
@id = @data[:id]
|
||||
@name = @data[:name]
|
||||
@type = @data[:type]
|
||||
@@ -40,23 +38,6 @@ class W3DHub
|
||||
@color = "ff#{color}".to_i(16)
|
||||
end
|
||||
|
||||
private def slot_index(app_id)
|
||||
case app_id
|
||||
when "ren"
|
||||
1
|
||||
when "ecw"
|
||||
2
|
||||
when "ia"
|
||||
3
|
||||
when "apb"
|
||||
4
|
||||
when "tsr"
|
||||
5
|
||||
else
|
||||
-10
|
||||
end
|
||||
end
|
||||
|
||||
class Channel
|
||||
attr_reader :id, :name, :user_level, :current_version
|
||||
|
||||
|
||||
Reference in New Issue
Block a user