40 lines
1.3 KiB
JavaScript
40 lines
1.3 KiB
JavaScript
var steam = use("steam");
|
|
|
|
console.log("Steam module loaded:", steam);
|
|
|
|
if (steam) {
|
|
console.log("Steam functions available:");
|
|
console.log("- steam_init:", typeof steam.steam_init);
|
|
console.log("- steam_shutdown:", typeof steam.steam_shutdown);
|
|
console.log("- steam_run_callbacks:", typeof steam.steam_run_callbacks);
|
|
|
|
console.log("\nSteam sub-modules:");
|
|
console.log("- stats:", steam.stats);
|
|
console.log("- achievement:", steam.achievement);
|
|
console.log("- app:", steam.app);
|
|
console.log("- user:", steam.user);
|
|
console.log("- friends:", steam.friends);
|
|
console.log("- cloud:", steam.cloud);
|
|
|
|
// Try to initialize Steam
|
|
console.log("\nAttempting to initialize Steam...");
|
|
var init_result = steam.steam_init();
|
|
console.log("Initialization result:", init_result);
|
|
|
|
if (init_result) {
|
|
// Get some basic info
|
|
console.log("\nApp ID:", steam.app.app_id());
|
|
console.log("User logged on:", steam.user.user_logged_on());
|
|
|
|
if (steam.user.user_logged_on()) {
|
|
console.log("User name:", steam.friends.friends_name());
|
|
console.log("User state:", steam.friends.friends_state());
|
|
}
|
|
|
|
// Shutdown when done
|
|
steam.steam_shutdown();
|
|
console.log("Steam shut down");
|
|
}
|
|
} else {
|
|
console.log("Steam module not available (compiled without Steam support)");
|
|
} |