-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/master' into v7
# Conflicts: # .github/workflows/locale.yml # contractdata/HAWKESBAY/ESCALATION/YULANIA/YULANIA2.json # contractdata/HAWKESBAY/ESCALATION/YULANIA/YULANIA3.json # contractdata/MIAMI/_H2_MIAMI_CHALLENGES.json # package.json # resources/dynamic_resources_h2.rpkg # resources/dynamic_resources_h3.rpkg # resources/locale.json
- Loading branch information
Showing
68 changed files
with
6,436 additions
and
889 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ webui/dist | |
*.plugin.js | ||
*Plugin.js | ||
packaging/livesplit-node-client/build | ||
tests/data/scripts | ||
tests/testData/scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Thanks for contributing to Peacock! Here's a bit of a template to help make sure everything relevant is covered. --> | ||
|
||
## Scope | ||
|
||
<!-- List any relevant changes you have made here. Be sure to link any issues fixed, or that are relevant to these changes. --> | ||
|
||
## Test Plan | ||
|
||
<!-- List how you have verified these changes work as intended. --> | ||
|
||
## Checklist | ||
|
||
<!-- | ||
Just a few reminders to make sure everything is perfect. You can place an "X" in the boxes to tick them off. | ||
If you have not completed one of the steps below, you can create the pull request as a draft, and then check off the items as you go. | ||
When you have completed the checklist, press the "Ready for review" button. | ||
--> | ||
|
||
- [ ] I have run Prettier to reformat any changed files | ||
- [ ] I have verified my changes work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Update Localisation Mod | ||
|
||
on: | ||
push: | ||
tags: ["v*"] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
update-mod: | ||
name: Update Mod | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout Peacock | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.PEACOCKBOT_TOKEN }} | ||
path: "./Peacock" | ||
|
||
- name: Checkout Peacock Strings | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.PEACOCKBOT_TOKEN }} | ||
repository: thepeacockproject/peacock-strings | ||
path: "./PeacockStrings" | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "./Peacock/.nvmrc" | ||
cache: "yarn" | ||
cache-dependency-path: "./Peacock/yarn.lock" | ||
|
||
- name: Install Packages | ||
run: | | ||
cd Peacock | ||
yarn install --immutable | ||
#- name: Download ResourceLib | ||
# uses: robinraju/release-downloader@v1.7 | ||
# with: | ||
# repository: "OrfeasZ/ZHMTools" | ||
# latest: true | ||
# fileName: "ResourceLib-win-x64.zip" | ||
# out-file-path: "Peacock/resources" | ||
|
||
- name: Download RPKG-CLI | ||
id: rpkgcli | ||
uses: robinraju/release-downloader@v1.10 | ||
with: | ||
repository: "glacier-modding/RPKG-Tool" | ||
latest: true | ||
fileName: "rpkg_*-cli.zip" | ||
out-file-path: "Peacock/resources" | ||
|
||
- name: Download HMLanguageTools | ||
id: hmlt | ||
uses: robinraju/release-downloader@v1.10 | ||
with: | ||
repository: "AnthonyFuller/TonyTools" | ||
latest: true | ||
fileName: "TonyTools.zip" | ||
out-file-path: "Peacock/resources" | ||
|
||
- name: Unzip dependencies | ||
run: | | ||
cd Peacock/resources | ||
7z x ${{ fromJson(steps.rpkgcli.outputs.downloaded_files)[0] }} | ||
7z x ${{ fromJson(steps.hmlt.outputs.downloaded_files)[0] }} | ||
- name: Rebuild Locale Packages | ||
run: | | ||
cd Peacock | ||
yarn rebuild-locale | ||
- name: Copy peacockstrings.locr.json | ||
run: | | ||
copy ./Peacock/resources/peacockstrings.locr.json ./PeacockStrings/content/chunk0/peacockstrings.locr.json | ||
- name: Push updated Peacock LOCR | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
cwd: "./PeacockStrings" | ||
add: content/chunk0/peacockstrings.locr.json | ||
author_name: PeacockBot | ||
author_email: admin@thepeacockproject.org | ||
message: "enhancement: update strings" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v20.12.1 | ||
v20.12.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/* | ||
* The Peacock Project - a HITMAN server replacement. | ||
* Copyright (C) 2021-2024 The Peacock Project Team | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
// load as soon as possible to prevent dependency issues | ||
import "./generatedPeacockRequireTable" | ||
|
||
// load flags as soon as possible | ||
import { getFlag, loadFlags } from "./flags" | ||
|
||
loadFlags() | ||
|
||
import { program } from "commander" | ||
import { toolsMenu } from "./tools" | ||
import { readFileSync, writeFileSync } from "fs" | ||
import { pack, unpack } from "msgpackr" | ||
import { log, LogLevel } from "./loggingInterop" | ||
import { startServer } from "./index" | ||
|
||
program.description( | ||
"The Peacock Project is a HITMAN™ World of Assassination Trilogy server replacement.", | ||
) | ||
|
||
program.option( | ||
"--hmr", | ||
"enable experimental hot reloading of contracts", | ||
getFlag("experimentalHMR") as boolean, | ||
) | ||
program.option( | ||
"--plugin-dev-host", | ||
"activate plugin development features - requires plugin dev workspace setup", | ||
getFlag("developmentPluginDevHost") as boolean, | ||
) | ||
program.action(startServer) | ||
|
||
program.command("tools").description("open the tools UI").action(toolsMenu) | ||
|
||
// noinspection RequiredAttributes | ||
program | ||
.command("pack") | ||
.argument("<input>", "input file to pack") | ||
.option("-o, --output <path>", "where to output the packed file to", "") | ||
.description("packs an input file into a Challenge Resource Package") | ||
.action((input, options: { output: string }) => { | ||
const outputPath = | ||
options.output || input.replace(/\.[^/\\.]+$/, ".crp") | ||
|
||
writeFileSync( | ||
outputPath, | ||
pack(JSON.parse(readFileSync(input).toString())), | ||
) | ||
|
||
log(LogLevel.INFO, `Packed "${input}" to "${outputPath}" successfully.`) | ||
}) | ||
|
||
// noinspection RequiredAttributes | ||
program | ||
.command("unpack") | ||
.argument("<input>", "input file to unpack") | ||
.option("-o, --output <path>", "where to output the unpacked file to", "") | ||
.description("unpacks a Challenge Resource Package") | ||
.action((input, options: { output: string }) => { | ||
const outputPath = | ||
options.output || input.replace(/\.[^/\\.]+$/, ".json") | ||
|
||
writeFileSync(outputPath, JSON.stringify(unpack(readFileSync(input)))) | ||
|
||
log( | ||
LogLevel.INFO, | ||
`Unpacked "${input}" to "${outputPath}" successfully.`, | ||
) | ||
}) | ||
|
||
program.parse(process.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.