Flat test surface + ignore-surface-conditions cheat#59
Merged
Conversation
Make blank surface creation produce a flat, empty, always-day surface (no resources/water/cliffs/trees/decoratives/enemies) with a per-surface floor: lab tiles (engine flag) or concrete/refined-concrete laid by the chunk handler. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…itions cheat Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Artifacts | Task deep link
What problems was I solving
The "Create Surface → Blank surface" option called
game.create_surface(name)with no MapGenSettings, so the default map generator ran and produced full terrain — water, trees, resources, cliffs, decoratives, and a random biome mix. That is useless for build prototyping and benchmarking, where you want a genuinely empty, flat canvas.This PR delivers two related build-testing features:
Both work with and without Space Age.
What user-facing changes did I ship
How I implemented it
Flat surface generation
create_blank_surface(name)becomescreate_blank_surface(name, floor). A module-levelfloor_optionstable (lab→ no tile,concrete,refined-concrete) defines the dropdown order and is shared with the GUI;resolve_floordefaults to lab tiles for nil/unknown values. The surface is created with flat MapGenSettings (default_enable_all_autoplace_controls = false,no_enemies_mode,peaceful_mode,starting_area = "none",cliffiness = 0,enemy-base-intensity = 0), thenalways_day = true. Lab-tile surfaces setgenerate_with_lab_tiles = true(engine-native, no chunk handler); concrete variants record the tile in per-surface storage for the chunk handler.Per-surface floor tracking + chunk handler
storage.creative_mode.surface_cheats.flat_test_floortable (keyed bysurface.index→ tile name), mirroring the existingdont_generate_enemyinit pattern.on_chunk_generatedhandler is extended: for tracked concrete/refined surfaces it lays the configured tile over the chunk viaset_tilesand clears stray decoratives. No second event registration is added.Floor dropdown GUI
surface_blank_floor_label/surface_blank_floor_drop_downelement names.build_blank_section_contentadds a label + drop-down whose items come fromsurface_creation.floor_options(default index 1 = lab). The create-button handler readsselected_index, resolves the floor key, and passes it tocreate_blank_surface. The selection-changed handler consumes the dropdown event (selection is read at create time).Ignore-surface-conditions cheat
ignore_surface_conditions_{container,label,on_button,off_button}names, modeled onpeaceful_mode_*.peaceful_mode:get_value_functionreturnssurface.ignore_surface_conditions,apply_to_target_functionsets it, and applied messages are printed to the surface.type = on_offcheats_gui_dataentry that automatically inherits the shared multi-select surface target picker.Deviations from the plan
Implemented as planned
flat_test_floorstorage init, thefloor_options/resolve_floor/flat-MapGenSettings rework ofcreate_blank_surface, theon_chunk_generatedtile-laying extension, the floor dropdown GUI, theignore_surface_conditionscheat data + GUI entry + element names, and all six locale strings at their planned anchors.Deviations/surprises
RELEASE.md). Instead the two feature bullets were appended to the already-pendingVersion: 2.3.0block, and itsDate: ????was filled in as2026-06-29. This is likely intentional (the release was already pending) but differs from the plan's literal instruction.blank_container; in reality the label + dropdown are added toblank_containerwhile the create button stays onframe(its pre-existing parent). Effective layout/behavior is unchanged.-instead of the planned em-dash—. Functionally identical.Additions not in plan
Items planned but not implemented
uv run verify.pyshell behavior checks and in-game manual verification steps are process steps, not code, so their execution is not visible in the diff.How to verify it
Worktree setup
git fetch origin git worktree add ../creative-mod-pr59 feat/flat-test-surface cd ../creative-mod-pr59Automated Tests
Manual Testing
Description for the changelog
"Create Surface → Blank surface" now creates a genuinely flat, empty test surface with a floor dropdown (Lab tiles / Concrete / Refined concrete), plus a new "Ignore surface conditions" Surface Cheat for placing planet-gated buildings and crafting planet-gated recipes anywhere.