diff --git a/.forgejo/workflows/plugins.yml b/.forgejo/workflows/plugins.yml index ab29dfed..081af4a4 100644 --- a/.forgejo/workflows/plugins.yml +++ b/.forgejo/workflows/plugins.yml @@ -10,11 +10,8 @@ on: - 'gui-common/**' - 'citizens-common/**' - 'network/resource-pack/shared/**' - - 'network/resource-pack/mcgui/**' - 'network/content-assets/planet-artwork/profiles.json' - 'tools/*gameplay*' - - 'tools/*plugin*' - - 'tools/*menu*' jobs: plugins: @@ -53,18 +50,14 @@ jobs: done printf '%s\n' "$(git rev-parse HEAD)" > plugin-artifacts/SOURCE_COMMIT (cd plugin-artifacts && sha256sum -- *.jar SOURCE_COMMIT > SHA256SUMS) - - name: Validate rollout contract and build stacked menu overlay + - name: Validate gameplay assets and build pack with original GUI shell: bash run: | set -euo pipefail - python3 tools/test_plugin_fleet_install.py -v - python3 tools/test_plugin_menu_pack.py -v python3 tools/test_gameplay_resourcepack.py -v - python3 tools/build-menu-resourcepack.py --source "$GITHUB_SHA" --output "plugin-artifacts/DuneRealms-Menu-${GITHUB_SHA}.zip" + python3 tools/build-gameplay-resourcepack.py --from-gui-config DuneRealmsGUI/src/main/resources/gui-pack.yml --output "plugin-artifacts/DuneRealms-Gameplay-${GITHUB_SHA}.zip" python3 tools/write-plugin-manifest.py plugin-artifacts "$GITHUB_SHA" - cp tools/install-plugin-fleet.py tools/plugin_menu_pack.py tools/publish-plugin-menu.py plugin-artifacts/ - cp DuneMenus/docs/FLEET-INSTALL.md DuneMenus/docs/MENU-PACK-ROLLOUT.md plugin-artifacts/ - (cd plugin-artifacts && sha256sum -- *.jar *.zip *.json *.py *.md SOURCE_COMMIT > SHA256SUMS) + (cd plugin-artifacts && sha256sum -- *.jar *.zip *.json SOURCE_COMMIT > SHA256SUMS) - uses: actions/upload-artifact@v3 with: name: DuneRealms-Plugins diff --git a/DuneMenus/build.gradle.kts b/DuneMenus/build.gradle.kts index 95d4fa38..0cd116ce 100644 --- a/DuneMenus/build.gradle.kts +++ b/DuneMenus/build.gradle.kts @@ -1,4 +1,3 @@ -import java.security.MessageDigest plugins { java } group = "com.dunerealms" version = "2.0.1" @@ -22,30 +21,3 @@ tasks.jar { archiveFileName.set("DuneMenus.jar") } tasks.processResources { filesMatching("plugin.yml") { expand("version" to project.version) } } tasks.test { useJUnitPlatform() } - -// Optional, reproducible verification against the privately supplied, pinned MCGUI runtime. -// The third-party JAR is never bundled or committed. -val mcguiRuntime = providers.gradleProperty("mcguiRuntime") -val rendererRuntimeFiles = mcguiRuntime.map { files(it) }.getOrElse(files()) -val rendererTest by sourceSets.creating { - compileClasspath += sourceSets.main.get().output + rendererRuntimeFiles - runtimeClasspath += sourceSets.main.get().output + rendererRuntimeFiles -} -val verifyRendererRuntime by tasks.registering { - doLast { - require(mcguiRuntime.isPresent) { "Supply -PmcguiRuntime=" } - val jar = file(mcguiRuntime.get()) - require(jar.isFile) { "MCGUI runtime file not found" } - val hash = MessageDigest.getInstance("SHA-256").digest(jar.readBytes()).joinToString("") { "%02x".format(it) } - require(hash == "69a454291cc27c36cdbc680bfbde245a90a3913de53cc1591c502a5a49124300") { "MCGUI runtime differs from reviewed test input" } - logger.lifecycle("Renderer verification: MCGUI0.8.6 SHA-256 {}", hash) - } -} -tasks.named(rendererTest.compileJavaTaskName) { dependsOn(verifyRendererRuntime) } -tasks.register("verifyMenuRenderer") { - dependsOn(rendererTest.classesTaskName) - classpath = rendererTest.runtimeClasspath - mainClass.set("com.dunerealms.menus.RendererVerification") - jvmArgs("-Djava.awt.headless=true") - args(providers.gradleProperty("rendererOutput").getOrElse(layout.buildDirectory.dir("renderer-verification").get().asFile.absolutePath)) -} diff --git a/DuneMenus/docs/FLEET-INSTALL.md b/DuneMenus/docs/FLEET-INSTALL.md deleted file mode 100644 index 1c8b11b4..00000000 --- a/DuneMenus/docs/FLEET-INSTALL.md +++ /dev/null @@ -1,16 +0,0 @@ -# Verified plugin fleet installation - -Use only the installer and JARs emitted together by canonical plugin CI. This installer is for existing servers, not bootstrap provisioning. It never discovers or guesses server paths, assigns plugins to a server, removes unrelated backends, deploys website files, or downloads third-party dependencies. - -The coordinator supplies an independently verified inventory JSON. Each `servers` entry requires `id`, absolute `root`, existing `serviceUnit`, and an explicit list of artifact filenames from `release-manifest.json`. Do not populate these from historical example paths. DuneMenus requires JARVIS, DunerealmsGUI and the existing MCGUI runtime; DuneNPC is retained. - -First run a read-only plan with `--artifacts`, `--inventory`, and `--expected-source` set to the exact CI source SHA. Apply that same inventory with `--apply --backup-root` only through the authorised host deployment entry point. No SSH implementation is embedded in this tool. - -All artifacts, descriptors, installed-file snapshots and backups are verified. Services must be fully stopped before JAR replacement; active services restart afterward, previously stopped services remain stopped. Old filenames are replaced by actual plugin identity. On an installation/start failure, original bytes and filenames are restored after verifying the service is stopped, and a rollback receipt is retained. A rollback that cannot stop the service halts without replacing active JARs. A multi-server failure may leave earlier servers installed; inspect each receipt. - -An `installed-service-active` receipt proves file installation and systemd state only. It does not prove Minecraft finished loading or an NPC interaction worked. Verify server logs, enabled versions, resource-pack publication/configuration, actual GUI/NPC actions and retained progression separately before reporting rollout complete. Resource-pack publication uses the separate built publisher; required menu configuration is verified and managed by this installer as described in MENU-PACK-ROLLOUT.md. - - -A missing existing MCGUI runtime may be staged privately by the authorised coordinator. Inventory `privatePrerequisites.MCGUI` requires an absolute `path` and the reviewed SHA-256 `69a454291cc27c36cdbc680bfbde245a90a3913de53cc1591c502a5a49124300`; the server entry must explicitly list `prerequisites: ["MCGUI"]`. The installer verifies plugin name MCGUI, version0.8.6 and main ai.resourcepack.ui.MCGUIPlugin before including those privately staged bytes. They are never added to the public source/release artifact. Unknown private prerequisites or different bytes/identities fail planning. The private runtime's installation and rollback follow the same stopped-service, backup and checksum path as first-party JARs. - -For selected DuneMenus, inventory menuPack.url is mandatory and actual public bytes must match the built composite. Owned config bytes are hashed, backed up and restored with JAR rollback; existing unmanaged config fails closed. Per-world server.properties is never written. See MENU-PACK-ROLLOUT.md for the persistent publication and external runtime contract. diff --git a/DuneMenus/docs/INTEGRATION.md b/DuneMenus/docs/INTEGRATION.md index caf8237b..c42c6ef8 100644 --- a/DuneMenus/docs/INTEGRATION.md +++ b/DuneMenus/docs/INTEGRATION.md @@ -15,24 +15,8 @@ | Bank / ATM | BankMenu / AtmMenu / TransferMenu | Existing Rihla APIs, denominations, transfer and redemption references | | Administration, sellall, scoreboard | Existing handlers | Unchanged backend handlers | -The new Java renderer consumes the ZIP menu definitions and direct slot callbacks; it does not use old MenuDocument selected-card pages. Existing native service models are wrapped without replacing their callback implementations. Shared NativeMenus inventory entry points (including DuneNPC travel) also enter the replacement. Estate services retain the original claim/Home Block/deployment screens; website-only organisation functions link to their existing management pages. No new confirmation intermediary is added. +The new Java renderer consumes the ZIP menu definitions and direct slot callbacks; it does not use old MenuDocument selected-card pages. Existing native service models are wrapped without replacing their callback implementations. No new confirmation intermediary is added. -Local verification: 140 Java sources compile for release21 against cached Paper1.21.8 dependencies; 14 focused tests pass. Four resource-pack tests pass and validate item-card fonts/textures in the actual ZIP. Browser render fixtures are local design evidence only. Actual MCGUI0.8.6 rendering additionally passed15 menu families and152 direct action hitboxes, including long-page scrolling; runtime SHA-256 is pinned in the optional verifyMenuRenderer build task. Full exact-head CI and live NPC/function checks remain required before declaring deployment complete. +Local verification: 126 Java sources compile for release21 against cached Paper1.21.8 dependencies; 12 focused tests pass. Four resource-pack tests pass and validate item-card fonts/textures in the actual ZIP. Browser render fixtures are local design evidence only. Full CI, actual MCGUI renderer comparison and live NPC/function checks remain required before declaring deployment complete. Known visual work remains: the supplied preview's bespoke illustrations are reference artwork, while the dedicated canvas currently implements the gold/emerald frame, themed scenes, direct card grid, travel constellation and journal/council/bank layouts. Do not describe this as pixel-identical preview parity or a live install. - - -Reproduce actual renderer verification through the build (the JAR stays private): - -```sh -gradle -p DuneMenus verifyMenuRenderer -PmcguiRuntime=/verified/private/MCGUI-0.8.6.jar -``` - -The example path is a parameter, not a deployment location. This task checks the reviewed input hash and produces15 engine-rendered PNGs. Fixture entries are synthetic test data and never contact a game account or execute a purchase. - -Local Java21 Gradle verification completed successfully using cached dependencies (`--offline`) after the local JDK trust store rejected online Maven TLS. `test jar verifyMenuRenderer` built the frontend and JARVIS dependency, ran their tests and rendered all15 families/152 hitboxes. Canonical CI uses Gradle9.2.1 and is reported separately by exact commit. - -The build also ships the manifest-driven fleet installer and its tested rollback path. See FLEET-INSTALL.md. This is deployable tooling, not evidence that any host was changed. - - -The final pack acceptance supersedes intermediate gameplay ZIPs: use only the built DuneRealms-Menu-.zip composite and MENU-PACK-ROLLOUT.md. Legacy world/artwork auto-offers are removed; the actual engine's external-mode readiness assumption is supplemented by an exact-pack SUCCESSFULLY_LOADED guard. Existing active hosts have no GUI runtimes installed yet; incoming first-party services and a hash-pinned private MCGUI prerequisite restore them. Source/backend implementation preservation does not claim those services were already installed live. diff --git a/DuneMenus/docs/MENU-PACK-ROLLOUT.md b/DuneMenus/docs/MENU-PACK-ROLLOUT.md deleted file mode 100644 index bce7a9df..00000000 --- a/DuneMenus/docs/MENU-PACK-ROLLOUT.md +++ /dev/null @@ -1,23 +0,0 @@ -# Build-owned stacked menu delivery - -The existing MCGUI0.8.6 runtime calls Player.addResourcePack with UUID.nameUUIDFromBytes("uiengine:pack"). It stacks its pack rather than clearing the server world pack. In mode external with blank public-url, offers() is false and mergedElsewhere() is true. Its has(player) method can assume readiness in that mode; our sender therefore additionally requires an actual SUCCESSFULLY_LOADED event for the exact MCGUI pack ID before opening any new menu or enabling item-card assets. - -The canonical build preserves all116 entries from the pinned generated MCGUI client transport and adds exactly75 approved assets/dunerealms entries, including389 card mappings. It excludes every old baseline/world-artwork entry and all vanilla block/entity replacements. The client pack explicitly includes26.2 shaders/formats88–96. The private vendor plugin JAR is not in public source or CI artifacts. - -DunerealmsGUI no longer starts legacy PlanetTexturePacks/EcologyArtwork delivery and no longer offers NetworkArtwork-v6. It offers only the separately stacked built menu overlay. Server-owned per-world resource-pack settings and bytes remain untouched. The MCGUI runtime is configured external/blank URL with telemetry, update-check and web imports disabled; no vendor upload or built-in pack server is used. - -Publish through the CI-shipped publish-plugin-menu.py, first read-only, then --apply, supplying --artifacts, --expected-source, --store and --snippet. The verified web hosting contract is host91.107.196.242, store /var/lib/dunerealms-public-downloads, included snippet /etc/nginx/snippets/dunerealms-gui-download-v3.conf. The built publisher copies only DuneRealms-Menu-.zip, refuses conflicting immutable bytes, preserves all existing routes, backs up the snippet, appends one exact idempotent location, runs nginx -t before reload, and restores config on test/reload failure. The permanent URL is https://www.dunerealms.com/downloads/DuneRealms-Menu-.zip. Never use an expiring artifact link as client configuration. - -The built fleet installer requires inventory menuPack.url equal to that permanent URL. It verifies the actual public bytes against the CI menu ZIP/manifest before stopping anything. For selected DuneMenus targets it writes only owned MCGUI/config.yml and DunerealmsGUI/menu-pack.yml, records/writes their hashes, backs up existing owned config bytes, and restores them together with JARs on failure. Unexpected unmanaged config is refused. New data directories and JAR/config files inherit plugin-directory ownership so root-staged0600 runtime bytes can be read/run by the game service without changing the private source file. No server.properties write exists in either tool. - -## Verified staging fact — not installation - -The authorised coordinator staged the existing reviewed MCGUI runtime privately on both verified game hosts at /opt/dunerealms/rollouts/private/MCGUI-0.8.6-69a454291cc27c36cdbc680bfbde245a90a3913de53cc1591c502a5a49124300.jar, root-owned0600. SHA25669a454291cc27c36cdbc680bfbde245a90a3913de53cc1591c502a5a49124300 was rechecked after transfer. That was prerequisite staging only: no plugin installation, service restart or GUI delivery was performed at that point. No credential/key path is part of this handover. - -Current fleet Paper is26.2-135/API26.2.build.135, not the historical compile API1.21.8. Existing isolated logs establish MCGUI0.8.6 startup on matchingPaper. Actual new renderer checks cover15 menu families/152 action hitboxes; connected-client transport, NPC interactions and current world textures still require rollout checks. Citizens is absent and its compatible runtime remains pending official vendor access; do not claim Citizens conversion complete. - -Inventory extension: -```json -"menuPack": {"url": "https://www.dunerealms.com/downloads/DuneRealms-Menu-.zip"} -``` -Replace the placeholder with the actual built source. The coordinator retains exclusive host invocation; all persistent code/config publication goes through these committed build tools. diff --git a/DuneMenus/src/main/java/com/dunerealms/menus/ClanMenu.java b/DuneMenus/src/main/java/com/dunerealms/menus/ClanMenu.java index 4a6aaa7e..9d3fa748 100644 --- a/DuneMenus/src/main/java/com/dunerealms/menus/ClanMenu.java +++ b/DuneMenus/src/main/java/com/dunerealms/menus/ClanMenu.java @@ -22,7 +22,6 @@ final class ClanMenu extends Menu { backdrop(Material.BLACK_STAINED_GLASS_PANE); for (int s : new int[]{13, 21, 23, 31}) put(s, Ui.pane(Material.GREEN_STAINED_GLASS_PANE)); back(45); - put(43, Ui.item(Material.MAP, "Estate services", "Claims, Home Block and deployment controls"), t -> { end(); plugin.organisationServices(player,"clan",organisationId); }); put(22, Ui.item(Material.WHITE_BANNER, "Your clan", "Loading…")); load(backend().org(player, "clan", organisationId), o -> { shown = o; diff --git a/DuneMenus/src/main/java/com/dunerealms/menus/CompanyMenu.java b/DuneMenus/src/main/java/com/dunerealms/menus/CompanyMenu.java index 8cbe8eff..10ae176f 100644 --- a/DuneMenus/src/main/java/com/dunerealms/menus/CompanyMenu.java +++ b/DuneMenus/src/main/java/com/dunerealms/menus/CompanyMenu.java @@ -22,7 +22,6 @@ final class CompanyMenu extends Menu { backdrop(Material.BLACK_STAINED_GLASS_PANE); for (int r = 1; r <= 3; r++) for (int c = 1; c <= 8; c++) put(r * 9 + c, Ui.pane(Material.CYAN_STAINED_GLASS_PANE)); back(45); - put(43, Ui.item(Material.MAP, "Estate services", "Claims, Home Block and deployment controls"), t -> { end(); plugin.organisationServices(player,"company",organisationId); }); put(9, Ui.item(Material.GOLD_INGOT, "Finance")); put(18, Ui.item(Material.PLAYER_HEAD, "People")); put(27, Ui.item(Material.LIGHTNING_ROD, "Operations")); diff --git a/DuneMenus/src/main/java/com/dunerealms/menus/DuneMenusPlugin.java b/DuneMenus/src/main/java/com/dunerealms/menus/DuneMenusPlugin.java index 66dcb18e..f93bad3a 100644 --- a/DuneMenus/src/main/java/com/dunerealms/menus/DuneMenusPlugin.java +++ b/DuneMenus/src/main/java/com/dunerealms/menus/DuneMenusPlugin.java @@ -82,13 +82,6 @@ public final class DuneMenusPlugin extends JavaPlugin implements TabExecutor { new ServiceMenu(this, player, section, title, description, inventory, actions).open(); } - void organisationServices(Player player,String kind,String id) { - var services=getServer().getPluginManager().getPlugin("DunerealmsGUI"); - if(services==null||!services.isEnabled())return; - try {services.getClass().getMethod("openOrganisationServices",Player.class,String.class,String.class).invoke(services,player,kind,id);} - catch(ReflectiveOperationException failure){player.sendMessage("Organisation services are temporarily unavailable.");} - } - public void warObjective(Player player, com.google.gson.JsonObject target, Runnable capture) { if (!getServer().isPrimaryThread() || !player.isOnline() || !player.hasPermission("dunemenus.use")) return; new WarObjectiveMenu(this, player, target.deepCopy(), capture).open(); @@ -109,11 +102,9 @@ public final class DuneMenusPlugin extends JavaPlugin implements TabExecutor { void forgetPack(Player player) { loadedPacks.remove(player); } boolean itemCardPackLoaded(Player player) { - if(Bedrock.is(player))return false; - var services=getServer().getPluginManager().getPlugin("DunerealmsGUI"); - if(services==null||!services.isEnabled())return false; - try{return Boolean.TRUE.equals(services.getClass().getMethod("menuAssetsLoaded",Player.class).invoke(services,player));} - catch(ReflectiveOperationException failure){return false;} + String expected = getConfig().getString("resource-pack.item-card-sha1", ""); + return expected.matches("[a-f0-9]{40}") && expected.equals(loadedPacks.get(player)) + && !Bedrock.is(player); } boolean hasOpenMenu(Player player) { return openMenus.containsKey(player.getUniqueId()); } diff --git a/DuneMenus/src/main/java/com/dunerealms/menus/ExchangeMenu.java b/DuneMenus/src/main/java/com/dunerealms/menus/ExchangeMenu.java index 32787db6..b24b1ea0 100644 --- a/DuneMenus/src/main/java/com/dunerealms/menus/ExchangeMenu.java +++ b/DuneMenus/src/main/java/com/dunerealms/menus/ExchangeMenu.java @@ -36,7 +36,7 @@ final class ExchangeMenu extends Menu { back(46); put(51, Ui.item(Material.CHEST, "Collect purchases", "Move paid items to your inventory"), t -> act(backend().collectPurchases(player))); - load(backend().balance(player), b -> put(47, Ui.item(Material.GOLD_INGOT, "Postbank available", "" + Ui.dm(b)))); + load(backend().balance(player), b -> put(47, Ui.item(Material.GOLD_INGOT, "Balance", "" + Ui.dm(b)))); if (tab.equals("sell")) drawStall(); else drawShelf(); } diff --git a/DuneMenus/src/main/java/com/dunerealms/menus/JarvisBackend.java b/DuneMenus/src/main/java/com/dunerealms/menus/JarvisBackend.java index 2c5ef1b2..32af8924 100644 --- a/DuneMenus/src/main/java/com/dunerealms/menus/JarvisBackend.java +++ b/DuneMenus/src/main/java/com/dunerealms/menus/JarvisBackend.java @@ -206,13 +206,6 @@ final class JarvisBackend implements Backend, Listener { return value.matches("RIA-[A-F0-9]{32}")?value:""; } - @Override public CompletableFuture balance(Player player) { - return bankAccount(player).thenApply(account -> { - if(account.postbankAvailableMinor()==null)throw new Unavailable(); - return account.postbankAvailableMinor(); - }); - } - @Override public CompletableFuture bankAccount(Player player) { UUID actor=player.getUniqueId(); return remote(player,()->{ @@ -923,7 +916,7 @@ final class JarvisBackend implements Backend, Listener { } @Override public CompletableFuture orgAction(Player player, String kind, String action, Org shown) { - if (shown == null || !Set.of("home","claims","wars","war-transport","motd","vault","allies","invite","transactions","roles").contains(action)) + if (shown == null || !Set.of("home","claims","wars","war-transport","motd").contains(action)) return CompletableFuture.failedFuture(new Unavailable()); UUID owner = player.getUniqueId(); return once(player, () -> remote(player, () -> organisation(owner,kind,shown.id())).thenCompose(row -> { @@ -931,12 +924,6 @@ final class JarvisBackend implements Backend, Listener { (action.equals("war-transport") && !shown.warKey().equals(warKey(row)))) { return CompletableFuture.completedFuture(Result.no("Organisation details changed. Reopen this menu.")); } - if (Set.of("vault","allies","invite","transactions","roles").contains(action)) { - String url="https://clans.dunerealms.com/#"+(kind.equals("clan")?"clan/clan-overview":"company/company-overview"); - player.sendMessage(net.kyori.adventure.text.Component.text("Open "+action+" on the organisation website →") - .clickEvent(net.kyori.adventure.text.event.ClickEvent.openUrl(url))); - return CompletableFuture.completedFuture(Result.yes("This organisation service is managed on the website.")); - } if (action.equals("motd")) { String message=text(row,"motd"); return CompletableFuture.completedFuture(Result.yes(message.isBlank()?"No organisation message has been set.":message)); diff --git a/DuneMenus/src/main/java/com/dunerealms/menus/ServiceMenu.java b/DuneMenus/src/main/java/com/dunerealms/menus/ServiceMenu.java index 34517f6d..41c23a12 100644 --- a/DuneMenus/src/main/java/com/dunerealms/menus/ServiceMenu.java +++ b/DuneMenus/src/main/java/com/dunerealms/menus/ServiceMenu.java @@ -23,18 +23,10 @@ final class ServiceMenu extends Menu { this.title = title.replaceFirst("^NPC (dashboard|turn-in) · ", ""); this.subtitle = description.lines().findFirst().orElse(""); this.cards = inventory.getContents(); - this.actions = uniqueActions(actions); - for (int slot : actions.keySet()) if (!this.actions.containsKey(slot)) this.cards[slot] = null; + this.actions = Map.copyOf(actions); this.world = player.getWorld().getUID(); } - static Map uniqueActions(Map actions) { - var seen=java.util.Collections.newSetFromMap(new java.util.IdentityHashMap()); - var result=new java.util.TreeMap(); - new java.util.TreeMap<>(actions).forEach((slot,action)->{if(seen.add(action))result.put(slot,action);}); - return Map.copyOf(result); - } - String id() { return section; } Skin skin() { return switch (section) { @@ -63,10 +55,8 @@ final class ServiceMenu extends Menu { else put(slot, card, click -> { if (click != ClickType.LEFT && !(section.equals("exchange") && click == ClickType.RIGHT)) return; Runnable run = () -> { - if (plugin.hasOpenMenu(player, this) && player.isOnline() && world.equals(player.getWorld().getUID())) { - end(); + if (plugin.hasOpenMenu(player, this) && player.isOnline() && world.equals(player.getWorld().getUID())) action.run(); - } }; if (player.getOpenInventory().getTopInventory().getHolder() == this) plugin.getServer().getScheduler().runTask(plugin, run); diff --git a/DuneMenus/src/main/java/com/dunerealms/menus/SuppliedDocument.java b/DuneMenus/src/main/java/com/dunerealms/menus/SuppliedDocument.java index 096aa5b8..52bb4469 100644 --- a/DuneMenus/src/main/java/com/dunerealms/menus/SuppliedDocument.java +++ b/DuneMenus/src/main/java/com/dunerealms/menus/SuppliedDocument.java @@ -10,10 +10,10 @@ final class SuppliedDocument { StringBuilder b=new StringBuilder("
✦DUNE
REALMS
THE IMPERIAL CONCOURSE

