mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-27 16:25:36 +00:00
Drop cave default text the schema already shows
This commit is contained in:
1 parent
f4f2c15731
commit
6dc2dec03b
8 files changed
+40
-17
No files matched your search
@@ -33,23 +33,23 @@ public final class CaveCavern {
|
||||
|
||||
@MinNumber(16)
|
||||
@MaxNumber(512)
|
||||
@Description("Rough span of a room in blocks, 16 to 512. Default 56. A range changes over about " + VALUE_CHANGE_SIZES + " room sizes.")
|
||||
@Description("Rough span of a room in blocks, 16 to 512. A range changes over about " + VALUE_CHANGE_SIZES + " room sizes.")
|
||||
private CaveValue size = CaveValue.of(56);
|
||||
|
||||
@MinNumber(8)
|
||||
@MaxNumber(256)
|
||||
@Description("Rough height of a room in blocks, 8 to 256. Default 22. A range changes over about " + VALUE_CHANGE_SIZES + " room sizes.")
|
||||
@Description("Rough height of a room in blocks, 8 to 256. A range changes over about " + VALUE_CHANGE_SIZES + " room sizes.")
|
||||
private CaveValue height = CaveValue.of(22);
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(0.6)
|
||||
@Description("Share of the underground that is cavern, 0 to 0.6. Default 0.1. 0.1 gives scattered rooms, 0.3 joins them into halls. A range changes over about "
|
||||
@Description("Share of the underground that is cavern, 0 to 0.6. 0.1 gives scattered rooms, 0.3 joins them into halls. A range changes over about "
|
||||
+ VALUE_CHANGE_SIZES + " room sizes; a min of 0 leaves areas without rooms. A range in size, height or roughness makes the share approximate.")
|
||||
private CaveValue coverage = CaveValue.of(0.1);
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Description("Strength of the finer noise on room walls, 0 to 1. Default 0.3. 0 gives smooth bubbles. Ignored with a style, and in rooms under about 20 blocks tall or across. A range changes over about "
|
||||
@Description("Strength of the finer noise on room walls, 0 to 1. 0 gives smooth bubbles. Ignored with a style, and in rooms under about 20 blocks tall or across. A range changes over about "
|
||||
+ VALUE_CHANGE_SIZES + " room sizes.")
|
||||
private CaveValue roughness = CaveValue.of(0.3);
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ import art.arcane.volmlib.util.documentation.Description;
|
||||
/** The world Y range a {@link IrisCave} occurs in. Either end may vary across the world. */
|
||||
@Description("World Y range a cave occurs in.")
|
||||
public final class CaveDepth {
|
||||
@Description("Lowest world Y. A range changes over about " + IrisCave.VALUE_CHANGE_BLOCKS + " blocks. Default 16.")
|
||||
@Description("Lowest world Y. A range changes over about " + IrisCave.VALUE_CHANGE_BLOCKS + " blocks.")
|
||||
private CaveValue min = CaveValue.of(16);
|
||||
|
||||
@Description("Highest world Y. A range changes over about " + IrisCave.VALUE_CHANGE_BLOCKS + " blocks. Default 32.")
|
||||
@Description("Highest world Y. A range changes over about " + IrisCave.VALUE_CHANGE_BLOCKS + " blocks.")
|
||||
private CaveValue max = CaveValue.of(32);
|
||||
|
||||
public CaveDepth() {
|
||||
|
||||
@@ -30,18 +30,18 @@ import java.util.Optional;
|
||||
public final class CavePillars {
|
||||
@MinNumber(6)
|
||||
@MaxNumber(256)
|
||||
@Description("Rough distance between pillars in blocks, 6 to 256. Default 22. A range changes over about " + CaveCavern.VALUE_CHANGE_SIZES + " room sizes.")
|
||||
@Description("Rough distance between pillars in blocks, 6 to 256. A range changes over about " + CaveCavern.VALUE_CHANGE_SIZES + " room sizes.")
|
||||
private CaveValue spacing = CaveValue.of(22);
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(64)
|
||||
@Description("Rough thickness of a pillar at its middle, in blocks, 1 to 64. Default 4. Pillars widen towards floor and ceiling. A range changes over about "
|
||||
@Description("Rough thickness of a pillar at its middle, in blocks, 1 to 64. Pillars widen towards floor and ceiling. A range changes over about "
|
||||
+ CaveCavern.VALUE_CHANGE_SIZES + " room sizes.")
|
||||
private CaveValue thickness = CaveValue.of(4);
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(16)
|
||||
@Description("How many times more ground a pillar covers at floor and ceiling than at its middle, 1 to 16. Default 4. 1 gives straight columns. A range changes over about "
|
||||
@Description("How many times more ground a pillar covers at floor and ceiling than at its middle, 1 to 16. 1 gives straight columns. A range changes over about "
|
||||
+ CaveCavern.VALUE_CHANGE_SIZES + " room sizes.")
|
||||
private CaveValue flare = CaveValue.of(4);
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public final class CaveTunnel {
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(64)
|
||||
@Description("Tunnel width in blocks, 1 to 64. Default {min 4, max 7}. A range changes over about " + WIDTH_CHANGE_SPACINGS + " horizontal spacings.")
|
||||
@Description("Tunnel width in blocks, 1 to 64. A range changes over about " + WIDTH_CHANGE_SPACINGS + " horizontal spacings.")
|
||||
private CaveValue width = CaveValue.between(4, 7);
|
||||
|
||||
@MinNumber(1)
|
||||
@@ -51,7 +51,7 @@ public final class CaveTunnel {
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Description("How far the warp moves tunnels up and down, as a share of how far it swings them sideways, 0 to 1. 0 adds no rise and fall. Default 0.5. A range changes over about "
|
||||
@Description("How far the warp moves tunnels up and down, as a share of how far it swings them sideways, 0 to 1. 0 adds no rise and fall. A range changes over about "
|
||||
+ VALUE_CHANGE_SPACINGS + " horizontal spacings.")
|
||||
private CaveValue verticalWarp = CaveValue.of(0.5);
|
||||
|
||||
|
||||
@@ -40,12 +40,12 @@ public final class CaveTunnelCoverage {
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Description("Share of the underground that has tunnels, 0 to 1. Default 1. A range changes over about " + CaveTunnel.VALUE_CHANGE_SPACINGS + " horizontal spacings.")
|
||||
@Description("Share of the underground that has tunnels, 0 to 1. A range changes over about " + CaveTunnel.VALUE_CHANGE_SPACINGS + " horizontal spacings.")
|
||||
private CaveValue share = CaveValue.of(1);
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Description("How gradually tunnels thin out at the edge of an area, 0 for abrupt dead ends to 1 for long tails. Default " + DEFAULT_SOFTNESS + ".")
|
||||
@Description("How gradually tunnels thin out at the edge of an area, 0 for abrupt dead ends to 1 for long tails.")
|
||||
private CaveValue softness = CaveValue.of(DEFAULT_SOFTNESS);
|
||||
|
||||
@Description("The noise that shapes the areas with tunnels. Leave out for areas a few spacings across.")
|
||||
|
||||
@@ -52,19 +52,19 @@ public final class IrisCave extends IrisRegistrant {
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(128)
|
||||
@Description("Blocks over which the cave narrows to nothing at both ends of its depth range, 0 to 128. Default 12. A range changes over about "
|
||||
@Description("Blocks over which the cave narrows to nothing at both ends of its depth range, 0 to 128. A range changes over about "
|
||||
+ VALUE_CHANGE_BLOCKS + " blocks.")
|
||||
private CaveValue fade = CaveValue.of(12);
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(128)
|
||||
@Description("Blocks of rock kept between the cave and the surface, 0 to 128. Default 8. Ignored when opensToSurface is set. A range changes over about "
|
||||
@Description("Blocks of rock kept between the cave and the surface, 0 to 128. Ignored when opensToSurface is set. A range changes over about "
|
||||
+ VALUE_CHANGE_BLOCKS + " blocks.")
|
||||
private CaveValue surfaceClearance = CaveValue.of(8);
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(128)
|
||||
@Description("Blocks over which the cave closes under the rock it keeps, instead of ending in a flat ceiling, 0 to 128. Default 8. Ignored where it opens to the surface. A range changes over about "
|
||||
@Description("Blocks over which the cave closes under the rock it keeps, instead of ending in a flat ceiling, 0 to 128. Ignored where it opens to the surface. A range changes over about "
|
||||
+ VALUE_CHANGE_BLOCKS + " blocks.")
|
||||
private CaveValue ceilingFade = CaveValue.of(8);
|
||||
|
||||
|
||||
@@ -62,6 +62,29 @@ public class IrisCaveSchemaTest {
|
||||
assertEquals("number", coverage.getJSONArray("oneOf").getJSONObject(0).getString("type"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void everyCaveFieldStatesItsDefaultOnlyThroughTheSchemasDefaultLine() {
|
||||
JSONObject schema = new SchemaBuilder(IrisCave.class, schemaData()).construct();
|
||||
JSONObject definitions = schema.getJSONObject("definitions");
|
||||
assertNoWrittenDefault("cave", schema);
|
||||
for (String definitionName : definitions.keySet()) {
|
||||
if (definitionName.contains("-generation-cave-")) {
|
||||
assertNoWrittenDefault(definitionName, definitions.getJSONObject(definitionName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void assertNoWrittenDefault(String owner, JSONObject definition) {
|
||||
JSONObject properties = definition.optJSONObject("properties");
|
||||
if (properties == null) {
|
||||
return;
|
||||
}
|
||||
for (String field : properties.keySet()) {
|
||||
String writtenDescription = properties.getJSONObject(field).getString("description").split("\n")[1];
|
||||
assertFalse(owner + "." + field + ": " + writtenDescription, writtenDescription.contains("Default"));
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void dimensionsRegionsAndBiomesOfferTheCavesOfThePackToList() throws Exception {
|
||||
for (Class<?> listing : new Class<?>[]{IrisDimension.class, IrisRegion.class, IrisBiome.class}) {
|
||||
|
||||
@@ -85,7 +85,7 @@ public class SchemaBuilderIdentityTest {
|
||||
@ClassRule
|
||||
public static final PlatformLeakGuard PLATFORM_GUARD = PlatformLeakGuard.clean();
|
||||
|
||||
private static final String EXPECTED_SCHEMA_DIGEST = "b0a57ea87eda4aa074911c72202f227e8f54ac0fea3ff27179180ee8956d3626";
|
||||
private static final String EXPECTED_SCHEMA_DIGEST = "78822fbd49a856180b56bfa8d9883e8e9f9865ae37f370f061c024e7a9b93a8d";
|
||||
|
||||
private static final List<Class<?>> SCHEMA_ROOTS = List.of(
|
||||
IrisDimension.class,
|
||||
|
||||
Reference in new issue
Block a user