Opened 6 years ago

Last modified 6 years ago

#4998 new defect

Unify Height & Slope based painting

Reported by: elexis Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Maps Keywords:
Cc: Patch:

Description

Caledonian Meadows and Wild Lake have the same code for painting and placing based on terrain height and slope.

Pyrennean Sierra and Corsica & Sardinia have a custom way to achieve the same too. Likely Belgian Uplands as well.

It should be unified in either a Constraint or Painter and the according data structures in the maps should have the same format.

Change History (3)

comment:1 by elexis, 6 years ago

In 20988:

Use vectors for setTexture, refs #4992.

Simplify duplicate Caledonian Meadows and Wild Lake height-based texture painting by using for-of loops, texture setter and vectors, refs #4845, #4998.
Allow setTexture to write to impassable tiles as reported by FeXoR some time ago, refs #4245.

comment:2 by elexis, 6 years ago

In r21085:

Implement rmgen SlopeConstraint which is met if the elevation difference is within the given range, fixes #5004.

Add NearTileClassesConstraint that is satisfied when there is a tile marked with the given class in the given range. Use it for the grass and mountain terrain painting on Pyrenean Sierra.

comment:3 by elexis, 6 years ago

Likely not possible to achieve a unification as maps still do slightly different constraints. Everything can use the createArea calls however. So there might only be simplifications and general readability improvements todo here.

Note: See TracTickets for help on using tickets.