боты, русификация, подключение ИИ
This commit is contained in:
@@ -163,6 +163,7 @@ source "$ENV_FILE"
|
||||
set +a
|
||||
|
||||
PLAYERBOTS_RUSSIAN_NAMES="${ACORE_PLAYERBOTS_RUSSIAN_NAMES:-1}"
|
||||
PLAYERBOTS_AI_ENABLED="${ACORE_PLAYERBOTS_AI_ENABLED:-0}"
|
||||
|
||||
cd "$ROOT_DIR"
|
||||
|
||||
@@ -172,6 +173,15 @@ if ! [[ "$PLAYERBOTS_RUSSIAN_NAMES" =~ ^[01]$ ]]; then
|
||||
die "ACORE_PLAYERBOTS_RUSSIAN_NAMES must be 0 or 1, got: $PLAYERBOTS_RUSSIAN_NAMES"
|
||||
fi
|
||||
|
||||
if ! [[ "$PLAYERBOTS_AI_ENABLED" =~ ^[01]$ ]]; then
|
||||
die "ACORE_PLAYERBOTS_AI_ENABLED must be 0 or 1, got: $PLAYERBOTS_AI_ENABLED"
|
||||
fi
|
||||
|
||||
if [[ "$PLAYERBOTS_AI_ENABLED" == "1" ]] && \
|
||||
{ [[ -z "${YANDEX_AI_API_KEY:-}" ]] || [[ -z "${YANDEX_AI_FOLDER_ID:-}" ]]; }; then
|
||||
die "Playerbots AI requires YANDEX_AI_API_KEY and YANDEX_AI_FOLDER_ID in $ENV_FILE"
|
||||
fi
|
||||
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
apply_sysctl
|
||||
else
|
||||
@@ -222,6 +232,19 @@ bash "$ROOT_DIR/setup-modules.sh"
|
||||
log "initializing client data"
|
||||
run_one_shot_service "ac-client-data-init" "ac-client-data-init"
|
||||
|
||||
if [[ "$PLAYERBOTS_AI_ENABLED" == "1" ]]; then
|
||||
log "starting playerbots AI bridge"
|
||||
if [[ -n "$BUILD_FLAG" ]]; then
|
||||
$COMPOSE up -d --build playerbots-ai
|
||||
else
|
||||
$COMPOSE up -d playerbots-ai
|
||||
fi
|
||||
if ! wait_for_healthy "playerbots-ai" 60; then
|
||||
print_service_logs "playerbots-ai"
|
||||
die "playerbots-ai did not become healthy"
|
||||
fi
|
||||
fi
|
||||
|
||||
log "starting authserver and worldserver"
|
||||
if [[ -n "$BUILD_FLAG" ]]; then
|
||||
$COMPOSE up -d --build ac-authserver ac-worldserver
|
||||
|
||||
Reference in New Issue
Block a user