@@ -3,9 +3,11 @@ local Application = {}
33local fs = require ("@lune/fs" )
44local process = require ("@lune/process" )
55
6+ local Utilities = require ("./Utilities" )
67local metadata = require ("./Metadata" )
7- local Filesystem = require ("./Utilities" ).Filesystem
8- local Logging = require ("./Utilities" ).Logging
8+ local Filesystem = Utilities .Filesystem
9+ local Logging = Utilities .Logging
10+ local System = Utilities .System
911local Steam = require ("./Steam" )
1012
1113function Application .start ()
@@ -43,19 +45,23 @@ function Application.start()
4345 local ok , steamConfig = pcall (Steam .Configuration .getSteamConfiguration )
4446 if not ok then
4547 Logging .write ("error" , "Failed to load Steam games." )
48+ System .sendNotification (metadata .name , "Failed to load Steam games." , "critical" , true )
4649 process .exit (1 )
4750 end
4851
4952 -- Load the game's data
5053 local gameData = steamConfig [launchedAppID ]
5154 if not gameData then
5255 Logging .write ("error" , "No data found for game with AppID " .. launchedAppID .. "." )
56+ System .sendNotification (metadata .name , "No data found for game with AppID " .. launchedAppID .. "." , "critical" , true )
5357 process .exit (1 )
5458 end
5559
5660 Logging .write ("success" , 'Detected "' .. gameData .name .. '" (' .. gameData .appID .. ") !" )
61+ System .sendNotification (metadata .name , "Detected " .. gameData .name .. "." , "normal" , true )
5762 else
5863 Logging .write ("info" , "Launched without Steam." )
64+ System .sendNotification (metadata .name , "No graphical interface implemented yet." , "critical" , true )
5965 error ("No graphical interface implemented yet." )
6066 end
6167end
0 commit comments