Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 21
java-version: 25
cache: 'gradle'
Comment on lines 17 to 23
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Update outdated GitHub Actions in the build job.

  • actions/checkout@v2 is outdated; current major version is v4.
  • actions/setup-java@v3 is outdated; current version is v4.x (static analysis confirms this).
🔎 Proposed fix
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
       - name: Set up JDK 25
-        uses: actions/setup-java@v3
+        uses: actions/setup-java@v4
         with:
           distribution: "temurin"
           java-version: 25
           cache: 'gradle'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@v2
- name: Set up JDK 21
- name: Set up JDK 25
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 21
java-version: 25
cache: 'gradle'
- uses: actions/checkout@v4
- name: Set up JDK 25
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 25
cache: 'gradle'
🧰 Tools
🪛 actionlint (1.7.9)

17-17: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


19-19: the runner of "actions/setup-java@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
.github/workflows/release.yml around lines 17 to 23: the workflow uses outdated
action versions (actions/checkout@v2 and actions/setup-java@v3); update
actions/checkout to the current major (v4) and actions/setup-java to v4.x, keep
the existing inputs (distribution: "temurin", java-version: 25, cache: 'gradle')
intact, and run/validate the workflow after updating to ensure no syntax or
input changes are required by the new major versions.


- name: Grant execute permission for gradlew
Expand All @@ -46,18 +46,21 @@ jobs:
name: Package ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v3
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 21
java-version: 25
cache: 'gradle'

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Package with Gradle
run: ./gradlew -x test --stacktrace jpackage --parallel --no-daemon -PgeneratorVersion="${{ github.event.inputs.version }}"
run: |
./gradlew -x test --stacktrace jlink --parallel -PgeneratorVersion="${{ github.event.inputs.version }}"
./generator/build/image/bin/java -XX:AOTCacheOutput=generator/build/image/bin/neroxis-generator.aot -XX:+UseCompactObjectHeaders -m com.faforever.neroxis.generator/com.faforever.neroxis.generator.MapGenerator --out-path ./GeneratedMaps
./gradlew -x test --stacktrace jpackage --parallel -PgeneratorVersion="${{ github.event.inputs.version }}"
Comment on lines +60 to +63
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -name "release.yml" -path "*/.github/workflows/*" | head -5

Repository: FAForever/Neroxis-Map-Generator

Length of output: 106


🏁 Script executed:

cat -n ./.github/workflows/release.yml | sed -n '50,75p'

Repository: FAForever/Neroxis-Map-Generator

Length of output: 1468


🏁 Script executed:

cat -n ./.github/workflows/release.yml | sed -n '1,50p'

Repository: FAForever/Neroxis-Map-Generator

Length of output: 1776


🌐 Web query:

jlink output Windows java.exe executable extension GitHub Actions

💡 Result:

Short answer: jlink produces a platform-specific runtime image that includes the java launcher with the normal OS filename — on Windows that is java.exe in the image's bin\ directory. A Windows-targeted jlink image will contain bin\java.exe; a Linux-targeted image will contain bin/java (no .exe) and will not run on Windows. When using GitHub Actions build matrix, generate the Windows jlink image on a Windows runner (or use Windows JDK jmods when cross-building) and invoke the runtime via /bin/java.exe (or add that bin dir to PATH). Ensure you run the Windows image on a Windows runner — Linux/macOS runners will not execute .exe binaries. [1][2][3]

Sources

  • jlink runtime image description (shows bin/java and platform-specific images). [1]
  • Microsoft doc: jlink image contains ./bin/java; Windows images use java.exe. [2]
  • Example GitHub Actions + jlink (JReleaser) showing Windows target images and Actions configuration. [3]

🌐 Web query:

GitHub Actions Windows shell bash git bash java.exe extension resolution

💡 Result:

Short answer: On Windows runners GitHub Actions’ shell: bash runs the Git-for-Windows bash (bash.exe). That bash still relies on Windows PATH/PATHEXT behavior and the MSYS/MSYS2 emulation layer — so executable lookup can differ from native cmd/powershell. If a program isn’t found when you call its bare name (java) but exists as java.exe, call java.exe or use the full path or fix PATH so bash can see the Windows location. You can also switch the step to a Windows-native shell (pwsh or cmd) where PATHEXT resolution behaves like normal Windows. Examples and links below.

