Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70fadcc297 |
3628 changed files with 468 additions and 150162 deletions
|
|
@ -1,47 +0,0 @@
|
|||
name: ATM RIA Copy and Sigma Goats
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['fix/atm-ria-copy-*']
|
||||
jobs:
|
||||
atm-ria-copy:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test ATM controls and preserve Sigma ecology
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gradle --no-daemon -p DuneMenus test jar
|
||||
gradle --no-daemon -p DuneTerrain test jar
|
||||
mkdir atm-ria-copy
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from plugin_ria_copy import ATM, COPY
|
||||
from plugin_wild_update import read_archive, write_archive
|
||||
compiled=read_archive(Path('DuneMenus/build/libs/DuneMenus.jar').read_bytes())
|
||||
Path('atm-ria-copy/donor.zip').write_bytes(write_archive({p:compiled[p] for p in (ATM,COPY)}))
|
||||
PY
|
||||
cp tools/{plugin_ria_copy.py,plugin_wild_update.py,plugin_sigma_goats.py,SigmaGoatMerge.java} atm-ria-copy/
|
||||
printf '%s\n' "$GITHUB_SHA" > atm-ria-copy/SOURCE_COMMIT
|
||||
(cd atm-ria-copy && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-ATM-RIA-Copy-Sigma-Goats
|
||||
path: atm-ria-copy
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
name: Compact Dune Menu Overlay
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['fix/compact-menu-links-*']
|
||||
|
||||
jobs:
|
||||
compact-menu-links:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test menu routes and package only scoped UI classes
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for module in DuneRealmsGUI DuneMenus DuneLobby; do
|
||||
gradle --no-daemon -p "$module" test jar
|
||||
done
|
||||
mkdir compact-menu-links
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from plugin_menu_polish import CLASSES
|
||||
from plugin_wild_update import read_archive, write_archive
|
||||
for module, jar in {"gui":"DuneRealmsGUI/build/libs/DunerealmsGUI.jar", "menus":"DuneMenus/build/libs/DuneMenus.jar", "lobby":"DuneLobby/build/libs/DuneRealms-Lobby.jar"}.items():
|
||||
source = read_archive(Path(jar).read_bytes())
|
||||
entries = list(CLASSES[module])
|
||||
if module in ("gui", "menus"): entries.append("com/dunerealms/" + module + "/MenuPolish.class")
|
||||
Path("compact-menu-links/" + module + ".zip").write_bytes(write_archive({e:source[e] for e in entries}))
|
||||
PY
|
||||
cp tools/{plugin_menu_polish.py,plugin_wild_update.py,CompactMenuMerge.java} compact-menu-links/
|
||||
printf '%s\n' "$GITHUB_SHA" > compact-menu-links/SOURCE_COMMIT
|
||||
(cd compact-menu-links && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Compact-Menu-Links
|
||||
path: compact-menu-links
|
||||
if-no-files-found: error
|
||||
|
|
@ -2,7 +2,7 @@ name: DuneStaff Build
|
|||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['feat/staff-tools-*', 'feat/tweaks-ladders-staff-*']
|
||||
branches: ['feat/staff-tools-*']
|
||||
|
||||
jobs:
|
||||
dune-staff:
|
||||
|
|
@ -24,7 +24,7 @@ jobs:
|
|||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Build staff plugin and run its tests
|
||||
- name: Build standalone staff plugin
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
name: Elytra Anvil Overlay
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['feat/anvil-elytra-merge-*']
|
||||
|
||||
jobs:
|
||||
elytra-anvil:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test JARVIS and build the anvil overlay
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gradle --no-daemon -p JarvisConnector test jar
|
||||
mkdir elytra-anvil
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from plugin_elytra_anvil import ADDED, CHANGED, entry
|
||||
from plugin_wild_update import read_archive, write_archive
|
||||
source = read_archive(Path("JarvisConnector/build/libs/jarvistranslator.jar").read_bytes())
|
||||
Path("elytra-anvil/donor.zip").write_bytes(write_archive({entry(name): source[entry(name)] for name in (*CHANGED, *ADDED)}))
|
||||
PY
|
||||
cp tools/{ElytraAnvilOverlay.java,plugin_elytra_anvil.py,plugin_wild_update.py} elytra-anvil/
|
||||
printf '%s\n' "$GITHUB_SHA" > elytra-anvil/SOURCE_COMMIT
|
||||
(cd elytra-anvil && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Elytra-Anvil
|
||||
path: elytra-anvil
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
name: Graded Tool Art Build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['fix/graded-tool-halo-*']
|
||||
|
||||
jobs:
|
||||
graded-tool-art:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- name: Assemble both deployed pack variants
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir graded-tool-art
|
||||
base=$(PYTHONPATH=tools python3 -c 'from plugin_graded_tool_art import BASE_SOURCE; print(BASE_SOURCE)')
|
||||
for variant in arrakis fleet; do
|
||||
curl --fail --location --retry 2 "https://www.dunerealms.com/downloads/DuneRealms-Wild-$base-$variant.zip" -o "$variant.zip"
|
||||
python3 tools/plugin_graded_tool_art.py "$variant" "$variant.zip" network/resource-pack/central/overlay network/resource-pack/dune-items/publication-pins.json "graded-tool-art/DuneRealms-Wild-$GITHUB_SHA-$variant.zip" > "graded-tool-art/$variant.json"
|
||||
done
|
||||
printf '%s\n' "$GITHUB_SHA" > graded-tool-art/SOURCE_COMMIT
|
||||
cp tools/{plugin_graded_tool_art,plugin_supplied_item_art,plugin_wild_update}.py graded-tool-art/
|
||||
(cd graded-tool-art && sha256sum -- * > SHA256SUMS)
|
||||
- name: Upload both checked packs
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Graded-Tool-Art
|
||||
path: graded-tool-art
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
name: Guild and Cookbook Overlay
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['fix/guild-navigator-*']
|
||||
|
||||
jobs:
|
||||
guild-cookbook:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test and package exact overlay donors
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for module in DuneRealmsGUI DuneNPC DuneLobby; do
|
||||
gradle --no-daemon -p "$module" test jar
|
||||
done
|
||||
mkdir guild-cookbook
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from plugin_guild_cookbook import CLASSES
|
||||
from plugin_wild_update import read_archive, write_archive
|
||||
for module, jar in (
|
||||
("gui", "DuneRealmsGUI/build/libs/DunerealmsGUI.jar"),
|
||||
("npc", "DuneNPC/build/libs/DuneRealms-NPC.jar"),
|
||||
("lobby", "DuneLobby/build/libs/DuneRealms-Lobby.jar"),
|
||||
):
|
||||
entries = read_archive(Path(jar).read_bytes())
|
||||
Path(f"guild-cookbook/{module}.zip").write_bytes(write_archive({entry: entries[entry] for entry in CLASSES[module]}))
|
||||
PY
|
||||
cp tools/{GuildCookbookMerge.java,plugin_guild_cookbook.py,plugin_wild_update.py} guild-cookbook/
|
||||
printf '%s\n' "$GITHUB_SHA" > guild-cookbook/SOURCE_COMMIT
|
||||
(cd guild-cookbook && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Guild-Cookbook
|
||||
path: guild-cookbook
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
name: Home Dimension Return Overlay
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['fix/home-dimension-return-*']
|
||||
|
||||
jobs:
|
||||
home-dimension:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test DuneEss and extract the dimension route class
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gradle --no-daemon -p DuneEss test jar
|
||||
mkdir home-dimension
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from plugin_home_dimension import ROUTES
|
||||
from plugin_wild_update import read_archive, write_archive
|
||||
source = read_archive(Path("DuneEss/build/libs/DuneRealms-Essentials.jar").read_bytes())
|
||||
Path("home-dimension/donor.zip").write_bytes(write_archive({ROUTES: source[ROUTES]}))
|
||||
PY
|
||||
cp tools/{HomeDimensionOverlay.java,plugin_home_dimension.py,plugin_wild_update.py} home-dimension/
|
||||
printf '%s\n' "$GITHUB_SHA" > home-dimension/SOURCE_COMMIT
|
||||
(cd home-dimension && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Home-Dimension-Return
|
||||
path: home-dimension
|
||||
if-no-files-found: error
|
||||
41
.forgejo/workflows/housekeeping.yml
Normal file
41
.forgejo/workflows/housekeeping.yml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
name: Server Housekeeping Build
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['feat/hourly-floor-cleanup-*']
|
||||
|
||||
jobs:
|
||||
housekeeping:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test server housekeeping and package the standalone plugin
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gradle --no-daemon -p DuneCleanup test jar
|
||||
python3 tools/test_plugin_paper_antixray.py -v
|
||||
mkdir housekeeping-artifacts
|
||||
cp DuneCleanup/build/libs/DuneCleanup.jar tools/plugin_paper_antixray.py housekeeping-artifacts/
|
||||
printf '%s\n' "$(git rev-parse HEAD)" > housekeeping-artifacts/SOURCE_COMMIT
|
||||
(cd housekeeping-artifacts && sha256sum -- *.jar *.py SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Server-Housekeeping
|
||||
path: housekeeping-artifacts/
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
name: Profile-safe Lobby Builder
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['fix/compact-menu-links-*']
|
||||
jobs:
|
||||
builder-safety:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test inventory isolation and package the scoped classes
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gradle --no-daemon -p DuneRealms-minecraft-only test jar
|
||||
gradle --no-daemon -p DuneStaff test jar
|
||||
mkdir lobby-builder-safety
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from plugin_builder_multiverse import CORE, BUILDER, CORE_CLASSES, LEASE, BUILDER_CLASSES
|
||||
from plugin_wild_update import read_archive, write_archive
|
||||
for name, jar, entries in [
|
||||
("core", "DuneRealms-minecraft-only/build/libs/DuneRealms-Core.jar", [CORE+n for n in CORE_CLASSES+[LEASE]]),
|
||||
("builder", "DuneStaff/build/libs/DuneStaff.jar", [BUILDER+n for n in BUILDER_CLASSES])
|
||||
]:
|
||||
compiled=read_archive(Path(jar).read_bytes())
|
||||
Path("lobby-builder-safety/"+name+".zip").write_bytes(write_archive({n:compiled[n] for n in entries}))
|
||||
PY
|
||||
cp tools/{plugin_builder_multiverse.py,plugin_wild_update.py,BuilderProfileCoreOverlay.java} lobby-builder-safety/
|
||||
printf '%s\n' "$GITHUB_SHA" > lobby-builder-safety/SOURCE_COMMIT
|
||||
(cd lobby-builder-safety && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Lobby-Builder-Safety
|
||||
path: lobby-builder-safety
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
name: Lobby Pack Session Overlay
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['feat/lobby-pack-session-*']
|
||||
|
||||
jobs:
|
||||
lobby-pack-session:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test proof handling and package the scoped proxy and GUI artifacts
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gradle --no-daemon -p DuneRealmsGUI test jar
|
||||
gradle --no-daemon -p DunePackProxy jar
|
||||
mkdir lobby-pack-session
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from plugin_network_pack_menu import NEW, PATCHED
|
||||
from plugin_wild_update import read_archive, write_archive
|
||||
installed = read_archive(Path("DuneRealmsGUI/build/libs/DunerealmsGUI.jar").read_bytes())
|
||||
Path("lobby-pack-session/gui-donor.zip").write_bytes(write_archive({entry: installed[entry] for entry in PATCHED + NEW}))
|
||||
PY
|
||||
cp DunePackProxy/build/libs/DunePackProxy.jar lobby-pack-session/
|
||||
cp tools/{NetworkPackMenuMerge.java,plugin_network_pack_menu.py,plugin_wild_update.py,build_network_pack.py} lobby-pack-session/
|
||||
printf '%s\n' "$GITHUB_SHA" > lobby-pack-session/SOURCE_COMMIT
|
||||
(cd lobby-pack-session && sha256sum -- *.zip *.jar *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Lobby-Pack-Session
|
||||
path: lobby-pack-session
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
name: Reviewed Lobby Multiverse Core
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['fix/compact-menu-links-*']
|
||||
jobs:
|
||||
multiverse-core:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- name: Verify the official Core input and package Lobby configuration
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python3 tools/test_multiverse_core.py -v
|
||||
python3 tools/stage_multiverse_core.py multiverse-core-lobby "$GITHUB_SHA"
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Multiverse-Core-Lobby
|
||||
path: multiverse-core-lobby
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
name: Native Workstation Origin Overlay
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['fix/native-workstation-outputs-*']
|
||||
|
||||
jobs:
|
||||
native-workstation:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test JARVIS and build the producer overlay
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gradle --no-daemon -p JarvisConnector test jar
|
||||
mkdir native-workstation
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from plugin_native_workstation import ENTRY, NEW
|
||||
from plugin_wild_update import read_archive, write_archive
|
||||
source = read_archive(Path("JarvisConnector/build/libs/jarvistranslator.jar").read_bytes())
|
||||
Path("native-workstation/donor.zip").write_bytes(write_archive({entry: source[entry] for entry in [ENTRY, *NEW]}))
|
||||
PY
|
||||
cp tools/{NativeWorkstationMerge.java,plugin_native_workstation.py,plugin_wild_update.py} native-workstation/
|
||||
printf '%s\n' "$GITHUB_SHA" > native-workstation/SOURCE_COMMIT
|
||||
(cd native-workstation && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Native-Workstation-Origin
|
||||
path: native-workstation
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
name: Quest Arc Presentation Overlay
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['feat/quest-story-arcs-*']
|
||||
|
||||
jobs:
|
||||
quest-story-arcs:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test the journal and package only quest arc classes and art
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gradle --no-daemon -p DuneRealmsGUI test jar
|
||||
mkdir quest-story-arcs
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from quest_arc_artwork import CATALOG, OVERLAY, artwork, gui_entries
|
||||
from plugin_wild_update import read_archive, write_archive
|
||||
source = read_archive(Path("DuneRealmsGUI/build/libs/DunerealmsGUI.jar").read_bytes())
|
||||
Path("quest-story-arcs/donor.zip").write_bytes(write_archive({entry: source[entry] for entry in gui_entries()}))
|
||||
assets = artwork(Path("."))
|
||||
art = {f"{OVERLAY}/{name}": data for name, data in assets.items()}
|
||||
art[CATALOG] = Path(CATALOG).read_bytes()
|
||||
Path("quest-story-arcs/artwork.zip").write_bytes(write_archive(art))
|
||||
PY
|
||||
cp tools/{quest_arc_artwork.py,plugin_wild_update.py} quest-story-arcs/
|
||||
printf '%s\n' "$GITHUB_SHA" > quest-story-arcs/SOURCE_COMMIT
|
||||
(cd quest-story-arcs && sha256sum -- *.zip *.py SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Quest-Story-Arcs
|
||||
path: quest-story-arcs
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
name: Sigma Cold Pigs Overlay
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['fix/sigma-cold-pigs-*']
|
||||
|
||||
jobs:
|
||||
sigma-cold-pigs:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test Terrain and package the reviewed donor class
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gradle --no-daemon -p DuneTerrain test jar
|
||||
mkdir sigma-cold-pigs
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from plugin_sigma_cold_pigs import ENTRY
|
||||
from plugin_wild_update import read_archive, write_archive
|
||||
jars = list(Path("DuneTerrain/build/libs").glob("*.jar"))
|
||||
assert len(jars) == 1
|
||||
entries = read_archive(jars[0].read_bytes())
|
||||
Path("sigma-cold-pigs/donor.zip").write_bytes(write_archive({ENTRY: entries[ENTRY]}))
|
||||
PY
|
||||
cp tools/{SigmaColdPigMerge.java,plugin_sigma_cold_pigs.py,plugin_wild_update.py} sigma-cold-pigs/
|
||||
printf '%s\n' "$GITHUB_SHA" > sigma-cold-pigs/SOURCE_COMMIT
|
||||
(cd sigma-cold-pigs && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Sigma-Cold-Pigs
|
||||
path: sigma-cold-pigs
|
||||
if-no-files-found: error
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
name: Station Origins and Iron Doors Overlay
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['fix/station-origins-*']
|
||||
|
||||
jobs:
|
||||
station-and-doors:
|
||||
runs-on: dune-ci
|
||||
steps:
|
||||
- name: Check out exact revision
|
||||
shell: bash
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git init .
|
||||
git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/plugins.git "$GITHUB_SHA"
|
||||
git checkout --detach FETCH_HEAD
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: '9.2.1'
|
||||
- name: Test both plugins and extract exact overlay donors
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
gradle --no-daemon -p JarvisConnector test jar
|
||||
gradle --no-daemon -p DuneEss test jar
|
||||
mkdir station-and-doors
|
||||
PYTHONPATH=tools python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
from plugin_station_and_doors import donor_archive
|
||||
output = Path("station-and-doors")
|
||||
for role, jar in (
|
||||
("station", "JarvisConnector/build/libs/jarvistranslator.jar"),
|
||||
("ess", "DuneEss/build/libs/DuneRealms-Essentials.jar"),
|
||||
):
|
||||
(output / (role + "-donor.zip")).write_bytes(donor_archive(role, Path(jar)))
|
||||
PY
|
||||
cp tools/{StationAndDoorOverlay.java,plugin_station_and_doors.py,plugin_wild_update.py} station-and-doors/
|
||||
printf '%s\n' "$GITHUB_SHA" > station-and-doors/SOURCE_COMMIT
|
||||
(cd station-and-doors && sha256sum -- *.zip *.py *.java SOURCE_COMMIT > SHA256SUMS)
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: DuneRealms-Station-Origins-Iron-Doors
|
||||
path: station-and-doors
|
||||
if-no-files-found: error
|
||||
20
DuneCleanup/build.gradle.kts
Normal file
20
DuneCleanup/build.gradle.kts
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
plugins { java }
|
||||
|
||||
group = "com.dunerealms"
|
||||
version = "1.0.0"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven("https://repo.papermc.io/repository/maven-public/")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly("io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT")
|
||||
testImplementation("io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter:5.11.4")
|
||||
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
|
||||
}
|
||||
|
||||
java { toolchain.languageVersion.set(JavaLanguageVersion.of(21)) }
|
||||
tasks.test { useJUnitPlatform() }
|
||||
tasks.jar { archiveFileName.set("DuneCleanup.jar") }
|
||||
1
DuneCleanup/settings.gradle.kts
Normal file
1
DuneCleanup/settings.gradle.kts
Normal file
|
|
@ -0,0 +1 @@
|
|||
rootProject.name = "DuneCleanup"
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
package com.dunerealms.cleanup;
|
||||
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.Arrays;
|
||||
import java.util.Deque;
|
||||
import java.util.Set;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Chunk;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.entity.Item;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.event.Listener;
|
||||
import org.bukkit.event.block.BlockDropItemEvent;
|
||||
import org.bukkit.event.entity.ItemMergeEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.persistence.PersistentDataType;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
|
||||
public final class DuneCleanup extends JavaPlugin implements Listener {
|
||||
static final long HOUR = 72_000L;
|
||||
static final long MINIMUM_AGE_MS = 120_000L;
|
||||
private static final int CHUNKS_PER_TICK = 12;
|
||||
private static final int ITEMS_PER_TICK = 96;
|
||||
private static final double PLAYER_DISTANCE_SQUARED = 16.0 * 16;
|
||||
private static final Set<Material> DEBRIS = Set.of(Material.COBBLESTONE, Material.COBBLED_DEEPSLATE,
|
||||
Material.DIRT, Material.COARSE_DIRT, Material.GRAVEL, Material.NETHERRACK);
|
||||
private static final Set<String> ORDINARY_METADATA = Set.of("dunerealms:origin_world", "dunerealms:quality",
|
||||
"dunerealms:equipment_mark", "dunerealms:metadata_policy", "dunerealms:item_class", "dunerealms:metadata_lore_header");
|
||||
private NamespacedKey looseSince;
|
||||
private boolean sweeping;
|
||||
|
||||
@Override public void onEnable() {
|
||||
looseSince = new NamespacedKey(this, "loose_since");
|
||||
getServer().getPluginManager().registerEvents(this, this);
|
||||
getServer().getScheduler().runTaskTimer(this, this::startSweep, HOUR, HOUR);
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void droppedBlock(BlockDropItemEvent event) {
|
||||
if (event.getBlockState() instanceof org.bukkit.block.Container) return;
|
||||
long now = System.currentTimeMillis();
|
||||
for (Item item : event.getItems()) {
|
||||
if (ordinaryDebris(item.getItemStack()))
|
||||
item.getPersistentDataContainer().set(looseSince, PersistentDataType.LONG, now);
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
|
||||
public void merged(ItemMergeEvent event) {
|
||||
var source = event.getEntity().getPersistentDataContainer();
|
||||
var target = event.getTarget().getPersistentDataContainer();
|
||||
Long since = mergedSince(source.get(looseSince, PersistentDataType.LONG),
|
||||
target.get(looseSince, PersistentDataType.LONG));
|
||||
if (since == null) {
|
||||
source.remove(looseSince);
|
||||
target.remove(looseSince);
|
||||
} else {
|
||||
target.set(looseSince, PersistentDataType.LONG, since);
|
||||
}
|
||||
}
|
||||
|
||||
static Long mergedSince(Long source, Long target) {
|
||||
return source == null || target == null ? null : Math.max(source, target);
|
||||
}
|
||||
|
||||
static boolean oldEnough(Long since, long now) {
|
||||
return since != null && since > 0 && now >= since && now - since >= MINIMUM_AGE_MS;
|
||||
}
|
||||
|
||||
static boolean debrisMaterial(Material material) { return DEBRIS.contains(material); }
|
||||
|
||||
private static boolean ordinaryDebris(ItemStack stack) {
|
||||
if (!debrisMaterial(stack.getType())) return false;
|
||||
if (!stack.hasItemMeta()) return true;
|
||||
var meta = stack.getItemMeta();
|
||||
return meta != null && !meta.hasDisplayName() && !meta.hasItemModel() && !meta.hasCustomModelData()
|
||||
&& !meta.hasEnchants() && meta.getPersistentDataContainer().getKeys().stream()
|
||||
.map(NamespacedKey::toString).allMatch(ORDINARY_METADATA::contains);
|
||||
}
|
||||
|
||||
private boolean eligible(Item item, long now) {
|
||||
if (!item.isValid() || !item.isOnGround() || item.getOwner() != null || item.getThrower() != null
|
||||
|| !item.willAge() || !item.canPlayerPickup() || item.getPickupDelay() > 0
|
||||
|| !oldEnough(item.getPersistentDataContainer().get(looseSince, PersistentDataType.LONG), now)
|
||||
|| !ordinaryDebris(item.getItemStack())) return false;
|
||||
var location = item.getLocation();
|
||||
for (var player : item.getWorld().getPlayers()) {
|
||||
if (player.getLocation().distanceSquared(location) <= PLAYER_DISTANCE_SQUARED) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void startSweep() {
|
||||
if (sweeping) return;
|
||||
sweeping = true;
|
||||
Deque<Chunk> chunks = new ArrayDeque<>();
|
||||
for (var world : Bukkit.getWorlds()) chunks.addAll(Arrays.asList(world.getLoadedChunks()));
|
||||
new BukkitRunnable() {
|
||||
final Deque<Item> items = new ArrayDeque<>();
|
||||
int removed;
|
||||
@Override public void run() {
|
||||
long now = System.currentTimeMillis();
|
||||
int chunksChecked = 0;
|
||||
for (int checked = 0; checked < ITEMS_PER_TICK;) {
|
||||
if (items.isEmpty()) {
|
||||
if (chunks.isEmpty() || chunksChecked == CHUNKS_PER_TICK) break;
|
||||
Chunk chunk = chunks.removeFirst();
|
||||
chunksChecked++;
|
||||
if (!chunk.isLoaded() || !chunk.isEntitiesLoaded()) continue;
|
||||
for (var entity : chunk.getEntities())
|
||||
if (entity instanceof Item item) items.addLast(item);
|
||||
continue;
|
||||
}
|
||||
Item item = items.removeFirst();
|
||||
checked++;
|
||||
if (eligible(item, now)) {
|
||||
item.remove();
|
||||
removed++;
|
||||
}
|
||||
}
|
||||
if (chunks.isEmpty() && items.isEmpty()) {
|
||||
sweeping = false;
|
||||
if (removed > 0) getLogger().info("Cleared " + removed + " old loose debris stacks.");
|
||||
cancel();
|
||||
}
|
||||
}
|
||||
}.runTaskTimer(this, 1L, 1L);
|
||||
}
|
||||
}
|
||||
4
DuneCleanup/src/main/resources/plugin.yml
Normal file
4
DuneCleanup/src/main/resources/plugin.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
name: DuneCleanup
|
||||
main: com.dunerealms.cleanup.DuneCleanup
|
||||
version: 1.0.0
|
||||
api-version: '1.21.8'
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.dunerealms.cleanup;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
final class DuneCleanupTest {
|
||||
@Test void onlyOldTrackedDropsAgeIntoEligibility() {
|
||||
assertEquals(72_000L, DuneCleanup.HOUR);
|
||||
assertFalse(DuneCleanup.oldEnough(null, 500_000L));
|
||||
assertFalse(DuneCleanup.oldEnough(380_001L, 500_000L));
|
||||
assertFalse(DuneCleanup.oldEnough(501_000L, 500_000L));
|
||||
assertTrue(DuneCleanup.oldEnough(380_000L, 500_000L));
|
||||
}
|
||||
|
||||
@Test void mergingUntrackedLootProtectsTheStackAndNewerDebrisRestartsItsAge() {
|
||||
assertNull(DuneCleanup.mergedSince(100L, null));
|
||||
assertNull(DuneCleanup.mergedSince(null, 100L));
|
||||
assertEquals(400L, DuneCleanup.mergedSince(100L, 400L));
|
||||
}
|
||||
|
||||
@Test void oresAndEquipmentAreNeverDebris() {
|
||||
assertTrue(DuneCleanup.debrisMaterial(Material.COBBLESTONE));
|
||||
assertFalse(DuneCleanup.debrisMaterial(Material.ORANGE_DYE));
|
||||
assertFalse(DuneCleanup.debrisMaterial(Material.RAW_IRON));
|
||||
assertFalse(DuneCleanup.debrisMaterial(Material.DIAMOND_PICKAXE));
|
||||
assertFalse(DuneCleanup.debrisMaterial(Material.CHEST_MINECART));
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue

Staff