import * as M from "./lua-api/models.ts"; import type { Group } from "./helpers/groups.helper.ts"; import type { Recipe } from "./helpers/recipes.helper.ts"; export interface ModList { mods: { name: string; enabled: boolean }[]; } export type EffectType = "speed" | "productivity" | "consumption" | "pollution" | "quality"; export const allEffects: EffectType[] = ["consumption", "speed", "productivity", "pollution", "quality"]; export interface Locale { names: Record; } export type Item = { name: string; icon?: string; hidden: boolean; subgroup: string; order?: string; }; export type Machine = { name: string; icon?: string; allowed_effects?: string | Array; crafting_categories: string[]; crafting_speed: number; selection_box?: M.BoundingBox; module_slots?: number; effect_receiver?: M.EffectReceiver; }; export type Module = { name: string; icon?: string; subgroup?: string; category: string; tier: number; order?: string; effect?: M.Effect; }; export type Beacon = { name: string; icon?: string; subgroup?: string; module_slots: number; /** The types of [modules](prototype:ModulePrototype) that a player can place inside of the beacon. */ allowed_effects?: M.EffectTypeLimitation; /** Extra multiplier applied to the effects received from beacon by the effect receiver based on amount of beacons that are in range of that effect receiver. If there are more beacons that reach the effect receiver than there are entries in this array, then the last entry in the array is used for the multiplier. If this is not defined, then an implicit profile of `{1}` will be used. */ profile?: number[]; /** The multiplier of the module's effects, when shared between neighbors. */ distribution_effectivity: number; /** Must be 0 or positive. */ distribution_effectivity_bonus_per_quality_level?: number; }; export type RecipeCategory = { name: string; subgroup?: string; order?: string; }; export type Quality = M.QualityPrototype & { icon: string; }; export type Signal = { name: string; type: string; icon?: string; subgroup: string; order?: string; }; export type ProcessedData = { machines: Machine[]; beacons: Beacon[]; qualityLevels: Quality[]; modules: Module[]; recipeCategories: RecipeCategory[]; recipeGroup: Group[]; signalGroup: Group[]; };