Prototype/ProgrammableSpeaker: Difference between revisions
Jump to navigation
Jump to search
(0.17) |
(1.1.51: Prototype/EntityWithOwner added) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Prototype parent|Prototype/EntityWithOwner}} | |||
A [[programmable speaker]]. | |||
{{Prototype TOC|programmable-speaker}} | |||
== Mandatory properties == | == Mandatory properties == | ||
This prototype inherits all the properties from [[Prototype/ | This prototype inherits all the properties from [[Prototype/EntityWithOwner]]. | ||
{{Prototype property|energy_source|[[Types/EnergySource|EnergySource]]}} | |||
Must be an electric or void energy source. | Must be an electric or void energy source. | ||
{{Prototype property|energy_usage_per_tick|[[Types/Energy|Energy]]}} | |||
{{Prototype property|sprite|[[Types/Sprite|Sprite]]}} | |||
{{Prototype property|maximum_polyphony|[[Types/uint32|uint32]]}} | |||
{{Prototype property|instruments|[[Types/table|table]]}} | |||
Array of ''instrument''s. | Array of ''instrument''s. | ||
An ''instrument'' is a table with the following members: | An ''instrument'' is a table with the following members: | ||
* name - [[Types/string]] - Mandatory | * name - [[Types/string|string]] - Mandatory | ||
* notes - [[Types/table]] of ''note''s - Mandatory | * notes - [[Types/table|table]] of ''note''s - Mandatory | ||
A ''note'' is a table with the following members: | A ''note'' is a table with the following members: | ||
* name - [[Types/string]] - Mandatory | * name - [[Types/string|string]] - Mandatory | ||
* sound - [[Types/Sound]] - Mandatory | * sound - [[Types/Sound|Sound]] - Mandatory | ||
== Optional properties == | == Optional properties == | ||
{{Prototype property|audible_distance_modifier|[[Types/float|float]]|1|optional=true}} | |||
{{Prototype property|circuit_wire_connection_point|[[Types/WireConnectionPoint|WireConnectionPoint]]|optional=true}} | |||
{{Prototype property|circuit_wire_max_distance|[[Types/double|double]]|0|optional=true}} | |||
{{Prototype property|draw_copper_wires|[[Types/bool|bool]]|true|optional=true}} | |||
{{Prototype property|draw_circuit_wires|[[Types/bool|bool]]|true|optional=true}} | |||
{{Prototype property|circuit_connector_sprites|[[Types/CircuitConnectorSprites|CircuitConnectorSprites]]|optional=true}} | |||
Latest revision as of 19:27, 21 January 2022
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/ProgrammableSpeaker
Mandatory properties
This prototype inherits all the properties from Prototype/EntityWithOwner.
energy_source
Type: EnergySource
Must be an electric or void energy source.
energy_usage_per_tick
Type: Energy
sprite
Type: Sprite
maximum_polyphony
Type: uint32
instruments
Type: table
Array of instruments.
An instrument is a table with the following members:
A note is a table with the following members:
Optional properties
audible_distance_modifier
Type: float
Default: 1
circuit_wire_connection_point
Type: WireConnectionPoint
circuit_wire_max_distance
Type: double
Default: 0
draw_copper_wires
Type: bool
Default: true
draw_circuit_wires
Type: bool
Default: true
circuit_connector_sprites
Type: CircuitConnectorSprites