| 1 | package RPG::Traveller::Starmap::Constants; | ||
| 2 | |||
| 3 | # ABSTRACT: Constants used for readability in (Mega)Traveller applications. | ||
| 4 | 11 | ▶ | use 5.010001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 11 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 11 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | # | ||
| 8 | # Constants to demarcate subsector densities. | ||
| 9 | 11 | ▶ | use constant RIFT => 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 11 | ▶ | use constant SPARSE => 2; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 11 | ▶ | use constant SCATTERED => 3; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 11 | ▶ | use constant NORMAL => 4; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 11 | ▶ | use constant DENSE => 5; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | |||
| 15 | # | ||
| 16 | # Constants defining star group nature | ||
| 17 | |||
| 18 | 11 | ▶ | use constant SOLO => 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | 11 | ▶ | use constant BINARY => 2; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 20 | 11 | ▶ | use constant TRINARY => 3; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | |||
| 22 | # Constants defining star types | ||
| 23 | 11 | ▶ | use constant O => 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 24 | 11 | ▶ | use constant B => 2; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 25 | 11 | ▶ | use constant A => 3; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | 11 | ▶ | use constant F => 4; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 27 | 11 | ▶ | use constant G => 5; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 28 | 11 | ▶ | use constant K => 6; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 29 | 11 | ▶ | use constant M => 7; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 30 | |||
| 31 | # Constants defining star sizes | ||
| 32 | 11 | ▶ | use constant Ia => 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 33 | 11 | ▶ | use constant Ib => 2; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 34 | 11 | ▶ | use constant II => 3; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 35 | 11 | ▶ | use constant III => 4; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 36 | 11 | ▶ | use constant IV => 5; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 37 | 11 | ▶ | use constant V => 6; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 38 | 11 | ▶ | use constant VI => 7; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 39 | 11 | ▶ | use constant D => 8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 40 | |||
| 41 | 11 | require Exporter; | |
| 42 | |||
| 43 | 11 | our @ISA = qw(Exporter); | |
| 44 | |||
| 45 | # Items to export into callers namespace by default. Note: do not export | ||
| 46 | # names by default without a very good reason. Use EXPORT_OK instead. | ||
| 47 | # Do not simply export all your public functions/methods/constants. | ||
| 48 | |||
| 49 | # This allows declaration use RPG::Traveller::Starmap::Constants ':all'; | ||
| 50 | # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK | ||
| 51 | # will save memory. | ||
| 52 | 11 | our %EXPORT_TAGS = ( | |
| 53 | 'all' => [ | ||
| 54 | qw( | ||
| 55 | RIFT SPARSE SCATTERED NORMAL DENSE | ||
| 56 | SOLO BINARY TRINARY | ||
| 57 | Ia Ib II III IV V VI VII D | ||
| 58 | O B A F G K M | ||
| 59 | ) | ||
| 60 | ], | ||
| 61 | 'densities' => [qw ( RIFT SPARSE SCATTERED NORMAL DENSE )], | ||
| 62 | 'sgnature' => [qw ( SOLO BINARY TRINARY )], | ||
| 63 | 'starsizes' => [qw ( Ia Ib II III IV V VI VII D )], | ||
| 64 | 'startypes' => [qw ( O B A F G K M )] | ||
| 65 | ); | ||
| 66 | |||
| 67 | our @EXPORT_OK = ( | ||
| 68 | @{ | ||
| 69 | 11 | $EXPORT_TAGS{'all'} #, | |
| 70 | ################################# $EXPORT_TAGS{'densities'} | ||
| 71 | } | ||
| 72 | ); | ||
| 73 | |||
| 74 | 11 | our @EXPORT = qw( | |
| 75 | RIFT SPARSE SCATTERED NORMAL DENSE | ||
| 76 | ); | ||
| 77 | |||
| 78 | 11 | our $VERSION = '0.500'; | |
| 79 | |||
| 80 | # Preloaded methods go here. | ||
| 81 | |||
| 82 | 11 | 1; | |
| 83 | |||
| 84 | __END__ | ||