#!/usr/bin/env bash
# Author: cefeiko
# type: games
# name: Pulse Online
# image: pulseonline
# info_en: A multiplayer online game in the MMORPG genre set in a sci-fi world with a unique combat system and deep crafting mechanics. Players can explore vast locations, complete quests, battle enemies, and interact with other participants in the game.
# info_ru: Многопользовательская онлайн-игра в жанре MMORPG, действие которой происходит в научно-фантастическом мире с уникальной боевой системой и глубоким крафтом. Игроки могут исследовать обширные локации, выполнять квесты, сражаться с противниками и взаимодействовать с другими участниками игры.
########################################################################
export PW_PREFIX_NAME="DOTNET"
export PORTWINE_CREATE_SHORTCUT_NAME="Pulse Online"

start_portwine

create_new_dir "${WINEPREFIX}/drive_c/games/PulseOnline/"
export PW_AUTOINSTALL_EXE="${WINEPREFIX}/drive_c/games/PulseOnline/PulseOnlineLauncher.exe"

if try_download "https://pulseonline.ru/game_download/PulseOnlineLauncher.exe" "${PW_AUTOINSTALL_EXE}" no_mirror
then
    export portwine_exe="$PW_AUTOINSTALL_EXE"
    try_remove_file "${portwine_exe}.ppdb"
    pw_stop_progress_bar
    portwine_create_shortcut
    kill_portwine
fi

stop_portwine
