World gen stuff

This commit is contained in:
2026-11-13 00:01:59 -03:00
parent e013fbe550
commit e8ca9753f5
25 changed files with 645 additions and 162 deletions
+6
View File
@@ -109,6 +109,8 @@ export type SurfaceConditionJson =
| { type: "bare_cliffs" }
// at or above where a density function says
| { type: "y_at_least"; function: DensityJson }
// where a density function is in a range
| ({ type: "density"; function: DensityJson } & RangeJson)
| { type: "biome"; biome_is: string[] }
| { type: "not"; invert: SurfaceConditionJson };
@@ -283,6 +285,10 @@ const surface_condition: z.ZodType<SurfaceConditionJson> = z.lazy(() =>
z.object({ type: z.literal(["filler_depth", "surface_underwater", "steep", "bare_cliffs"]) }),
z.object({ type: z.literal("above_preliminary_surface"), offset: z.number().optional() }),
z.object({ type: z.literal("y_at_least"), function: density }),
z.object({ type: z.literal("density"), function: density, ...bounds(z.number()) }).refine(
has_bound,
NEEDS_BOUND,
),
z.object({ type: z.literal("biome"), biome_is: z.array(biome_id) }),
z.object({ type: z.literal("not"), invert: surface_condition }),
])