NAME
Games::Simutrans::Livery -
VERSION
version 0.01
SYNOPSIS
use Games::Simutrans::Livery;
my $livery = Games::Simutrans::Livery->new(name => 'Erie');
my $object = Games::Simutrans::Pak->new;
$object->from_string(...);
$livery->record_use($object);
say 'Used from ' . $livery->intro_year . ' to '.
$livery->retire_year;
DESCRIPTION
METHODS
record_use ($object)
Records the usage of this livery by a given Simutrans object (assumed to be a Games::Simutrans::Pak object or equivalent). Keeps track of the first introduction and last retirement dates of all objects using this livery.
objects
Returns a list of all object names (in the pakset) which were recorded as using this livery with record_use.
intro_year, intro_month, retire_year, retire_month
Return the year or month of the first or last observed use (introduction or retirment) of the livery
ATTRIBUTES
name
Sets or returns the short name of the livery as used in Simutrans dat files.
intro, retire
These two values are the first and last observed uses of the livery, in the integer format year * 12 + month + 1
.
AUTHOR
William Lindley <wlindley@wlindley.com>
COPYRIGHT
Copyright 2021, William Lindley
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.