pub struct Prototype {
pub basic: BasicMembers,
pub visibility: Option<Vec<String>>,
pub parent: Option<String>,
pub abstract: Option<bool>,
pub typename: Option<String>,
pub instance_limit: Option<Number>,
pub deprecated: bool,
pub properties: Vec<Property>,
pub custom_properties: Option<CustomProperties>,
}Expand description
Prototypes are templates for components in the game engine. They define parameters which the engine uses to create predefined behavior.
Fields§
§basic: BasicMembersThe basic fields of the type.
visibility: Option<Vec<String>>The list of game expansions needed to use this prototype.
If not present, no restrictions apply.
Possible values: "space_age"
parent: Option<String>The name of the prototype’s parent, if any.
abstract: Option<bool>Whether the prototype is abstract, and thus can’t be created directly.
typename: Option<String>The type name of the prototype, like "boiler". None for abstract prototypes.
instance_limit: Option<Number>The maximum number of instances of this prototype tnat can be created, if any.
deprecated: boolWhether the prototype is deprecated and shouldn’t be used anymore.
properties: Vec<Property>The list of properties that the prototype has. May be empty.
custom_properties: Option<CustomProperties>A special set of properties that the user can add an arbitrary number of.
Specifies the type of the key and value of the custom property.