mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 05:04:58 +01:00
3710f87fc5b9338cbecbbc090c24ecdc161295d2
1 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
142a3bc287 |
feat(editor): Fields in the Terrain work mode, the ground under them made wavy, natural slopes (#315)
* feat(editor): Fields in the Terrain work mode, the ground under them made wavy, natural slopes A Fields tool beside Fill: LMB outlines a field, which gets the material chosen in the palette and is kept in a list (terrain/<name>/patches.txt, or in the manifest while there are few), where its material, repeat, angle, transition and grass are changed later. - painted into the terrain (the paint of the chunks, its edge blended over a transition and shifted by a noise, the 3D grass under it left, taken away or of another kind), or - a surface of its own: the ground cut away within the outline and the field drawn over the hole as a mesh following the heights of the terrain, made around the camera as the water is. It doesn't take one of the 8 materials of a chunk; its edge is sharp. The ground under a field can be made wavy before: rolling hills, furrows, bumps, long waves, a hollow or a mound, hummocks in a grid, strips of fields; with a profile (rounded, sharp ridges, sharp valleys, terraces, flat tops), roughness, variation and a fade from the edge. The chunks under it are made finer where the waves need it. The formation modifiers get an optional natural shape (natural: wander, scale, gentler, soften, roughness in the manifest): the formation and the edges of the track bed stay, the slopes and their foot wander, get gentler and meet the ground softly. Without it the modifiers shape the ground as before. Formats: new optional entries patches, patches_file and natural of the manifest, and the patches file; a terrain without them reads and saves as before, and the release doesn't read them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ * Fields: one noise for the edges of the fields and the natural slopes, one filling of the geometry of the water Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ * Fields: the vertices handed to the geometry of the water by value Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ * fix(editor): whole-number loop counters instead of float ones (Sonar cpp:S2193) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ * fix(editor): Fields: the edits of a field stick, the natural slopes stay when the formations are laid again, no holes far off or by a missing chunk The copy of the field the widgets edit is kept while one of them is held, so a drag ends with what it was dragged to. Laying the formations again keeps the natural shape of the slopes of each. The surfaces of the fields are made as far as the chunks are drawn, so their holes never show without them; a field over ground with no chunk is made of what has ground, and waits only for chunks which are in the files but not loaded yet. Outline it again puts the points on the ground and the cut changes that field. The holes of the fields are marked (254) and giving one back closes only its own, the holes cut by hand stay. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ * fix(editor): Fields: a separate field is built after loading with the camera still; a cleared outline or another field chosen forgets the one to outline again; giving back a field keeps the holes of the others over it - waits_for_ground counts a chunk as still coming while its pack isn't read yet (right after opening the scenery none is), and as not coming only when the pack is missing or read without that chunk. Before, the first build after opening left a saved separate field a hole until the camera moved. - Clear the outline (Fields and the area fill) and choosing another field in the list forget the field put back by Outline it again, so the next cut is a new field and not the old one moved. - All holes of separate fields share one mark, so closing one closed it under an overlapping field too; the separate fields left over the closed outline are cut again after it (when a field is given back or outlined again). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ * chore(editor): Fields: one identifier a statement, contains() for the sets (Sonar cpp:S1659, cpp:S6171) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ * ci(windows): build lua51.dll for the unit tests (cherry picked from commit |