ElixirDoom.Specials.Sectors (elixir_doom v0.1.0)

Copy Markdown View Source

Questions the level's machinery asks about sectors: their neighbours' floors, ceilings and lights, which sectors carry a tag, where a sector is, and the shortest lower texture round one.

Summary

Functions

The bounding box {top, bottom, left, right} of sector index.

The highest ceiling round sector index, or its own.

The highest floor round sector index, or its own.

The lowest ceiling round sector index, or its own where it has no neighbours.

The lowest floor of sector index and those round it.

The brightest light round sector index, 0 where there is none.

The dimmest light of sector index and those round it.

The sectors sharing a two-sided line with sector index, as they are now.

The lowest floor round sector index above height, or height where there is none.

The height of the shortest lower texture on the sides round sector index.

Sound name heard from the middle of sector index; nothing for nil.

The sectors tagged tag.

Functions

box(world, index)

@spec box(ElixirDoom.World.t(), non_neg_integer()) ::
  {float(), float(), float(), float()}

The bounding box {top, bottom, left, right} of sector index.

highest_ceiling(world, index)

@spec highest_ceiling(ElixirDoom.World.t(), non_neg_integer()) :: float()

The highest ceiling round sector index, or its own.

highest_floor(world, index)

@spec highest_floor(ElixirDoom.World.t(), non_neg_integer()) :: float()

The highest floor round sector index, or its own.

lowest_ceiling(world, index)

@spec lowest_ceiling(ElixirDoom.World.t(), non_neg_integer()) :: float()

The lowest ceiling round sector index, or its own where it has no neighbours.

lowest_floor(world, index)

@spec lowest_floor(ElixirDoom.World.t(), non_neg_integer()) :: float()

The lowest floor of sector index and those round it.

max_light(world, index)

@spec max_light(ElixirDoom.World.t(), non_neg_integer()) :: integer()

The brightest light round sector index, 0 where there is none.

min_light(world, index)

@spec min_light(ElixirDoom.World.t(), non_neg_integer()) :: integer()

The dimmest light of sector index and those round it.

neighbours(world, index)

@spec neighbours(ElixirDoom.World.t(), non_neg_integer()) :: [map()]

The sectors sharing a two-sided line with sector index, as they are now.

next_highest_floor(world, index, height)

@spec next_highest_floor(ElixirDoom.World.t(), non_neg_integer(), number()) ::
  number()

The lowest floor round sector index above height, or height where there is none.

shortest_lower(world, index)

@spec shortest_lower(ElixirDoom.World.t(), non_neg_integer()) :: number()

The height of the shortest lower texture on the sides round sector index.

sound(world, index, name)

Sound name heard from the middle of sector index; nothing for nil.

tagged(world, tag)

@spec tagged(ElixirDoom.World.t(), integer()) :: [non_neg_integer()]

The sectors tagged tag.