utils/data
Type Aliases
ConcretePrototype
type ConcretePrototype<T> = T extends unknown ? string extends keyof T ? never : T : never;Defined in: utils/data.ts:9
Filters out prototype definitions that have arbitrary string index signatures (like GuiStyle or MapGenPresets), leaving ONLY concrete, strongly-typed game prototypes.
Type Parameters
| Type Parameter |
|---|
T |
AnyGamePrototype
type AnyGamePrototype = ConcretePrototype<Color>;Defined in: utils/data.ts:14
Union of all concrete Factorio prototypes (excluding open-ended index tables like GuiStyle).
Functions
copyPrototype()
function copyPrototype<T>( prototype: T, new_name: string, remove_icon?: boolean): T;Defined in: utils/data.ts:20
Deep clones a prototype, assigning a new name and updating references (minable results, place_results, recipe results, etc.).
Type Parameters
| Type Parameter |
|---|
T extends never |
Parameters
| Parameter | Type |
|---|---|
prototype | T |
new_name | string |
remove_icon? | boolean |
Returns
T
unlockRecipeWithTechnology()
function unlockRecipeWithTechnology(recipe_name: string, technology_name: string): void;Defined in: utils/data.ts:52
Safely adds an unlock-recipe modifier effect to a research technology.
Parameters
| Parameter | Type |
|---|---|
recipe_name | string |
technology_name | string |
Returns
void