Commit a8b7ca8e authored by eire's avatar eire

Update 0.0.8.7z

Add zh99998's code to support EFZ in maotama
parent c7cf5dd5
[ [
{
"id": "efz",
"category": "game",
"name": "零之永恒",
"network": {
"protocol": "udp",
"port": 88
},
"main": "战网服务器EX防鬼版.exe",
"summary": "使用说明: \n- 点 [添加] 选择游戏路径 [战网服务器EX防鬼版.exe] \n- 点 [开始] 运行联网器,并在88端口建主 (直接按Enter,注意配置文件里端口号应该是88) \n- 点 [反重力场] 获取公网IP和端口 \n- 把那个通过QQ等即时通讯工具告诉你的对手 \n- 对方要手动更改配置文件 [lang_2052.txt] 第22行, 106= 后面改上端口号, 然后运行 [战网服务器EX防鬼版.exe] 填IP",
"languages": ["ja-JP"]
},
{ {
"id": "th135", "id": "th135",
"category": "game", "category": "game",
......
...@@ -162,19 +162,23 @@ angular.module('maotama.controllers', []) ...@@ -162,19 +162,23 @@ angular.module('maotama.controllers', [])
$scope.run = ()-> $scope.run = ()->
$scope.runtime.running = true $scope.runtime.running = true
$scope.candy.contentWindow.postMessage(type: 'status', status: "正在玩 #{$scope.app.name}", show: "dnd" , $scope.candy.src) $scope.candy.contentWindow.postMessage(type: 'status', status: "正在玩 #{$scope.app.name}", show: "dnd" , $scope.candy.src)
game = child_process.spawn $scope.app.main, ["--maotama-username=#{$rootScope.current_user.name}", if $scope.app.id is "efz"
"--maotama-ranking-#{$rootScope.current_user.name}=#{$scope.profile.score}", game = child_process.spawn "cmd.exe", ["/c", $scope.app.main],
"--maotama-ranking-博丽灵梦=6500", cwd: $scope.local.installation
"--maotama-ranking-♂Van♂=5800", else
"--maotama-ranking-比利♂海灵顿=5600", game = child_process.spawn $scope.app.main, ["--maotama-username=#{$rootScope.current_user.name}",
"--maotama-ranking-德国Boy=5430", "--maotama-ranking-#{$rootScope.current_user.name}=#{$scope.profile.score}",
"--maotama-ranking-麦当劳叔叔=5400", "--maotama-ranking-博丽灵梦=6500",
"--maotama-ranking-村口王师傅=5200", "--maotama-ranking-♂Van♂=5800",
"--maotama-ranking-帝国元首=4800", "--maotama-ranking-比利♂海灵顿=5600",
"--maotama-ranking-葛老师=3600", "--maotama-ranking-德国Boy=5430",
"--maotama-ranking-五道杠大队长=3300", "--maotama-ranking-麦当劳叔叔=5400",
], "--maotama-ranking-村口王师傅=5200",
cwd: $scope.local.installation "--maotama-ranking-帝国元首=4800",
"--maotama-ranking-葛老师=3600",
"--maotama-ranking-五道杠大队长=3300",
],
cwd: $scope.local.installation
game.stdout.setEncoding('utf8'); game.stdout.setEncoding('utf8');
game.stdout.on 'data', (data)-> game.stdout.on 'data', (data)->
console.log data console.log data
...@@ -239,7 +243,7 @@ angular.module('maotama.controllers', []) ...@@ -239,7 +243,7 @@ angular.module('maotama.controllers', [])
$scope.runtime.tunneling = true $scope.runtime.tunneling = true
$scope.runtime.tunnel = null $scope.runtime.tunnel = null
tunnel.listen 10800, server.url, (address)-> tunnel.listen $scope.app.network.port, server.url, (address)->
$scope.runtime.tunneling = false $scope.runtime.tunneling = false
$scope.runtime.tunnel = address $scope.runtime.tunnel = address
$scope.$digest() $scope.$digest()
......
...@@ -263,9 +263,15 @@ ...@@ -263,9 +263,15 @@
status: "正在玩 " + $scope.app.name, status: "正在玩 " + $scope.app.name,
show: "dnd" show: "dnd"
}, $scope.candy.src); }, $scope.candy.src);
game = child_process.spawn($scope.app.main, ["--maotama-username=" + $rootScope.current_user.name, "--maotama-ranking-" + $rootScope.current_user.name + "=" + $scope.profile.score, "--maotama-ranking-博丽灵梦=6500", "--maotama-ranking-♂Van♂=5800", "--maotama-ranking-比利♂海灵顿=5600", "--maotama-ranking-德国Boy=5430", "--maotama-ranking-麦当劳叔叔=5400", "--maotama-ranking-村口王师傅=5200", "--maotama-ranking-帝国元首=4800", "--maotama-ranking-葛老师=3600", "--maotama-ranking-五道杠大队长=3300"], { if ($scope.app.id === "efz") {
cwd: $scope.local.installation game = child_process.spawn("cmd.exe", ["/c", $scope.app.main], {
}); cwd: $scope.local.installation
});
} else {
game = child_process.spawn($scope.app.main, ["--maotama-username=" + $rootScope.current_user.name, "--maotama-ranking-" + $rootScope.current_user.name + "=" + $scope.profile.score, "--maotama-ranking-博丽灵梦=6500", "--maotama-ranking-♂Van♂=5800", "--maotama-ranking-比利♂海灵顿=5600", "--maotama-ranking-德国Boy=5430", "--maotama-ranking-麦当劳叔叔=5400", "--maotama-ranking-村口王师傅=5200", "--maotama-ranking-帝国元首=4800", "--maotama-ranking-葛老师=3600", "--maotama-ranking-五道杠大队长=3300"], {
cwd: $scope.local.installation
});
}
game.stdout.setEncoding('utf8'); game.stdout.setEncoding('utf8');
game.stdout.on('data', function(data) { game.stdout.on('data', function(data) {
var achievement, achievement_item, command, matches, score, _base, _i, _len, _name, _ref; var achievement, achievement_item, command, matches, score, _base, _i, _len, _name, _ref;
...@@ -361,7 +367,7 @@ ...@@ -361,7 +367,7 @@
$scope.runtime.tunnel_server = server; $scope.runtime.tunnel_server = server;
$scope.runtime.tunneling = true; $scope.runtime.tunneling = true;
$scope.runtime.tunnel = null; $scope.runtime.tunnel = null;
return tunnel.listen(10800, server.url, function(address) { return tunnel.listen($scope.app.network.port, server.url, function(address) {
$scope.runtime.tunneling = false; $scope.runtime.tunneling = false;
$scope.runtime.tunnel = address; $scope.runtime.tunnel = address;
return $scope.$digest(); return $scope.$digest();
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment