Skip to content

Commit

Permalink
Merge branch 'develop' into QWebEngineView
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisCris committed Jul 11, 2024
2 parents 15c8d8b + 3256602 commit 5579260
Show file tree
Hide file tree
Showing 56 changed files with 2,627 additions and 386 deletions.
32 changes: 0 additions & 32 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Bug report
description: File a bug/issue
title: "[BUG] <title>"
labels: [bug]
body:
- type: checkboxes
id: low-effort-checks
attributes:
label: Please confirm
description: Issues without all checks may be ignored/closed.
options:
- label: I have searched existing issues
- label: This issue is not a duplicate of an existing one
- label: I have read the [README](https://github.com/KrisCris/Palworld-Pal-Editor?tab=readme-ov-file#palworld-pal-editor)
- label: I have attached logs to this bug report (failure to include logs will mean your issue may not be responded to).
- label: I have checked for both game and editor updates, and understand that issues on older versions may not be resolved.

- type: textarea
attributes:
label: Bug Report Description
description: A clear and concise description of what the bug is and if possible, the steps you used to get to the bug. If appropriate, include screenshots or videos.
placeholder: |
When I try to use ...
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
validations:
required: true

- type: textarea
attributes:
label: Expected Behaviour
description: A brief description of the expected behavior.
placeholder: It should be ...
validations:
required: true

- type: input
attributes:
label: Editor Version
placeholder: "0.8.1"
validations:
required: true

- type: input
attributes:
label: Game Version
placeholder: "0.3.3"
validations:
required: true

- type: textarea
attributes:
label: Logs
description: Please copy the most recent `.log` file, which is stored right next to the executable.
placeholder: 2024-07-11_15-15-11.log
validations:
required: true


1 change: 1 addition & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
release-build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
build-and-push-docker-image:
Expand Down
2 changes: 1 addition & 1 deletion build_and_run_docker.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docker build -t palworld-pal-editor -f docker/Dockerfile .
docker build --no-cache -t palworld-pal-editor -f docker/Dockerfile .

if which docker-compose > /dev/null; then
docker-compose -f docker/docker-compose.yml up -d
Expand Down
10 changes: 6 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
FROM nikolaik/python-nodejs:python3.12-nodejs21-slim

ENV PATH=/usr/local/nginx/bin:$PATH
EXPOSE $APP_PORT
EXPOSE 58888
VOLUME [ "/mnt/gamesave" ]

WORKDIR /app

RUN apt-get update && apt-get install -y --no-install-recommends \
tini \
gosu \
tzdata \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

COPY --chown=pn:pn ./ /app
COPY --chown=pn:pn --chmod=777 ./ /app

RUN cd "/app/frontend/palworld-pal-editor-webui" \
&& npm install \
&& npm run build \
&& mv "/app/frontend/palworld-pal-editor-webui/dist" "/app/src/palworld_pal_editor/webui"

RUN pip install --no-cache-dir -r requirements.txt \
&& pip install -e .
pip install -e .

RUN chmod +x /app/docker/app.sh

ENTRYPOINT ["tini", "-g", "--"]

CMD ["/app/docker/app.sh"]
3 changes: 1 addition & 2 deletions docker/app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ if [ ! -z "$PUID" ] && [ ! -z "$PGID" ]; then
groupmod -g $PGID pn
fi

cmd="python -m palworld_pal_editor --nocli"
cmd="gosu pn:pn python -m palworld_pal_editor --nocli --path=\"/mnt/gamesave\""

if [ -n "$APP_LANG" ]; then cmd="$cmd --lang=\"$APP_LANG\""; fi
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

echo "Launching: $cmd"
Expand Down
16 changes: 7 additions & 9 deletions docker/sample-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@ services:
image: ghcr.io/kriscris/palworld-pal-editor:latest
restart: unless-stopped
container_name: palworld-pal-editor
# network_mode: host
ports:
- 58888:58888
- 8080:58888 # Host Port : Container Port
environment:
- PUID=1000 # change this to your uid
- PGID=1000
- APP_PORT=58888 # make sure this matches the port you are going to map
- APP_LANG=en # options: en, zh-CN, ja
- PUID=1000 # Change this to your uid
- PGID=1000 # Change this to your gid
- APP_PORT=58888 # The port Palworld Pal Editor listens on, normally you don't modify it unless network is set to host mode.
- APP_LANG=en # Options: en, zh-CN, ja
- MODE=web
- SAVE_PATH=/mnt/gamesave # this should match the volume you mapped to
- PASSWORD=password # to prevent unauthorized access, setting up a strong password is recommended.
- PASSWORD=password # To prevent unauthorized access, a strong password is recommended.
volumes:
- "/Host/Path/To/The/GameSave/AF518B19A47340B8A55BC58137981393:/mnt/gamesave" # host path : container path
- "/Host/Path/To/The/GameSave/AF518B19A47340B8A55BC58137981393:/mnt/gamesave" # Host path : Container path
12 changes: 6 additions & 6 deletions frontend/palworld-pal-editor-webui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions frontend/palworld-pal-editor-webui/src/components/TopBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ watch(() => palStore.LOADING_FLAG, (newValue) => {
🏠 {{ palStore.getTranslatedText("TopBar_Btn_Main_Page") }}
</button>

<button class="op" @click="palStore.updatePal" name="heal_all_pals" :disabled="palStore.LOADING_FLAG">
💉 {{ palStore.getTranslatedText("TopBar_Btn_HealAllPals") }}
</button>

<button
:class="['op', { 'toggled': palStore.SHOW_OOB_PAL_FLAG }]"
@click="palStore.SHOW_OOB_PAL_FLAG = !palStore.SHOW_OOB_PAL_FLAG"
Expand Down
1 change: 1 addition & 0 deletions frontend/palworld-pal-editor-webui/src/i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default {
TopBar_Btn_Save: "SAVE CHANGES",
TopBar_Btn_Reload: "Reload Save",
TopBar_Btn_Main_Page: "Return to Main Page",
TopBar_Btn_HealAllPals: "Heal All Pals",
TopBar_Btn_Pal_OOB: "Show Out of Box Pal",
TopBar_Btn_Pal_Ghost: "Toggle Ghost Pal",
TopBar_Btn_Invalid_Options: "Hide Invalid Options",
Expand Down
1 change: 1 addition & 0 deletions frontend/palworld-pal-editor-webui/src/i18n/ja.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default {
TopBar_Btn_Save: "変更を保存",
TopBar_Btn_Reload: "セーブをリロード",
TopBar_Btn_Main_Page: "メインページに戻る",
TopBar_Btn_HealAllPals: "すべてのパルを回復する",
TopBar_Btn_Pal_OOB: "ボックス外パルを表示",
TopBar_Btn_Pal_Ghost: "ゴーストパルを表示",
TopBar_Btn_Invalid_Options: "無効なオプションを非表示",
Expand Down
1 change: 1 addition & 0 deletions frontend/palworld-pal-editor-webui/src/i18n/zh-CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default {
TopBar_Btn_Save: "保存更改",
TopBar_Btn_Reload: "重新载入存档",
TopBar_Btn_Main_Page: "返回主页",
TopBar_Btn_HealAllPals: "治愈所有帕鲁",
TopBar_Btn_Pal_OOB: "显示不在身边的帕鲁",
TopBar_Btn_Pal_Ghost: "显示不存在的帕鲁",
TopBar_Btn_Invalid_Options: "隐藏不可用的选项",
Expand Down
4 changes: 2 additions & 2 deletions frontend/palworld-pal-editor-webui/src/stores/paleditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ export const usePalEditorStore = defineStore("paleditor", () => {
}

levelUp() {
if (this.Level < 50) {
if (this.Level < 55) {
this.Level += 1;
updatePal({ target: { name: "Level", value: this.Level } });
}
}

maxLevel() {
this.Level = 50;
this.Level = 55;
updatePal({ target: { name: "Level", value: this.Level } });
}

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ keywords = ["palworld", "editor", "pal"]
license = {file = "LICENSE"}
requires-python = ">=3.11"
readme = "README.md"
version = "0.8.1"
version = "0.9.0"
dependencies = [
"setuptools==69.1.0",
"palworld_save_tools==0.22.0",
"palworld_save_tools==0.23.1",
"wheel==0.42.0",
"Flask==3.0.2",
"pyinstaller==6.4.0",
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
setuptools==69.1.0
palworld_save_tools==0.22.0
palworld_save_tools==0.23.1
wheel==0.42.0
Flask==3.0.2
# pillow==10.2.0
pyinstaller==6.4.0
waitress==3.0.0
Flask-JWT-Extended==4.6.0
Expand Down
4 changes: 3 additions & 1 deletion src/palworld_pal_editor/api/pal.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def patch_paldata():
pal_entity = SaveManager().get_player(PlayerUId).get_pal(PalGuid)
try:
match key:
case "HasWorkerSick": pal_entity.clear_worker_sick()
case "HasWorkerSick": pal_entity.heal_pal()
case "IsFaintedPal": pal_entity.heal_pal()
case "pop_PassiveSkillList": pal_entity.pop_PassiveSkillList(item=value)
case "pop_MasteredWaza": pal_entity.pop_MasteredWaza(item=value)
Expand All @@ -44,6 +44,8 @@ def patch_paldata():
player = SaveManager().get_player(PlayerUId)
if not SaveManager().move_pal(pal_entity.InstanceId, [player.OtomoCharacterContainerId, player.PalStorageContainerId]):
return reply(1, None, f"No enough slot in pal container.")
case "heal_all_pals":
SaveManager().heal_all_pals()
case _:
if isinstance(err:=setattr(pal_entity, key, value), TypeError):
return reply(1, None, f"Error in patch_paldata {err}")
Expand Down
Loading

0 comments on commit 5579260

Please sign in to comment.