Commit b6fea1ca authored by mercury233's avatar mercury233

fix named ai room name

parent 67278291
...@@ -647,7 +647,7 @@ ROOM_find_or_create_ai = global.ROOM_find_or_create_ai = (name)-> ...@@ -647,7 +647,7 @@ ROOM_find_or_create_ai = global.ROOM_find_or_create_ai = (name)->
w.name == ainame or w.deck == ainame w.name == ainame or w.deck == ainame
if !windbot if !windbot
return { "error": "${windbot_deck_not_found}" } return { "error": "${windbot_deck_not_found}" }
name = namea[0] + ',N#' + Math.floor(Math.random() * 100000) name = namea[0] + '#N' + Math.floor(Math.random() * 100000)
else else
windbot = _.sample _.filter windbots, (w)-> windbot = _.sample _.filter windbots, (w)->
!w.hidden !w.hidden
......
...@@ -838,7 +838,7 @@ ...@@ -838,7 +838,7 @@
"error": "${windbot_deck_not_found}" "error": "${windbot_deck_not_found}"
}; };
} }
name = namea[0] + ',N#' + Math.floor(Math.random() * 100000); name = namea[0] + '#N' + Math.floor(Math.random() * 100000);
} else { } else {
windbot = _.sample(_.filter(windbots, function(w) { windbot = _.sample(_.filter(windbots, function(w) {
return !w.hidden; return !w.hidden;
......
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