Browse Source

Merge branch 'master' of github.com:kakaranet/games

Roman Dayneko 11 years ago
parent
commit
8943b2e36c

+ 1 - 1
apps/face/priv/static/google_sdk.js

@@ -12,7 +12,7 @@ function render(){
   gapi.signin.render('plusloginbtn', {
   gapi.signin.render('plusloginbtn', {
     'callback':'plusoneCallback',
     'callback':'plusoneCallback',
     'clientid':'146782506820.apps.googleusercontent.com',
     'clientid':'146782506820.apps.googleusercontent.com',
-    'cookiepolicy': 'http://synrc.com',
+    'cookiepolicy': 'http://skyline.synrc.com',
     'requestvisibleactions':'http://schemas.google.com/AddActivity',
     'requestvisibleactions':'http://schemas.google.com/AddActivity',
     'scope':'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email '
     'scope':'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email '
   });
   });

+ 1 - 1
apps/face/priv/templates/index.html

@@ -10,7 +10,7 @@
 </head>
 </head>
 <body>
 <body>
 {{body}}
 {{body}}
-<script>var transition = {pid: '' };</script>
+<script>var transition = {pid: '', port: '8000' };</script>
 <script>function handle_web_socket(body) { console.log(String(bert.decodebuf(body))); } </script>
 <script>function handle_web_socket(body) { console.log(String(bert.decodebuf(body))); } </script>
 <script src='/static/nitrogen/bullet.js' type='text/javascript' charset='utf-8'></script>
 <script src='/static/nitrogen/bullet.js' type='text/javascript' charset='utf-8'></script>
 <script src='/static/nitrogen/n2o.js' type='text/javascript' charset='utf-8'></script>
 <script src='/static/nitrogen/n2o.js' type='text/javascript' charset='utf-8'></script>

+ 3 - 2
apps/face/src/index.erl

@@ -73,6 +73,7 @@ pause(GameId, Action) ->
        )
        )
      ).
      ).
 
 
+redraw_tiles(undefined) -> [];
 redraw_tiles([{Tile, _}| _ ] = TilesList) ->
 redraw_tiles([{Tile, _}| _ ] = TilesList) ->
     wf:update(discard_combo,
     wf:update(discard_combo,
         [#dropdown{id = discard_combo, postback = combo,
         [#dropdown{id = discard_combo, postback = combo,
@@ -129,7 +130,7 @@ body() ->
     ].
     ].
 
 
 event(terminate) -> wf:info("terminate");
 event(terminate) -> wf:info("terminate");
-event(init) -> event(attach), event(join);
+event(init) -> ok; %event(attach), event(join);
 
 
 event(combo)  -> wf:info("Combo: ~p",[wf:q(discard_combo)]);
 event(combo)  -> wf:info("Combo: ~p",[wf:q(discard_combo)]);
 event(join)   -> wf:wire(join("1000001"));
 event(join)   -> wf:wire(join("1000001"));
@@ -295,7 +296,7 @@ event(reveal) ->
 
 
 event(login_button) -> wf:wire(logout());
 event(login_button) -> wf:wire(logout());
 event({register,User}) -> wf:info("Register: ~p",[User]), kvs:add(User), wf:user(User);
 event({register,User}) -> wf:info("Register: ~p",[User]), kvs:add(User), wf:user(User);
-event({login,User}) -> wf:info("Login: ~p",[User]), wf:user(User);
+event({login,User}) -> wf:info("Login: ~p",[User]), kvs:put(User), wf:user(User);
 
 
 event(pause) ->
 event(pause) ->
     Action  =
     Action  =

+ 1 - 1
apps/server/src/gas.erl

@@ -2,7 +2,7 @@
 -compile(export_all).
 -compile(export_all).
 
 
 %-define(ALLOWED, [gas,nsg_trn_lucky,game_session,game_manager,game_okey_ng_table_trn]).
 %-define(ALLOWED, [gas,nsg_trn_lucky,game_session,game_manager,game_okey_ng_table_trn]).
--define(ALLOWED, [gas,game_session]).
+-define(ALLOWED, [gas]).
 
 
 log(Module, String, Args, Fun) ->
 log(Module, String, Args, Fun) ->
     case lists:member(Module,?ALLOWED) of
     case lists:member(Module,?ALLOWED) of