").append(escape(title)).append("

").append(escape(subtitle)).append("

"); if(layout.equals("constellation"))b.append("
✷SPACING GUILD
"); b.append("
");int index=0; - for(Card c:cards){b.append("");} - b.append("
");for(String line:info)b.append("

").append(escape(line)).append("

");return b.append("
◆ J.A.R.V.I.S. ◆
").toString(); + for(Card c:cards){b.append("");} + b.append("
");for(String line:info)b.append("

").append(escape(line)).append("

");return b.append("
◆ J.A.R.V.I.S. ◆
").toString(); } private static final String CSS=""" - *{box-sizing:border-box}body{margin:0;padding:12px;background:#03100f;color:#f1e7cd;font-family:Georgia,serif;font-size:13px}button{font-family:Georgia,serif;color:#f4df9d;cursor:pointer}.frame{min-height:570px;border:2px solid #b69149;outline:1px solid #645334;outline-offset:5px;background:#081e1b;position:relative;overflow:hidden}header{height:78px;border-bottom:2px solid #ae8943;background:linear-gradient(90deg,#102f29,#041512);display:flex;align-items:center;padding:8px 22px;gap:22px}.brand{display:flex;align-items:center;gap:8px;color:#d6ad58;font-size:38px;border-right:1px solid #7c683b;padding-right:20px}.brand span{font-size:16px;line-height:17px;letter-spacing:3px}.heading{flex:1}small{font-size:10px;letter-spacing:3px;color:#ad985f}h1{font-size:26px;margin:5px 0 0;color:#eed995;letter-spacing:1px}.close{width:31px;height:31px;border:1px solid #a58b4d;background:#112922;font-size:24px}.scene{position:relative;min-height:411px;padding:0 28px;overflow:hidden;background:linear-gradient(#162d30,#53665a 58%,#a88c52)}.quote{text-align:center;font-style:italic;position:relative;z-index:1;padding:12px 0 8px;margin:0;color:#f4e7bf}.dune{position:absolute;left:-12%;width:125%;height:180px;border-radius:55% 70% 0 0;pointer-events:none}.rear{bottom:0;background:#b4955a;transform:rotate(-8deg)}.front{bottom:-90px;background:#635a38;transform:rotate(9deg)}.moon{position:absolute;right:15%;top:23px;background:#e4dbb6;border-radius:50%;width:45px;height:45px;opacity:.55}main{position:relative;z-index:2}.doors,.bank{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;padding:12px 0 35px}.card{background:linear-gradient(135deg,#173e35,#0c201d);border:1px solid #b59349;box-shadow:inset 0 0 0 3px #0a231f,0 3px 8px #071713;padding:12px;min-height:94px;display:flex;align-items:center;gap:12px;text-align:left;width:22.5%}.card>div{min-width:0;flex:1}.card h2{overflow-wrap:break-word;white-space:normal}.card:hover{background:linear-gradient(135deg,#315c45,#183c32);border-color:#f3d784}.emblem{font-size:34px;color:var(--accent);width:35px;flex-shrink:0;text-align:center}h2{font-size:16px;margin:0 0 6px}p{margin:3px 0;font-size:11px;line-height:1.35;color:#d1d3bc}.back{position:absolute;bottom:2px;left:0;background:#12372c;border:1px solid #ad8c48;padding:7px 12px;display:flex;align-items:center;gap:8px}.pager{border:1px solid #ad8c48;background:#12372c;padding:10px;display:flex;gap:8px;align-items:center}.back .emblem{font-size:17px;width:auto}.back h2{margin:0;font-size:12px}.back p{display:none}.hub .card{width:22%;min-height:89px}.hub .emblem{font-size:30px}.journal{display:flex;flex-direction:column;gap:8px;padding:8px 9% 45px}.journal .card{width:100%;min-height:68px;padding:8px 18px}.journal .card p{display:inline;margin-right:12px}.council{display:flex;flex-wrap:wrap;gap:16px;justify-content:center;padding:20px 8% 44px}.council .card{width:29%;min-height:115px;border-top:3px solid var(--accent)}.bank .card{width:30%;min-height:100px}.travel .scene{background:radial-gradient(ellipse at center,#123a40,#061317)}.travel .dune,.travel .moon{display:none}.constellation{height:350px;position:relative}.constellation .card{position:absolute;width:230px;min-height:83px;border-color:#74aeb6;background:linear-gradient(135deg,#173e43,#091c23)}.constellation .n0{top:0;left:36%}.constellation .n1{top:98px;left:0}.constellation .n2{top:98px;right:0}.constellation .n3{top:225px;left:12%}.constellation .n4{top:225px;right:12%}.constellation .back{bottom:0}.guild{position:absolute;top:168px;left:44%;font-size:52px;color:#c4dcdf;text-align:center}.guild span{display:block;font-size:11px;letter-spacing:2px}.orbit{position:absolute;border:1px solid #467b84;width:62%;height:170px;top:130px;left:19%;border-radius:50%;transform:rotate(24deg)}.orbit.two{transform:rotate(-24deg)}footer{height:76px;padding:9px 22px;background:#0b211c;border-top:1px solid #a88b47;display:flex;align-items:center;gap:22px}.facts{position:relative;padding:12px 0 24px;z-index:2}.facts p{font-size:11px;color:#c0c9b2}.seal{font-size:10px;letter-spacing:2px;color:#bda464}.war .scene{background:linear-gradient(#2e2424,#182c26)}.spice .scene{background:linear-gradient(#715232,#bc9251)}.politics .scene{background:linear-gradient(#2f2444,#132c27)} + *{box-sizing:border-box}body{margin:0;padding:12px;background:#03100f;color:#f1e7cd;font-family:Georgia,serif;font-size:13px}button{font-family:Georgia,serif;color:#f4df9d;cursor:pointer}.frame{min-height:570px;border:2px solid #b69149;outline:1px solid #645334;outline-offset:5px;background:#081e1b;position:relative;overflow:hidden}header{height:78px;border-bottom:2px solid #ae8943;background:linear-gradient(90deg,#102f29,#041512);display:flex;align-items:center;padding:8px 22px;gap:22px}.brand{display:flex;align-items:center;gap:8px;color:#d6ad58;font-size:38px;border-right:1px solid #7c683b;padding-right:20px}.brand span{font-size:16px;line-height:17px;letter-spacing:3px}.heading{flex:1}small{font-size:10px;letter-spacing:3px;color:#ad985f}h1{font-size:26px;margin:5px 0 0;color:#eed995;letter-spacing:1px}.close{width:31px;height:31px;border:1px solid #a58b4d;background:#112922;font-size:24px}.scene{position:relative;min-height:411px;padding:0 28px;overflow:hidden;background:linear-gradient(#162d30,#53665a 58%,#a88c52)}.quote{text-align:center;font-style:italic;position:relative;z-index:1;padding:12px 0 8px;margin:0;color:#f4e7bf}.dune{position:absolute;left:-12%;width:125%;height:180px;border-radius:55% 70% 0 0;pointer-events:none}.rear{bottom:0;background:#b4955a;transform:rotate(-8deg)}.front{bottom:-90px;background:#635a38;transform:rotate(9deg)}.moon{position:absolute;right:15%;top:23px;background:#e4dbb6;border-radius:50%;width:45px;height:45px;opacity:.55}main{position:relative;z-index:2}.doors,.bank{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;padding:12px 0 35px}.card{background:linear-gradient(135deg,#173e35,#0c201d);border:1px solid #b59349;box-shadow:inset 0 0 0 3px #0a231f,0 3px 8px #071713;padding:12px;min-height:94px;display:flex;align-items:center;gap:12px;text-align:left;width:22.5%}.card:hover{background:linear-gradient(135deg,#315c45,#183c32);border-color:#f3d784}.emblem{font-size:34px;color:var(--accent);width:35px;flex-shrink:0;text-align:center}h2{font-size:16px;margin:0 0 6px}p{margin:3px 0;font-size:11px;line-height:1.35;color:#d1d3bc}.back{position:absolute;bottom:2px;left:0;background:#12372c;border:1px solid #ad8c48;padding:7px 12px;display:flex;align-items:center;gap:8px}.back .emblem{font-size:17px;width:auto}.back h2{margin:0;font-size:12px}.back p{display:none}.hub .card{width:22%;min-height:89px}.hub .emblem{font-size:30px}.journal{display:flex;flex-direction:column;gap:8px;padding:8px 9% 45px}.journal .card{width:100%;min-height:68px;padding:8px 18px}.journal .card p{display:inline;margin-right:12px}.council{display:flex;flex-wrap:wrap;gap:16px;justify-content:center;padding:20px 8% 44px}.council .card{width:29%;min-height:115px;border-top:3px solid var(--accent)}.bank .card{width:30%;min-height:100px}.travel .scene{background:radial-gradient(ellipse at center,#123a40,#061317)}.travel .dune,.travel .moon{display:none}.constellation{height:350px;position:relative}.constellation .card{position:absolute;width:230px;min-height:83px;border-color:#74aeb6;background:linear-gradient(135deg,#173e43,#091c23)}.constellation .n0{top:0;left:36%}.constellation .n1{top:98px;left:0}.constellation .n2{top:98px;right:0}.constellation .n3{top:225px;left:12%}.constellation .n4{top:225px;right:12%}.constellation .back{bottom:0}.guild{position:absolute;top:168px;left:44%;font-size:52px;color:#c4dcdf;text-align:center}.guild span{display:block;font-size:11px;letter-spacing:2px}.orbit{position:absolute;border:1px solid #467b84;width:62%;height:170px;top:130px;left:19%;border-radius:50%;transform:rotate(24deg)}.orbit.two{transform:rotate(-24deg)}footer{height:76px;padding:9px 22px;background:#0b211c;border-top:1px solid #a88b47;display:flex;align-items:center;gap:22px}.facts{flex:1;max-height:61px;overflow:auto}.facts p{font-size:11px;color:#c0c9b2}.seal{font-size:10px;letter-spacing:2px;color:#bda464}.war .scene{background:linear-gradient(#2e2424,#182c26)}.spice .scene{background:linear-gradient(#715232,#bc9251)}.politics .scene{background:linear-gradient(#2f2444,#132c27)} """; } diff --git a/DuneMenus/src/rendererTest/java/com/dunerealms/menus/RendererVerification.java b/DuneMenus/src/rendererTest/java/com/dunerealms/menus/RendererVerification.java deleted file mode 100644 index cb35ca78..00000000 --- a/DuneMenus/src/rendererTest/java/com/dunerealms/menus/RendererVerification.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.dunerealms.menus; -import java.nio.file.*;import java.util.*;import java.awt.geom.*;import javax.imageio.ImageIO;import ai.resourcepack.ui.html.*;import ai.resourcepack.ui.html.css.Selector; -public class RendererVerification { - public static void main(String[]args)throws Exception{ - Path dir=Path.of(args[0]);Files.createDirectories(dir);var loader=new Page.Loader(false,dir.resolve("engine-cache"));int checked=0; - for(String id:List.of("hub","travel","exchange","clan","company","missions","spice","war","politics","house","equipment","bank","atm","withdraw","transfer")){ - List cards=new ArrayList<>();int count=id.equals("exchange")?28:id.equals("travel")?5:8; - for(int n=0;nalert(1)","quoted",List.of(new Card(12,"