diff --git a/src/social/cocoon-gc/edittime.js b/src/social/cocoon-gc/edittime.js index 1041e08..3dae114 100755 --- a/src/social/cocoon-gc/edittime.js +++ b/src/social/cocoon-gc/edittime.js @@ -51,6 +51,8 @@ AddCondition(15, cf_trigger, "On submit achievement success", "Achievements", "O AddCondition(16, cf_trigger, "On submit achievement fail", "Achievements", "On submit achievement failed", "Triggered if something fails when trying to submit an achievement", "onGCSubmitAchievementFail"); +AddCondition(17, cf_none, "Is Logged In", "Social", "Is Logged In", "Checks if the user is already logged in in.", "isLoggedIn"); + /** * Actions */ diff --git a/src/social/cocoon-gc/runtime.js b/src/social/cocoon-gc/runtime.js index 417501f..ca3fc58 100755 --- a/src/social/cocoon-gc/runtime.js +++ b/src/social/cocoon-gc/runtime.js @@ -62,6 +62,9 @@ cr.plugins_.ATPGameCenter = function(runtime) { /** * Conditions */ + Cnds.prototype.isLoggedIn = function() { + return this.GCInterface.isLoggedIn(); + }; Cnds.prototype.onGCLoginSuccess = function() { return true; };