If I'm reading the code correctly, the numbering of terrains in terrain.txt is used directly by the code in order to determine what to do with specific features. Adding more floor terrains seems like it would require one of the following:
1) simplest solution: move all non-floor terrains later in terrain.txt, and change the values of FEAT_INVIS and FEAT_DOOR_HEAD. Then add the new floor types to the beginning. This keeps the old clunky format, but won't break anything.
2) Abandon FEAT_INVIS and FEAT_DOOR_HEAD and instead use flags for all the calls. There are a *lot* of changes that would need to be done, but may be doable.
Is there a good reason why door selection was not done by flags and rather by calling the indexes in terrain.txt directly?
1) simplest solution: move all non-floor terrains later in terrain.txt, and change the values of FEAT_INVIS and FEAT_DOOR_HEAD. Then add the new floor types to the beginning. This keeps the old clunky format, but won't break anything.
2) Abandon FEAT_INVIS and FEAT_DOOR_HEAD and instead use flags for all the calls. There are a *lot* of changes that would need to be done, but may be doable.
Is there a good reason why door selection was not done by flags and rather by calling the indexes in terrain.txt directly?
Comment