mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 17:22:35 +00:00
Fix handling of extended-data in offline mode
This commit is contained in:
@@ -35,10 +35,11 @@ class W3DHub
|
||||
|
||||
color = @data[:"extended-data"].find { |h| h[:name] == "colour" }[:value].sub("#", "")
|
||||
|
||||
color = color.sub("ff", "") if color.length == 8
|
||||
@color = "ff#{color}".to_i(16)
|
||||
|
||||
cfg = @data[:"extended-data"].find { |h| h[:name] == "usesEngineCfg" }
|
||||
@uses_engine_cfg = (cfg && cfg[:value].downcase.strip == "true") == true # explicit truthy compare to prevent return `nil`
|
||||
@uses_engine_cfg = (cfg && cfg[:value].to_s.downcase.strip == "true") == true # explicit truthy compare to prevent return `nil`
|
||||
end
|
||||
|
||||
def uses_engine_cfg?
|
||||
|
||||
Reference in New Issue
Block a user