ElixirDoom.Tables (elixir_doom v0.1.0)

Copy Markdown View Source

Doom's fixed tables: the random table every chance is drawn from, the weapons and their states, ammunition, the textures and flats that animate, and the switch pairs.

ElixirDoom.Tables.random(0)
ElixirDoom.Tables.weapon(:shotgun)
ElixirDoom.Tables.switch("SW1BRCOM")

Summary

Functions

The animated flat sequences, by name.

The animated wall texture sequences, by name.

How much a clip of each ammunition holds.

The most of each ammunition a player carries without a backpack.

Entry index (wrapped to 0..255) of the random table.

The texture a switch texture turns into when used, either way round, or nil.

Every switch pair.

Weapon name's ammunition, states and slot.

The weapons in the order the next and previous keys cycle them.

Functions

animated_flats()

@spec animated_flats() :: [[String.t()]]

The animated flat sequences, by name.

animated_walls()

@spec animated_walls() :: [[String.t()]]

The animated wall texture sequences, by name.

clip_ammo(ammo)

@spec clip_ammo(atom()) :: pos_integer()

How much a clip of each ammunition holds.

max_ammo()

@spec max_ammo() :: %{required(atom()) => pos_integer()}

The most of each ammunition a player carries without a backpack.

random(index)

@spec random(integer()) :: 0..255

Entry index (wrapped to 0..255) of the random table.

switch(name)

@spec switch(String.t()) :: String.t() | nil

The texture a switch texture turns into when used, either way round, or nil.

switches()

@spec switches() :: [{String.t(), String.t()}]

Every switch pair.

weapon(name)

@spec weapon(atom()) :: map()

Weapon name's ammunition, states and slot.

weapon_order()

@spec weapon_order() :: [atom()]

The weapons in the order the next and previous keys cycle them.