Control Module - vlayer - Adds a virtual layer to store power to save space.
utils.global |
utils.event |
config.vlayer |
get_items() | Get all items in storage, do not modify |
get_unallocated_items() | Get all unallocated items in storage |
get_allocated_items() | Get all allocated items in storage |
get_interface_counts() | Get interface counts |
get_interfaces() | Get interfaces |
allocate_item(item_name, count) | Internal, Allocate items in the vlayer, this will increase the property values of the vlayer such as production and capacity Does not increment item storage, so should not be called before insert_item unless during init Does not validate area requirements, so checks must be performed before calling this function Accepts negative count for deallocating items |
insert_item(item_name, count) | Insert an item into the vlayer, this will increment its count in storage and allocate it if possible |
remove_item(item_name, count) | Remove an item from the vlayer, this will decrement its count in storage and prioritise unallocated items over deallocation Can not always fulfil the remove request for items which provide surface area, therefore returns the amount actually removed |
create_input_interface(surface, position[, player]) | Create a new storage input interface |
create_output_interface(surface, position[, player]) | Create a new storage output interface |
get_statistics() | Get the statistics for the vlayer |
energy_changed(power) | add or reduce vlayer power |
get_circuits() | Circuit signals used for the statistics |
create_circuit_interface(surface, position[, player]) | Create a new circuit interface |
create_energy_interface(surface, position[, player]) | Create a new energy interface |
remove_interface(surface, position) | Remove the entity interface using the given position |
Get all items in storage, do not modify
Returns:Get all unallocated items in storage
Returns:Get all allocated items in storage
Returns:Get interface counts
Returns:Get interfaces
Returns:Internal, Allocate items in the vlayer, this will increase the property values of the vlayer such as production and capacity Does not increment item storage, so should not be called before insert_item unless during init Does not validate area requirements, so checks must be performed before calling this function Accepts negative count for deallocating items
Parameters:Insert an item into the vlayer, this will increment its count in storage and allocate it if possible
Parameters:Remove an item from the vlayer, this will decrement its count in storage and prioritise unallocated items over deallocation Can not always fulfil the remove request for items which provide surface area, therefore returns the amount actually removed
Parameters:Create a new storage input interface
Parameters:Create a new storage output interface
Parameters:Get the statistics for the vlayer
add or reduce vlayer power
Parameters:Circuit signals used for the statistics
Create a new circuit interface
Parameters:Create a new energy interface
Parameters:Remove the entity interface using the given position
Parameters: