Browse Source

fix render events

Maxim Sokhatsky 11 years ago
parent
commit
00925bb53e
3 changed files with 13 additions and 3 deletions
  1. 4 1
      .travis.yml
  2. 8 1
      apps/face/src/n2o_game.erl
  3. 1 1
      otp.mk

+ 4 - 1
.travis.yml

@@ -2,7 +2,10 @@ language: erlang
 otp_release:
   - R16B
 notifications:
-  email: maxim@synrc.com
+  email: 
+    - maxim@synrc.com
+    - roman.dayneko@gmail.com
+    - sustel@kakaranet.com
   irc: "chat.freenode.net#n2o"
 install: "make"
 script: "make test"

+ 8 - 1
apps/face/src/n2o_game.erl

@@ -80,7 +80,14 @@ info({client,Message}, Req, State) ->
 info({send_message,Message}, Req, State) ->
     Module = State#context.module,
     catch Module:event({server,Message}),
-    {reply,[<<"DATA">>,io_lib:format("~p",[Message])],Req,State};
+    Actions = get(actions),
+    wf_context:clear_actions(),
+    Render = wf:render(Actions),
+    GenActions = get(actions),
+    RenderGenActions = wf:render(GenActions),
+    wf_context:clear_actions(),
+    {reply,[<<"EVAL">>,Render,RenderGenActions],Req,State};
+%    {reply,[<<"DATA">>,io_lib:format("~p",[Message])],Req,State};
 
 info(Pro, Req, State) ->
     Render = 

+ 1 - 1
otp.mk

@@ -12,7 +12,7 @@ relx  := "{release,{$(RELEASE),\"$(VER)\"},[$(subst $(space),$(comma),$(APPS))]}
 test: eunit ct
 compile: get-deps static-link
 delete-deps get-deps compile clean update-deps:
-	rebar $(REBAR_D) $@ skip_deps=true
+	rebar $(REBAR_D) $@
 .applist:
 	./depman.erl $(APPS) > $@
 $(RUN_DIR) $(LOG_DIR):