-- This is the structure of randungeon.dungeons, a global table defined by the randugneon mod, in which descriptions of all generated dungeons
-- in a world can be accessed by all other mods.

randungeon.dungeons = {
     _position_string = {
          pos = {x=x, y=y, z=z},
          p1 = _(lower edge of the dungeon entity spawn area),
          p2 = _(upper edge of the randungen entity spawn area),
          lowest_explored_y = _(lowest y value any player has ever been to in the dungeon area),
          levels_with_swamp_chimneys = (list of y-values where a secret vertical tunnel from a swamp down into a corridor or cave ends),
          bubble_caves = {
               _some_upper_y_value = {
                    {
                         center_pos = _,
                         radius = _,
                         cave_floor = _(if the cave is flattened at the bottom, this is the y height of the flattening),
                         type = _(one of default:lava_source, default:water_source, and air),
                         nature = _(false or name of the nature block),
                         fill_height = false if n/a or a percentage if filled to a certain point with lava or water,
                         nature_metadata = nil or nature metadata,
                         level = _dungeon_level
                    },
                    ... (other caves with this upper y value)
               },
               ... (other upper y values)
          },
          rooms =
               _some_upper_y_value = {
                    {
                         p1 = _,
                         p2 = _,
                         pool_content = _(one of default:river_water, randungeon:lava_source, the name of a nature block, or "nil"),
                         frozen = _true/false,
                         nature_metadata = nil or nature metadata,
                         level = _dungeon_level
                    },
                    ... (other rooms with this upper y value)
               },
               ... (other upper y values)
          },
          staircases = {
               _some_upper_y_value = {
                    {
                         p1 = _,
                         p2 = _,
                    },
                    ... (other rooms with this upper y value)
               },
               ... (other upper y values)
          }
     },
     ... (other dungeons with different positions)
}