diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index e76175a..da39def 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -5,7 +5,7 @@ on: branches: - release tags: - - "v*.*.*" + - "v*" jobs: dev-release: diff --git a/.github/workflows/release-ghcr.yml b/.github/workflows/release-ghcr.yml index 5c9b30a..b41eafe 100644 --- a/.github/workflows/release-ghcr.yml +++ b/.github/workflows/release-ghcr.yml @@ -5,7 +5,7 @@ on: branches: - release tags: - - "v*.*.*" + - "v*" jobs: build-and-push: diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 1abfdfa..566626b 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -17,7 +17,7 @@ chown -R pn:pn /app -cmd="./setup_and_run.sh" +cmd="./setup_and_run.sh --nocli" # Check each environment variable and append it to the command if it exists if [ -n "$APP_LANG" ]; then cmd="$cmd --lang=\"$APP_LANG\""; fi @@ -25,7 +25,7 @@ if [ -n "$APP_PORT" ]; then cmd="$cmd --port=$APP_PORT"; fi if [ -n "$MODE" ]; then cmd="$cmd --mode=\"$MODE\""; fi if [ -n "$SAVE_PATH" ]; then cmd="$cmd --path=\"$SAVE_PATH\""; fi if [ -n "$PASSWORD" ]; then cmd="$cmd --password=\"$PASSWORD\""; fi -if [ -n "$INTERACTIVE" ]; then cmd="$cmd --interactive"; fi +# if [ -n "$INTERACTIVE" ]; then cmd="$cmd --interactive"; fi echo "Launching: $cmd" diff --git a/src/palworld_pal_editor/__main__.py b/src/palworld_pal_editor/__main__.py index 4d3967e..4abde2b 100644 --- a/src/palworld_pal_editor/__main__.py +++ b/src/palworld_pal_editor/__main__.py @@ -18,18 +18,19 @@ def setup_config_from_args(): parser = argparse.ArgumentParser(description="Palworld Pal Editor, developed by _connlost with ❤.") parser.add_argument('--lang', type=str, help=f'Language for the application. options: {", ".join(DataProvider.get_i18n_options())}', default=Config.i18n) - parser.add_argument('--debug', action='store_true', help='The debug option, only for VSCode debug launch.') parser.add_argument('--path', type=str, help='Path to the save folder.', default=Config.path) parser.add_argument('--mode', type=str, help='Running Mode, options: cli, gui, web', default=Config.mode) parser.add_argument('--port', type=int, help='Port used for WebUI mode.', default=Config.port) parser.add_argument('--password', type=str, help='Password for WebUI.', default=Config.password) - parser.add_argument('--interactive', action='store_true', help='Enable Interactive CLI.') + + parser.add_argument('--debug', action='store_true', help='The debug option, only for VSCode debug launch. (Never saved to config.json)') + parser.add_argument('--nocli', action='store_true', help='Disable Interactive CLI on GUI/WEB mode. (Never saved to config.json)') args = parser.parse_args() try: Config.set_configs({ - "debug": Config.debug or args.debug, # True value in config overrides the cli arg. - "interactive": Config.interactive or args.interactive, + "debug": args.debug, # never saved to config.json + "nocli": args.nocli, # never saved to config.json "path": args.path, "mode": args.mode, "port": args.port, @@ -62,10 +63,10 @@ def main(): match Config.mode: case "cli": cli_main() case "gui": - if Config.interactive: InteractThread.load() + if not Config.nocli: InteractThread.load() gui_main() case "web": - if Config.interactive: InteractThread.load() + if not Config.nocli: InteractThread.load() webui_main() if __name__ == "__main__": diff --git a/src/palworld_pal_editor/api/save.py b/src/palworld_pal_editor/api/save.py index 09d9f2d..2362faf 100644 --- a/src/palworld_pal_editor/api/save.py +++ b/src/palworld_pal_editor/api/save.py @@ -105,20 +105,6 @@ def get_active_skills(): return reply(0, {"dict": atk_dict, "arr": atk_arr}) -# def displayElement(element): -# elementEmojis = { -# 'Water': "💧", -# 'Fire': "🔥", -# 'Dragon': "🐉", -# 'Grass': "☘️", -# 'Ground': "🪨", -# 'Ice': "❄️", -# 'Electric': "⚡", -# 'Neutral': "😐", -# 'Dark': "🌑" -# } -# return elementEmojis.get(element) or "❓" - @save_blueprint.route("/i18n", methods=["PATCH"]) # @jwt_required() def update_i18n(): diff --git a/src/palworld_pal_editor/config.py b/src/palworld_pal_editor/config.py index 2c72e3a..ea8e567 100644 --- a/src/palworld_pal_editor/config.py +++ b/src/palworld_pal_editor/config.py @@ -22,7 +22,7 @@ class Config: debug: bool = False path: str = None password: str = None - interactive: bool = False + nocli: bool = False _password_hash: str = None JWT_SECRET_KEY: str = "X2Nvbm5sb3N0"