Actionable options

  • Call java.exe explicitly: run: java.exe -version.
  • Use full Windows path: run: "/c/Program Files/Java/jdk.../bin/java.exe" -version (or quoted Windows path).
  • Ensure the Java bin directory is on PATH (export PATH="/c/Program Files/Java/…/bin:$PATH") in bash.
  • Use shell: pwsh or shell: cmd if you need native Windows command resolution.
  • Or set a custom shell to a different bash (Cygwin/MSYS2) if required. (docs.github.com)

If you want, tell me which runner image and workflow step (example run block) and I’ll give the exact syntax to fix it.

Citations:


🏁 Script executed:

cat -n ./.github/workflows/release.yml | sed -n '59,64p'

Repository: FAForever/Neroxis-Map-Generator

Length of output: 858


AOT generation will fail on Windows runners due to missing .exe extension.

When jlink runs on Windows, it produces java.exe, not java. The AOT command at line 62 uses ./generator/build/image/bin/java, which Git Bash on Windows runners cannot resolve. Use ./generator/build/image/bin/java.exe or implement platform-agnostic logic (e.g., shell conditional or a Gradle task to handle the invocation).

The workflow matrix includes windows-latest, so this will cause builds to fail on Windows.

🤖 Prompt for AI Agents
.github/workflows/release.yml around lines 60 to 63: the workflow invokes the
jlink-generated Java binary as ./generator/build/image/bin/java which fails on
Windows where the runtime is java.exe; update the step to use a platform-aware
invocation — either call ./generator/build/image/bin/java.exe when runner.os ==
'Windows' (use a conditional job/step), or implement a small cross-platform
wrapper/Gradle task that resolves the correct binary name and runs the AOT
command so Linux/macOS use ./generator/build/image/bin/java and Windows uses
./generator/build/image/bin/java.exe.


- name: Archive jpackage artifacts
uses: actions/upload-artifact@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v3
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: 21
java-version: 25
cache: 'gradle'

- name: Grant execute permission for gradlew
Expand Down
3 changes: 2 additions & 1 deletion .idea/codeStyles/Project.xml

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

