mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 09:12:35 +00:00
Store game colour and uses_engine_cfg to settings config, use wwconfig when game doesn't use engine.cfg
This commit is contained in:
@@ -36,6 +36,13 @@ class W3DHub
|
||||
color = @data[:"extended-data"].find { |h| h[:name] == "colour" }[:value].sub("#", "")
|
||||
|
||||
@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`
|
||||
end
|
||||
|
||||
def uses_engine_cfg?
|
||||
@uses_engine_cfg
|
||||
end
|
||||
|
||||
class Channel
|
||||
|
||||
Reference in New Issue
Block a user