Class UsePrototype

java.lang.Object
All Implemented Interfaces:
PropertyNameSource, PropertySource, EditablePiece, GamePiece, PropertyExporter, StateMergeable, PersistentPropertyContainer, Auditable, ImageSearchTarget, SearchTarget, RecursionLimiter.Loopable

public class UsePrototype extends Decorator implements EditablePiece, RecursionLimiter.Loopable
d/b/a "Prototype" This trait is a placeholder for a pre-defined series of traits specified in a PrototypeDefinition object. When a piece that uses a prototype is defined in a module, it is simply assigned the name of a particular prototype definition. When that piece is during a game, the UsePrototype trait is substituted for the list of traits in the prototype definition. From that point on, the piece has no record that those traits were defined in a prototype instead of assigned to piece directly. This is necessary so that subsequent changes to a prototype definition don't invalidate games that were saved using previous versions of the module.