redeclipse.prefabs.magica module

class redeclipse.prefabs.magica.MagicaRoom(pos, roof=False, orientation=CV(BV(1.0, 0.0, 0)), randflags=None)[source]

Bases: redeclipse.prefabs.Room

boundary_additions = {}
colour_to_texture(r, g, b)[source]
Parameters:c (int) – an index from the texture atlas

You can override this to exchange the colour replacement behaviour

Return type:int
Returns:another index from the texture atlas.
doors = [{'orientation': CV(BV(-1.0, 0.0, 0)), 'offset': CV(BV(-1.0, 0.0, 0))}, {'orientation': CV(BV(1.0, 0.0, 0)), 'offset': CV(BV(1.0, 0.0, 0))}, {'orientation': CV(BV(0, 1, 0)), 'offset': CV(BV(0, 1, 0))}, {'orientation': CV(BV(0.0, -1.0, 0)), 'offset': CV(BV(0.0, -1.0, 0))}]
initialize_textures()[source]

Re-builds the textures for this room, randomly picking new ones as appropriate.

This data is then used in colour_to_texture.

load_model()[source]
render(world, xmap)[source]

Render the magica room to the world.

render_extra(world, xmap)[source]
render_individual_voxel(v, world)[source]

Render a vector to a world (auto-translating the colour).

This was abstracted into a separate function to permit effects such as the decaying.

room_type = 'oriented'
vox_file = None