StdLib.Data.EquipmentGrid
Wrapper for Factorio equipment-grid prototypes.
Methods17
function EquipmentGrid.__call(name: string) -> grid StdLib.Data.EquipmentGrid
Looks up and wraps an equipment grid by name.
namestringEquipment-grid prototype name
function EquipmentGrid.update_width(width: integer) -> updated boolean
Sets the equipment grid's width.
widthintegerGrid width
updatedbooleanWhether the equipment grid was valid and updated
function EquipmentGrid.update_height(height: integer) -> updated boolean
Sets the equipment grid's height.
heightintegerGrid height
updatedbooleanWhether the equipment grid was valid and updated
function EquipmentGrid.update_size(width: integer, height: integer) -> updated boolean
Sets the equipment grid's width and height.
widthintegerGrid width
heightintegerGrid height
updatedbooleanWhether the equipment grid was valid and updated
function EquipmentGrid.set_category(category_name: string) -> self
Replaces the equipment categories accepted by this grid with one category.
category_namestringEquipment category name
- self
function EquipmentGrid.set_cat(category_name: string) -> self
category_namestringEquipment category name
- self
function EquipmentGrid.set_categories(category_list: string[]) -> self
Replaces the equipment categories accepted by this grid.
category_liststring[]Equipment categories
- self
function EquipmentGrid.set_cats(category_list: string[]) -> self
category_liststring[]Equipment categories
- self
function EquipmentGrid.add_category(category_name: string) -> self
Adds one equipment category.
category_namestringEquipment category name
- self
function EquipmentGrid.add_cat(category_name: string) -> self
category_namestringEquipment category name
- self
function EquipmentGrid.add_categories(category_list: string[]) -> self
Adds multiple equipment categories.
category_liststring[]Equipment categories
- self
function EquipmentGrid.add_cats(category_list: string[]) -> self
category_liststring[]Equipment categories
- self
function EquipmentGrid.remove_category(category_name: string) -> self
Removes one equipment category.
category_namestringEquipment category name
- self
function EquipmentGrid.rem_cat(category_name: string) -> self
category_namestringEquipment category name
- self
function EquipmentGrid.rem_category(category_name: string) -> self
category_namestringEquipment category name
- self
function EquipmentGrid.remove_categories(category_list: string[]) -> self
Removes multiple equipment categories.
category_liststring[]Equipment categories
- self
function EquipmentGrid.rem_cats(category_list: string[]) -> self
category_liststring[]Equipment categories
- self
Fields6
EquipmentGrid.width : integer
EquipmentGrid.height : integer
EquipmentGrid.equipment_categories : string[]
EquipmentGrid.locked : nil | boolean
EquipmentGrid.__class: string = "EquipmentGrid"
EquipmentGrid.__index : unknown