4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ repositories {
dependencies {
implementation("com.adarshr:gradle-test-logger-plugin:4.0.0")
implementation("com.gradleup.shadow:shadow-gradle-plugin:9.2.2")
implementation("org.beryx.jlink:org.beryx.jlink.gradle.plugin:3.1.1")
implementation("org.beryx.jlink:org.beryx.jlink.gradle.plugin:3.1.4-rc")
}

kotlin {
jvmToolchain(21)
jvmToolchain(25)
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,28 @@ plugins {
val generatorVersion: String = properties["generatorVersion"] as String

jlink {
options.addAll("--strip-debug", "--compress", "2", "--no-header-files", "--no-man-pages")
enableCds()
options.addAll("--strip-debug", "--compress", "zip-9", "--no-header-files", "--no-man-pages")
jpackage {
if (org.gradle.internal.os.OperatingSystem.current().isWindows) {
installerOptions.addAll(
listOf(
"--win-per-user-install",
"--win-dir-chooser",
"--win-menu",
"--win-shortcut",
"--win-shortcut-prompt"
)
installerOptions = listOf(
"--win-per-user-install", "--win-dir-chooser", "--win-menu", "--win-shortcut", "--win-shortcut-prompt"
)
imageOptions.addAll(listOf("--win-console"))
imageOptions = listOf("--win-console")
}
if (generatorVersion != "snapshot") {
appVersion = generatorVersion
}
jvmArgs.addAll(
listOf(
"-XX:+AutoCreateSharedArchive",
"-XX:SharedArchiveFile={{BIN_DIR}}/neroxis-${project.name}.jsa"
)
)
}
launcher {
name = "neroxis-${project.name}"
jvmArgs = listOf(
"-XX:+UseCompactObjectHeaders",
"-XX:AOTCache=neroxis-${project.name}.aot"
)
val templatesDir =
rootDir.resolve("buildSrc").resolve("src").resolve("main").resolve("resources").resolve("templates")
unixScriptTemplate = templatesDir.resolve("unixScriptTemplate.txt")
windowsScriptTemplate = templatesDir.resolve("windowsScriptTemplate.txt")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
}

repositories {
Expand All @@ -15,15 +15,15 @@ repositories {
dependencies {
api("org.jspecify:jspecify:1.0.0")

val lombokVersion = "1.18.38"
val lombokVersion = "1.18.42"
compileOnly("org.projectlombok:lombok:$lombokVersion")
annotationProcessor("org.projectlombok:lombok:$lombokVersion")
Comment on lines +18 to 20
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Lombok 1.18.42 Java 25 support compatibility

💡 Result:

Short answer: Lombok 1.18.42 adds JDK 25 compatibility (release dated Sep 20, 2025), but there are still active/closed issues reporting JDK 25-related breakages — test your code (and consider newer Lombok releases if problems appear). [1][2][3][4]

Sources:

  • 1.18.42 release entry. [1]
  • Feature/compatibility discussion for JDK 25. [2]
  • Reported "Unable to compile using java 25" issue against 1.18.42. [3]
  • Reported "val can be used only once with JDK25" bug (1.18.42). [4]

Test Lombok 1.18.42 thoroughly with JDK 25 before merging.

While Lombok 1.18.42 adds JDK 25 compatibility support, there are known issues reported including compilation failures and val usage restrictions with JDK 25. Test your codebase with this version, and consider upgrading to a newer Lombok release if you encounter compatibility problems.

🤖 Prompt for AI Agents
In buildSrc/src/main/kotlin/com.faforever.neroxis.conventions-java.gradle.kts
around lines 18 to 20, you've set lombokVersion to "1.18.42" which may have JDK
25 compatibility issues; run the entire project build and test suite using JDK
25 to verify compilation, annotation processing and 'val' usage; if you
encounter failures, either bump lombokVersion to a newer release that fixes JDK
25 issues or revert to the previous known-good Lombok version, update the
version string accordingly and re-run tests, and document the chosen version in
the file header or project README for future reference.


val picocliVersion = "4.7.7"
implementation("info.picocli:picocli:$picocliVersion")
annotationProcessor("info.picocli:picocli-codegen:$picocliVersion")

val junitVersion = "5.13.1"
val junitVersion = "6.0.1"
testImplementation(platform("org.junit:junit-bom:$junitVersion"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
Expand Down
7 changes: 7 additions & 0 deletions buildSrc/src/main/resources/templates/unixScriptTemplate.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
SCRIPT_NAME=\$(basename "\$0")
APP_NAME=\${SCRIPT_NAME%.sh}

DIR="\${0%/*}"

"\$DIR/java" \$CDS_JVM_OPTS ${jvmArgs} -m ${moduleName}/${mainClassName} ${args} "\$@"
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off
set DIR="%~dp0"
set JAVA_EXEC="%DIR:"=%\\java"

pushd %DIR% & %JAVA_EXEC% %CDS_JVM_OPTS% ${jvmArgs} -m ${moduleName}/${mainClassName} ${args} %* & popd
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
import java.util.Locale;

public class GeneratedMapNameEncoder {
private static final Base32 ENCODER = new Base32(0, null, false, ((byte) '='), CodecPolicy.LENIENT);
private static final Base32 ENCODER = Base32.builder()
.setLineLength(0)
.setPadding((byte) '=')
.setDecodingPolicy(CodecPolicy.LENIENT)
.get();

public static String encode(byte[] bytes) {
return ENCODER.encodeAsString(bytes).replace("=", "").toLowerCase(Locale.ROOT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.faforever.neroxis.map.placement.DecalPlacer;
import com.faforever.neroxis.mask.BooleanMask;
import com.faforever.neroxis.mask.FloatMask;
import com.faforever.neroxis.util.Pipeline;

import java.util.Random;

Expand All @@ -25,18 +24,18 @@ public abstract class DecalGenerator implements HasParameterConstraints {
protected BooleanMask slopeDecal;

public void initialize(SCMap map, long seed, GeneratorParameters generatorParameters,
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator, Pipeline pipeline) {
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator) {
this.map = map;
this.random = new Random(seed);
this.generatorParameters = generatorParameters;
this.symmetrySettings = symmetrySettings;
this.slope = terrainGenerator.getSlope();
this.passableLand = new BooleanMask(1, random.nextLong(), symmetrySettings, "passableLand", pipeline);
this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "passableLand", pipeline);
this.passableLand = new BooleanMask(1, random.nextLong(), symmetrySettings, "passableLand");
this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "passableLand");
passableLand.init(terrainGenerator.getPassableLand());
slope.init(terrainGenerator.getSlope());
Comment on lines 32 to 36
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix incorrect mask name and redundant assignment.

There are two issues here:

  1. Line 32 assigns this.slope = terrainGenerator.getSlope(), but line 34 immediately overwrites it with a new FloatMask
  2. Line 34 creates a FloatMask with the name "passableLand" when it should be "slope"

This appears to be a copy-paste error where the mask name wasn't updated.

🔎 Proposed fix
-        this.slope = terrainGenerator.getSlope();
         this.passableLand = new BooleanMask(1, random.nextLong(), symmetrySettings, "passableLand");
-        this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "passableLand");
+        this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "slope");
         passableLand.init(terrainGenerator.getPassableLand());
         slope.init(terrainGenerator.getSlope());
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
this.slope = terrainGenerator.getSlope();
this.passableLand = new BooleanMask(1, random.nextLong(), symmetrySettings, "passableLand", pipeline);
this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "passableLand", pipeline);
this.passableLand = new BooleanMask(1, random.nextLong(), symmetrySettings, "passableLand");
this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "passableLand");
passableLand.init(terrainGenerator.getPassableLand());
slope.init(terrainGenerator.getSlope());
this.passableLand = new BooleanMask(1, random.nextLong(), symmetrySettings, "passableLand");
this.slope = new FloatMask(1, random.nextLong(), symmetrySettings, "slope");
passableLand.init(terrainGenerator.getPassableLand());
slope.init(terrainGenerator.getSlope());
🤖 Prompt for AI Agents
In
generator/src/main/java/com/faforever/neroxis/generator/decal/DecalGenerator.java
around lines 32 to 36, there is a redundant assignment to this.slope and a wrong
mask name: remove the early assignment this.slope = terrainGenerator.getSlope()
(it is immediately overwritten), instantiate the FloatMask with the correct name
"slope" instead of "passableLand", and keep the BooleanMask for passableLand
named "passableLand"; then ensure
passableLand.init(terrainGenerator.getPassableLand()) and
slope.init(terrainGenerator.getSlope()) remain as the initializations.

fieldDecal = new BooleanMask(1, random.nextLong(), symmetrySettings, "fieldDecal", pipeline);
slopeDecal = new BooleanMask(1, random.nextLong(), symmetrySettings, "slopeDecal", pipeline);
fieldDecal = new BooleanMask(1, random.nextLong(), symmetrySettings, "fieldDecal");
slopeDecal = new BooleanMask(1, random.nextLong(), symmetrySettings, "slopeDecal");
decalPlacer = new DecalPlacer(map, random.nextLong());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.faforever.neroxis.map.SymmetrySettings;
import com.faforever.neroxis.mask.BooleanMask;
import com.faforever.neroxis.util.DebugUtil;
import com.faforever.neroxis.util.Pipeline;

public class BasicPropGenerator extends PropGenerator {
protected BooleanMask treeMask;
Expand All @@ -17,11 +16,11 @@ public class BasicPropGenerator extends PropGenerator {

@Override
public void initialize(SCMap map, long seed, GeneratorParameters generatorParameters,
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator, Pipeline pipeline) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator, pipeline);
treeMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "treeMask", pipeline);
cliffRockMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "cliffRockMask", pipeline);
fieldStoneMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "fieldStoneMask", pipeline);
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator);
treeMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "treeMask");
cliffRockMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "cliffRockMask");
fieldStoneMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "fieldStoneMask");
noProps = new BooleanMask(1, random.nextLong(), symmetrySettings, "noProps");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.faforever.neroxis.map.SymmetrySettings;
import com.faforever.neroxis.mask.BooleanMask;
import com.faforever.neroxis.util.DebugUtil;
import com.faforever.neroxis.util.Pipeline;

public class BoulderFieldPropGenerator extends BasicPropGenerator {
protected BooleanMask fieldBoulderMask;
Expand All @@ -17,14 +16,12 @@ public class BoulderFieldPropGenerator extends BasicPropGenerator {

@Override
public void initialize(SCMap map, long seed, GeneratorParameters generatorParameters,
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator, Pipeline pipeline) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator, pipeline);
fieldBoulderMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "fieldBoulderMask", pipeline);
boulderReclaimAreaMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "boulderReclaimAreaMask",
pipeline);
stoneReclaimAreaMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "stoneReclaimAreaMask",
pipeline);
reclaimArea = new BooleanMask(1, random.nextLong(), symmetrySettings, "reclaimArea", pipeline);
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator);
fieldBoulderMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "fieldBoulderMask");
boulderReclaimAreaMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "boulderReclaimAreaMask");
stoneReclaimAreaMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "stoneReclaimAreaMask");
reclaimArea = new BooleanMask(1, random.nextLong(), symmetrySettings, "reclaimArea");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.faforever.neroxis.map.placement.UnitPlacer;
import com.faforever.neroxis.mask.BooleanMask;
import com.faforever.neroxis.util.DebugUtil;
import com.faforever.neroxis.util.Pipeline;

