-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeta.lua
More file actions
166 lines (144 loc) · 5.26 KB
/
meta.lua
File metadata and controls
166 lines (144 loc) · 5.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---@meta
---@module "solver/problem_generator"
---@alias FilterType "item"|"fluid"|"recipe"|"machine"|"virtual_material"|"virtual_recipe"|"transfer"
---@alias LimitType "upper"|"lower"|"equal"
---@alias TimeScale "second"|"five_seconds"|"minute"|"ten_minutes"|"hour"|"ten_hours"|"fifty_hours"|"two_hundred_fifty_hours"|"thousand_hours"
---@alias AmountUnit "time"|"belt"|"storage"
---@alias EnergyType "electric"|"burner"|"heat"|"fluid"|"void"
---@alias SolverState integer|"ready"|"finished"|"unfinished"|"unbounded"|"unfeasible"
---@alias Craft LuaItemPrototype|LuaFluidPrototype|LuaRecipePrototype|LuaEntityPrototype|VirtualMaterial|VirtualRecipe
---@alias TypedName { type: FilterType, name: string, quality: string }
---@alias ProductEx Product|VirtualProduct
---@alias IngredientEx Ingredient|VirtualIngredient
---@class EventDataTrait
---@field element LuaGuiElement
---@field mod_name string?
---@field name string | defines.events
---@field player_index integer
---@field tick integer
---@class Storage
---@field players table<integer, PlayerLocalData>
---@field forces table<integer, ForceLocalData>
---@field virtuals Virtuals
__factory_solver__storage = {}
---@class PlayerLocalData
---@field selected_solution string
---@field selected_filter_type FilterType
---@field selected_filter_group table<FilterType, string>
---@field unresearched_craft_visible boolean
---@field hidden_craft_visible boolean
---@field time_scale TimeScale
---@field amount_unit AmountUnit
---@field presets Presets
---@field opened_gui string[]
---@class Presets
---@field fuel table<string, TypedName>
---@field fluid_fuel TypedName
---@field resource table<string, TypedName>
---@field machine table<string, TypedName>
---@class ForceLocalData
---@field relation_to_recipes RelationToRecipes
---@field relation_to_recipes_needs_updating boolean
---@field group_infos GroupInfos
---@field group_infos_needs_updating boolean
---@field solutions table<string, Solution>
---@class RelationToRecipes
---@field enabled_recipe table<string, boolean>
---@field item table<string, RelationToRecipe>
---@field fluid table<string, RelationToRecipe>
---@field virtual_recipe table<string, RelationToRecipe>
---@class RelationToRecipe
---@field craftable_count integer
---@field recipe_for_product string[]
---@field recipe_for_ingredient string[]
---@field recipe_for_fuel string[]
---@class GroupInfos
---@field item table<string, GroupInfo>
---@field fluid table<string, GroupInfo>
---@field recipe table<string, GroupInfo>
---@field virtual_recipe table<string, GroupInfo>
---@class GroupInfo
---@field hidden_count integer
---@field unresearched_count integer
---@field researched_count integer
---@class Solution
---@field name string
---@field constraints Constraint[]
---@field production_lines ProductionLine[]
---@field quantity_of_machines_required table<string, number>
---@field problem Problem?
---@field solver_state SolverState
---@field raw_variables PackedVariables?
---@class Constraint
---@field type FilterType
---@field name string
---@field quality string
---@field limit_type LimitType
---@field limit_amount_per_second number
---@class ProductionLine
---@field recipe_typed_name TypedName
---@field machine_typed_name TypedName
---@field module_typed_names table<string, TypedName>
---@field affected_by_beacons AffectedByBeacon[]
---@field fuel_typed_name TypedName?
---@class AffectedByBeacon
---@field beacon_typed_name TypedName?
---@field beacon_quantity integer
---@field module_typed_names table<string, TypedName>
---@class PackedVariables
---@field x table<string, number>
---@field y table<string, number>
---@field s table<string, number>
---@class NormalizedProductionLine
---@field recipe_typed_name TypedName
---@field products NormalizedAmount[]
---@field ingredients NormalizedAmount[]
---@field power_per_second number
---@field pollution_per_second number
---@class NormalizedAmount
---@field type "item"|"fluid"|"virtual_material"
---@field name string
---@field quality string
---@field amount_per_second number
---@class Virtuals
---@field material table<string, VirtualMaterial>
---@field recipe table<string, VirtualRecipe>
---@field fuel_categories_dictionary table<string, { [string]: true }>
---@class VirtualMaterial
---@field type "virtual_material"
---@field name string
---@field sprite_path string
---@field tooltip LocalisedString?
---@field elem_tooltip ElemID?
---@field order string
---@field group_name string
---@field subgroup_name string
---@class VirtualRecipe
---@field type "virtual_recipe"
---@field name string
---@field sprite_path string
---@field tooltip LocalisedString?
---@field elem_tooltip ElemID?
---@field order string
---@field group_name string
---@field subgroup_name string
---@field products ProductEx[]
---@field ingredients IngredientEx[]
---@field fixed_crafting_machine TypedName?
---@field resource_category string?
---@field crafting_speed_cap number?
---@class VirtualProduct
---@field type "virtual_material"
---@field name string
---@field amount number?
---@field amount_min number?
---@field amount_max number?
---@field probability number
---@field ignored_by_productivity number?
---@field temperature number?
---@class VirtualIngredient
---@field type "virtual_material"
---@field name string
---@field amount number
---@field minimum_temperature number?
---@field maximum_temperature number?