import java.io.IOException;

Expand All @@ -20,10 +19,10 @@ public class EnemyCivPropGenerator extends BasicPropGenerator {

@Override
public void initialize(SCMap map, long seed, GeneratorParameters generatorParameters,
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator, Pipeline pipeline) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator, pipeline);
baseMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "baseMask", pipeline);
noBases = new BooleanMask(1, random.nextLong(), symmetrySettings);
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator);
baseMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "baseMask");
noBases = new BooleanMask(1, random.nextLong(), symmetrySettings, "noBases");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,17 @@
import com.faforever.neroxis.map.placement.UnitPlacer;
import com.faforever.neroxis.mask.BooleanMask;
import com.faforever.neroxis.util.DebugUtil;
import com.faforever.neroxis.util.Pipeline;

public class LargeBattlePropGenerator extends ReducedNaturalPropGenerator {
protected BooleanMask landWreckMask;
protected BooleanMask noWrecks;

@Override
public void initialize(SCMap map, long seed, GeneratorParameters generatorParameters,
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator, Pipeline pipeline) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator, pipeline);
landWreckMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "landWreckMask", pipeline);
noWrecks = new BooleanMask(1, random.nextLong(), symmetrySettings);
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator);
landWreckMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "landWreckMask");
noWrecks = new BooleanMask(1, random.nextLong(), symmetrySettings, "noWrecks");
}

@Override
Expand Down Expand Up @@ -54,7 +53,7 @@ protected void setupWreckPipeline() {
landWreckMask.fillCenter(196, true);
map.getSpawns().forEach(spawn -> landWreckMask.fillCircle(spawn.getPosition(), 128, false));
landWreckMask.multiply(passableLand).space(96, 128);
landWreckMask.inflate(20f).setSize(mapSize / 4);
landWreckMask.inflate(20).setSize(mapSize / 4);
landWreckMask.erode(.5f).setSize(mapSize + 1);
landWreckMask.multiply(passableLand).fillEdge(96, false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.faforever.neroxis.map.placement.UnitPlacer;
import com.faforever.neroxis.mask.BooleanMask;
import com.faforever.neroxis.util.DebugUtil;
import com.faforever.neroxis.util.Pipeline;

public class NavyWrecksPropGenerator extends ReducedNaturalPropGenerator {
protected BooleanMask t2NavyWreckMask;
Expand All @@ -19,12 +18,11 @@ public class NavyWrecksPropGenerator extends ReducedNaturalPropGenerator {

@Override
public void initialize(SCMap map, long seed, GeneratorParameters generatorParameters,
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator, Pipeline pipeline) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator, pipeline);
t2NavyWreckMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "t2NavyWreckMask", pipeline);
navyFactoryWreckMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "navyFactoryWreckMask",
pipeline);
noWrecks = new BooleanMask(1, random.nextLong(), symmetrySettings);
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator);
t2NavyWreckMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "t2NavyWreckMask");
navyFactoryWreckMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "navyFactoryWreckMask");
noWrecks = new BooleanMask(1, random.nextLong(), symmetrySettings, "noWrecks");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.faforever.neroxis.map.placement.UnitPlacer;
import com.faforever.neroxis.mask.BooleanMask;
import com.faforever.neroxis.util.DebugUtil;
import com.faforever.neroxis.util.Pipeline;

import java.io.IOException;

Expand All @@ -20,11 +19,11 @@ public class NeutralCivPropGenerator extends BasicPropGenerator {

@Override
public void initialize(SCMap map, long seed, GeneratorParameters generatorParameters,
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator, Pipeline pipeline) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator, pipeline);
civReclaimMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "civReclaimMask", pipeline);
SymmetrySettings symmetrySettings, TerrainGenerator terrainGenerator) {
super.initialize(map, seed, generatorParameters, symmetrySettings, terrainGenerator);
civReclaimMask = new BooleanMask(1, random.nextLong(), symmetrySettings, "civReclaimMask");

noCivs = new BooleanMask(1, random.nextLong(), symmetrySettings);
noCivs = new BooleanMask(1, random.nextLong(), symmetrySettings, "noCivs");
}

@Override
Expand Down
Loading
Loading