Repository navigation
Expand file tree
/
Copy pathevospace.d.luau
More file actions
4597 lines (4226 loc) · 181 KB
/
Copy pathevospace.d.luau
File metadata and controls
4597 lines (4226 loc) · 181 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- Evospace Lua API 0.22.2: generated from the game's registry dump
export type Biome_spec = {
}
export type BiomeFamily_spec = {
--- Sub-biomes this family selects from
sub_biomes: { Biome }?,
--- Frequency of the sub-biome selection noise
sub_frequency: number?,
--- Amplitude of the coarse domain warp
perturb_amp: number?,
--- Frequency of the coarse domain warp
perturb_frequency: number?,
--- Octave count of the coarse domain warp
perturb_octaves: number?,
--- Amplitude of the fine domain warp
perturb_fine_amp: number?,
--- Frequency of the fine domain warp
perturb_fine_frequency: number?,
}
export type BiomeWorldGenerator_spec = {
--- Global biome family laying out the surface
global_biome: GlobalBiomeFamily?,
--- Block filling the ground below the layered surface
underworld_block: StaticBlock?,
--- Ore deposits this world places; its nearest tier is seeded around the spawn
ore_list: StaticPropList?,
--- Item a drill takes anywhere away from a deposit
stone_source: StaticItem?,
--- Fluid a pump takes anywhere away from a deposit
water_source: StaticItem?,
}
export type Component_spec = {
--- Field name to its type: "integer", "boolean", "item" or "string". Fields go in name order; --!sim sees integer, boolean and item fields as columns, an item as its sim_id
fields: { [string]: string }?,
--- Version of the fields, 1 by default; a save written by a lower version goes through migrate
version: number?,
--- migrate(fields, version) gets the fields a save holds, by name with items as their names, and the version that wrote them; it returns the fields for the current version
migrate: ((...any) -> ...any)??,
}
export type GhostStaticBlock_spec = {
--- BlockLogic class driving the simulation
logic: Class?,
--- Presentation actor class spawned for the block
actor: Class?,
--- Selector widget class
selector: Class?,
--- Mesh tesselator used to render the block
tesselator: Tesselator?,
--- Occupied cells relative to the block origin
sub_blocks: { Vec3i }?,
--- Block local axes that keep their world direction; a turn moving a locked axis is refused
rotation_locks: Vec3i?,
--- Blocks sharing a tag replace each other on build
replace_tag: string?,
--- Block tier used for recipe speed scaling
tier: number?,
--- Block level within its tier
level: number?,
--- Energy drawn per simulation tick
energy_consumption_per_tick: number?,
--- Energy produced per simulation tick
energy_production_per_tick: number?,
--- Resource item drawn by this block
energy_consumption_item: StaticItem?,
--- Resource item produced by this block
energy_production_item: StaticItem?,
--- Effect actor class spawned when the block is destroyed
break_effect: Class?,
--- Called with the block logic of every new block of this type; makes its inventories and accessors
logic_init: ((...any) -> ...any)??,
--- Called with the block actor when it spawns
actor_init: ((...any) -> ...any)??,
--- Tooltip of the block: a string, or a function of the block logic returning one
tooltip: (((...any) -> ...any) | string | nil)?,
--- Components every block of this type keeps: component name to the values a new block starts with; a field left out starts at 0, false, nil or "". Saved with the block and part of the sim state; batch_tick gets them as arrays, BlockLogic.component and get_field read them
components: { [string]: { [any]: any } }?,
--- Called once every sim tick with all placed blocks of this type, in position order: batch_tick(blocks, components, inventories), or batch_tick(n, components, slots, inventories) from a --!sim chunk. components.<Component>.<field> is the array of that field of every block, read back after the call; --!sim gets integer, boolean and item fields as int64 columns, an item as its sim_id, and no string fields. slots.<inventory> holds item and count columns indexed (i-1)*slots+s, taken before the call. inventories maps an inventory name to the array of that inventory of every block. The tables are kept between ticks and change only when a block of the type comes or goes
batch_tick: ((...any) -> ...any)??,
--- Builds the window of a block of this type: window(logic) returns the content widget, and may return a function the window calls every frame while it is open
window: ((...any) -> ...any)??,
--- Cover mesh for the half-height variant
half_cover: StaticCover?,
--- Cover mesh for the center part
center_cover: StaticCover?,
--- Cover mesh for the block body
body_cover: StaticCover?,
--- Logic export signals published by this block type
export_options: { LogicExportOption }?,
--- Logic import signals accepted by this block type
import_options: { LogicImportOption }?,
--- Item this object is built from and mined into
item: StaticItem?,
--- Item a build pays and mining returns; nil when the object is not minable
mined_item: StaticItem?,
--- How many of mined_item a build pays and mining returns; zero when the object is not minable
mined_count: number?,
}
export type GlobalBiomeFamily_spec = {
--- Sub-biomes this family selects from
sub_biomes: { Biome }?,
--- Frequency of the sub-biome selection noise
sub_frequency: number?,
--- Amplitude of the coarse domain warp
perturb_amp: number?,
--- Frequency of the coarse domain warp
perturb_frequency: number?,
--- Octave count of the coarse domain warp
perturb_octaves: number?,
--- Amplitude of the fine domain warp
perturb_fine_amp: number?,
--- Frequency of the fine domain warp
perturb_fine_frequency: number?,
}
export type HeightGenerator_spec = {
}
export type ItemGroup_spec = {
--- Items that satisfy the group, in the order a craft takes them
members: { StaticItem }?,
--- Item image in UI
image: Texture2D?,
--- Icon path relative to the owning mod folder
image_path: string?,
--- Size of item stack
stack_size: number?,
--- Item unlock tier
tier: number?,
--- What the item is: "solid", "fluid" or "abstract"
type: string?,
--- multiplier for UI
unit_mul: number?,
--- Mesh for item rendering in world
mesh: StaticMesh?,
--- Buildable object pointer for this item
block: StaticBlock?,
--- Is item instance contains CustomData
custom_data: boolean?,
--- Class for item while in hand
logic: Class?,
--- Space separated search tags
tags: string?,
--- In-game database category
category: string?,
--- Equipment slot this item fits (Jetpack, Light)
equipment_slot: string?,
--- Localized item name
label: Loc?,
--- Localized description paragraphs
description_parts: { Loc }?,
}
export type LogicExportOption_spec = {
--- Signal item this option exports
signal: StaticItem?,
--- Whether the GUI row shows a signal slot
use_signal: boolean?,
--- Initial checkbox state in the GUI
enabled: boolean?,
--- Localized row name
label: Loc?,
--- Localized row tooltip
tooltip: Loc?,
}
export type LogicImportOption_spec = {
--- Signal item this option imports
signal: StaticItem?,
--- Whether the GUI row shows a signal slot
use_signal: boolean?,
--- Initial checkbox state in the GUI
enabled: boolean?,
--- Localized row name
label: Loc?,
--- Localized row tooltip
tooltip: Loc?,
}
export type LuaWorldGenerator_spec = {
--- Biome family selecting the surface biome
biome_family: BiomeFamily?,
--- Height generator for the terrain surface
height: HeightGenerator?,
--- Ore deposits this world places; its nearest tier is seeded around the spawn
ore_list: StaticPropList?,
--- Item a drill takes anywhere away from a deposit
stone_source: StaticItem?,
--- Fluid a pump takes anywhere away from a deposit
water_source: StaticItem?,
}
export type NoiseGenerator_spec = {
--- Lower bound of the remapped noise range
min: number?,
--- Upper bound of the remapped noise range
max: number?,
}
export type Prototype_spec = {
}
export type Recipe_spec = {
--- *Craft time* in engine ticks
ticks: number?,
--- Currently locked if **true**
locked: boolean?,
--- Percentage bonus (e.g. `20` = +20 %)
productivity: number?,
--- Item whose image and name stand for this recipe in the crafting UI; when the mods finish loading, a recipe without one takes its first output, else its first input
icon: StaticItem?,
--- Recipe tier used for speed scaling: every tier **above** its dictionary's `start_tier` doubles craft time; below it the recipe is clamped to `start_tier`.
tier: number?,
--- The dictionary's `start_tier`, copied to every recipe in it when the mods finish loading.
start_tier: number?,
}
export type RecipeDictionary_spec = {
--- Machine-unlock tier shared by every recipe in the dictionary
start_tier: number?,
}
export type Setting_spec = {
--- Changing this setting requires a restart
restart: boolean?,
--- Called with the new value when the setting changes
set_action: ((...any) -> ...any)?,
--- Localization key of the displayed name
label: string?,
--- Widget type used to edit the setting
type: string?,
--- Settings category this entry belongs to
category: string?,
--- Current value: a boolean for Bool, an integer for Slider and Int, a string for String and Buttons
value: (boolean | number | string | nil)?,
--- Default value, of the same kind as value
default: (boolean | number | string | nil)?,
--- Values a String or Buttons setting offers
options: { string }?,
--- Lower bound of a Slider or Int value
min: number?,
--- Upper bound of a Slider or Int value
max: number?,
--- Input action bound to this setting
key_binding: string?,
--- Default keystroke, e.g. Ctrl+Shift+F
default_key: string?,
--- Called with this setting when the bound key goes down; only for a key_binding of this mod's own
key_action: ((...any) -> ...any)?,
}
export type StaticAchievement_spec = {
--- Progress added by the last increment
delta: number?,
--- Accumulated progress
total: number?,
--- Progress required to unlock
threshold: number?,
--- Whether the achievement is unlocked
unlocked: boolean?,
--- Game time of the unlock
unlocked_time: number?,
--- Achievement icon
image: Texture2D?,
--- Steam achievement id
steam_key: string?,
--- Localized name
label: Loc?,
--- Localized description
description: Loc?,
}
export type StaticBlock_spec = {
--- BlockLogic class driving the simulation
logic: Class?,
--- Presentation actor class spawned for the block
actor: Class?,
--- Selector widget class
selector: Class?,
--- Mesh tesselator used to render the block
tesselator: Tesselator?,
--- Occupied cells relative to the block origin
sub_blocks: { Vec3i }?,
--- Block local axes that keep their world direction; a turn moving a locked axis is refused
rotation_locks: Vec3i?,
--- Blocks sharing a tag replace each other on build
replace_tag: string?,
--- Block tier used for recipe speed scaling
tier: number?,
--- Block level within its tier
level: number?,
--- Energy drawn per simulation tick
energy_consumption_per_tick: number?,
--- Energy produced per simulation tick
energy_production_per_tick: number?,
--- Resource item drawn by this block
energy_consumption_item: StaticItem?,
--- Resource item produced by this block
energy_production_item: StaticItem?,
--- Effect actor class spawned when the block is destroyed
break_effect: Class?,
--- Called with the block logic of every new block of this type; makes its inventories and accessors
logic_init: ((...any) -> ...any)??,
--- Called with the block actor when it spawns
actor_init: ((...any) -> ...any)??,
--- Tooltip of the block: a string, or a function of the block logic returning one
tooltip: (((...any) -> ...any) | string | nil)?,
--- Components every block of this type keeps: component name to the values a new block starts with; a field left out starts at 0, false, nil or "". Saved with the block and part of the sim state; batch_tick gets them as arrays, BlockLogic.component and get_field read them
components: { [string]: { [any]: any } }?,
--- Called once every sim tick with all placed blocks of this type, in position order: batch_tick(blocks, components, inventories), or batch_tick(n, components, slots, inventories) from a --!sim chunk. components.<Component>.<field> is the array of that field of every block, read back after the call; --!sim gets integer, boolean and item fields as int64 columns, an item as its sim_id, and no string fields. slots.<inventory> holds item and count columns indexed (i-1)*slots+s, taken before the call. inventories maps an inventory name to the array of that inventory of every block. The tables are kept between ticks and change only when a block of the type comes or goes
batch_tick: ((...any) -> ...any)??,
--- Builds the window of a block of this type: window(logic) returns the content widget, and may return a function the window calls every frame while it is open
window: ((...any) -> ...any)??,
--- Cover mesh for the half-height variant
half_cover: StaticCover?,
--- Cover mesh for the center part
center_cover: StaticCover?,
--- Cover mesh for the block body
body_cover: StaticCover?,
--- Logic export signals published by this block type
export_options: { LogicExportOption }?,
--- Logic import signals accepted by this block type
import_options: { LogicImportOption }?,
--- Item this object is built from and mined into
item: StaticItem?,
--- Item a build pays and mining returns; nil when the object is not minable
mined_item: StaticItem?,
--- How many of mined_item a build pays and mining returns; zero when the object is not minable
mined_count: number?,
}
export type StaticChapter_spec = {
--- Localized chapter title
label: Loc?,
--- Quests belonging to this chapter
quests: { StaticQuest }?,
--- Quests that must be completed before the chapter becomes available
required_quests: { StaticQuest }?,
--- Whether the chapter is available in the current save
unlocked: boolean?,
--- Called when the chapter unlocks
on_unlock: ((...any) -> ...any)??,
--- Called when every quest is completed
on_complete: ((...any) -> ...any)??,
}
export type StaticCover_spec = {
}
export type StaticCoverSet_spec = {
--- Allowed cover designs
covers: { StaticCover }?,
}
export type StaticItem_spec = {
--- Item image in UI
image: Texture2D?,
--- Icon path relative to the owning mod folder
image_path: string?,
--- Size of item stack
stack_size: number?,
--- Item unlock tier
tier: number?,
--- What the item is: "solid", "fluid" or "abstract"
type: string?,
--- multiplier for UI
unit_mul: number?,
--- Mesh for item rendering in world
mesh: StaticMesh?,
--- Buildable object pointer for this item
block: StaticBlock?,
--- Is item instance contains CustomData
custom_data: boolean?,
--- Class for item while in hand
logic: Class?,
--- Space separated search tags
tags: string?,
--- In-game database category
category: string?,
--- Equipment slot this item fits (Jetpack, Light)
equipment_slot: string?,
--- Localized item name
label: Loc?,
--- Localized description paragraphs
description_parts: { Loc }?,
}
export type StaticItemPanel_spec = {
--- Items this panel is shown for
items: { StaticItem }?,
--- Item category this panel is shown for
category: string?,
--- Sort order among the panels of one item
order: number?,
--- Panel widget class path; empty means build draws the panel
widget: string?,
--- Called with the item and the panel each time the panel is shown; returns the ui.Widget it draws, nil hides the panel
build: ((...any) -> ...any)??,
--- Localized panel title
label: Loc?,
--- Localized body paragraphs
description_parts: { Loc }?,
--- Inventory of items shown under the text
context: AutosizeInventory?,
}
export type StaticModifier_spec = {
}
export type StaticObject_spec = {
--- Item this object is built from and mined into
item: StaticItem?,
--- Item a build pays and mining returns; nil when the object is not minable
mined_item: StaticItem?,
--- How many of mined_item a build pays and mining returns; zero when the object is not minable
mined_count: number?,
}
export type StaticOreVein_spec = {
--- Rock the vein replaces and the ore it leaves there
targets: { OreVeinTarget }?,
--- Number of blobs strung along the vein
size: number?,
--- Veins tried per column
count: number?,
--- A column gets the veins with chance 1 / rarity
rarity: number?,
--- Lowest vein centre, world block height
min_height: number?,
--- Highest vein centre, world block height
max_height: number?,
--- Heights peak in the middle of the range instead of spreading evenly
trapezoid: boolean?,
--- Width of the flat top of the trapezoid
plateau: number?,
--- Chance an ore cell next to air stays rock
discard_on_air_exposure: number?,
}
export type StaticPlanet_spec = {
--- Simulation ticks per full local day
day_length_ticks: number?,
--- Added to the phase after day wrap
phase_offset_ticks: number?,
--- Day phase of the dawn anchor
dawn_phase_ticks: number?,
--- Day phase of the solar noon anchor
solar_noon_phase_ticks: number?,
--- Day phase of the sunset anchor
sunset_phase_ticks: number?,
--- Observer latitude used by the solar model
latitude_deg: number?,
--- Day of the tropical year fixing solar declination
day_of_year: number?,
--- Calmest point the weather cycle reaches, from 0 clear sky to 1 full storm
weather_severity_min: number?,
--- Stormiest point the weather cycle reaches, from 0 clear sky to 1 full storm
weather_severity_max: number?,
--- Radius of the body seen from space, 0 for a body never seen from orbit
radius_meters: number?,
--- Height of a platform orbit above the surface
orbit_altitude_meters: number?,
--- World generator of the surface, empty for the generator chosen for the save
generator_name: string?,
--- Music playlist key played while the surface is shown
music_playlist: string?,
}
export type StaticPlayer_spec = {
--- Recipes the player crafts in hand
hand_recipes: RecipeDictionary?,
--- Items put on the first hotbar row of a new player
hotbar: { StaticItem }?,
--- Tools always in hand; the three tool keys take the first three
tools: { StaticItem }?,
--- Item whose logic lights the empty light slot
light: StaticItem?,
--- Item that carries a captured blueprint
blueprint_item: StaticItem?,
--- Items a new player receives
start_inventory: Inventory?,
--- Researches completed when a world starts
start_researches: { StaticResearch }?,
}
export type StaticProp_spec = {
--- How strongly the prop follows the terrain slope
project_to_terrain_power: number?,
--- Height offset added after terrain projection
additive_elevation: number?,
--- Prop view distance as a multiple of the decoration range setting; 0 is never culled
range_mul: number?,
--- Lowest surface height in blocks accepting this prop
surface_height_min: number?,
--- Highest surface height in blocks accepting this prop
surface_height_max: number?,
--- Highest column top in blocks accepting this prop
top_height_max: number?,
--- Prop keeps its height instead of sitting on the surface
floating: boolean?,
--- Prop spans more than one cell and is placed sparsely
is_big: boolean?,
--- Prop is streamed with the sector instead of being baked
streamed: boolean?,
--- Mesh rendered for this prop
mesh: StaticMesh?,
--- Prop is walked through
no_collision: boolean?,
--- Prop emits light
is_emitting: boolean?,
--- Prop may cast high-detail shadows
high_detail_shadow: boolean?,
--- Called with the block position when the prop is spawned
on_spawn: ((...any) -> ...any)?,
--- Number of hits to break
hits_to_break: number?,
--- Effect actor class spawned when the prop breaks
break_effect: Class?,
--- Effect actor class spawned on a non-fatal hit
damage_effect: Class?,
--- Closing speed in cm/s at which a vehicle breaks through the prop; 0 makes the prop a solid obstacle
vehicle_break_speed: number?,
--- Actor class spawned instead of an instanced mesh
actor_class: Class?,
--- Item this object is built from and mined into
item: StaticItem?,
--- Item a build pays and mining returns; nil when the object is not minable
mined_item: StaticItem?,
--- How many of mined_item a build pays and mining returns; zero when the object is not minable
mined_count: number?,
}
export type StaticPropList_spec = {
--- Prop tiers owned by this list
data: { PropListData }?,
}
export type StaticQuest_spec = {
--- Localized quest title
label: Loc?,
--- Localized description paragraphs
description_parts: { Loc }?,
--- Inventory of items shown next to the description
context: AutosizeInventory?,
--- Chapter this quest belongs to
chapter: StaticChapter?,
--- Quests that must be completed first
required_quests: { StaticQuest }?,
--- Complete on any one objective instead of all of them
any_objective: boolean?,
--- Current state: locked, active or completed
state: number?,
--- Table of event handlers keyed by event id
events: { [any]: any }??,
--- Called when the quest becomes active
on_unlock: ((...any) -> ...any)??,
--- Called when the quest is completed
on_complete: ((...any) -> ...any)??,
--- Objectives of this quest
objectives: { QuestObjective }?,
}
export type StaticResearch_spec = {
--- Localized research name
label: Loc?,
--- Localized description paragraphs
description_parts: { Loc }?,
--- Science the research costs to complete
complexity: number?,
--- Level reached by an upgrade research, 0 for a node completed once
level: number?,
--- Progression tier the research belongs to
tier: number?,
--- Researches that must be complete before this one opens
required_research: { StaticResearch }?,
}
export type StaticResearchBonusInventory_spec = {
--- Localized research name
label: Loc?,
--- Localized description paragraphs
description_parts: { Loc }?,
--- Science the research costs to complete
complexity: number?,
--- Level reached by an upgrade research, 0 for a node completed once
level: number?,
--- Progression tier the research belongs to
tier: number?,
--- Researches that must be complete before this one opens
required_research: { StaticResearch }?,
}
export type StaticResearchDecorationUnlock_spec = {
--- Localized research name
label: Loc?,
--- Localized description paragraphs
description_parts: { Loc }?,
--- Science the research costs to complete
complexity: number?,
--- Level reached by an upgrade research, 0 for a node completed once
level: number?,
--- Progression tier the research belongs to
tier: number?,
--- Researches that must be complete before this one opens
required_research: { StaticResearch }?,
}
export type StaticResearchEfficiency_spec = {
--- Localized research name
label: Loc?,
--- Localized description paragraphs
description_parts: { Loc }?,
--- Science the research costs to complete
complexity: number?,
--- Level reached by an upgrade research, 0 for a node completed once
level: number?,
--- Progression tier the research belongs to
tier: number?,
--- Researches that must be complete before this one opens
required_research: { StaticResearch }?,
}
export type StaticResearchModifier_spec = {
--- Modifier prototype affected by this research
modifier: StaticModifier?,
--- Value added to the modifier on completion
bonus_value: number?,
--- Localized research name
label: Loc?,
--- Localized description paragraphs
description_parts: { Loc }?,
--- Science the research costs to complete
complexity: number?,
--- Level reached by an upgrade research, 0 for a node completed once
level: number?,
--- Progression tier the research belongs to
tier: number?,
--- Researches that must be complete before this one opens
required_research: { StaticResearch }?,
}
export type StaticResearchRecipe_spec = {
--- Localized research name
label: Loc?,
--- Localized description paragraphs
description_parts: { Loc }?,
--- Science the research costs to complete
complexity: number?,
--- Level reached by an upgrade research, 0 for a node completed once
level: number?,
--- Progression tier the research belongs to
tier: number?,
--- Researches that must be complete before this one opens
required_research: { StaticResearch }?,
}
export type StaticResearchToolUnlock_spec = {
--- Localized research name
label: Loc?,
--- Localized description paragraphs
description_parts: { Loc }?,
--- Science the research costs to complete
complexity: number?,
--- Level reached by an upgrade research, 0 for a node completed once
level: number?,
--- Progression tier the research belongs to
tier: number?,
--- Researches that must be complete before this one opens
required_research: { StaticResearch }?,
}
export type StaticStructure_spec = {
--- Callback invoked to emit the structure
generate: ((...any) -> ...any)?,
--- Footprint of the structure in blocks
size: Vec2i?,
}
export type StaticTip_spec = {
--- Localized title
label: Loc?,
--- Localized body paragraphs
description_parts: { Loc }?,
--- Illustration path relative to the owning mod folder
image: string?,
--- Inventory of items shown next to the text
context: AutosizeInventory?,
--- Tip this entry is nested under in the list
parent: StaticTip?,
}
export type StaticWeather_spec = {
--- Cloud coverage the sky is set to, 0..10
cloud_coverage: number?,
--- Thunder and lightning the sky is set to, 0..10
thunder: number?,
--- Fog amount the sky is set to, 0..10
fog: number?,
}
export type Tesselator_spec = {
}
export type TesselatorCube_spec = {
}
export type TesselatorMarching_spec = {
}
export type WorldGenerator_spec = {
--- Ore deposits this world places; its nearest tier is seeded around the spawn
ore_list: StaticPropList?,
--- Item a drill takes anywhere away from a deposit
stone_source: StaticItem?,
--- Fluid a pump takes anywhere away from a deposit
water_source: StaticItem?,
}
export type ui_Border_props = {
--- The child, also given as the first list item
content: ui_Widget??,
--- Plate the game draws behind the child: "panel", "window", "frame", "field", "plate" or "none"
style: string?,
--- Tint of the plate, same forms as ui.Text color; on "plate" it is the fill itself, a faint light one when empty
color: string?,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_Button_props = {
--- The child, also given as the first list item
content: ui_Widget??,
--- Called with no arguments when the player clicks the button
on_click: ((...any) -> ...any)??,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_Grid_props = {
--- Cells per row, at least one
columns: number?,
--- Space kept between cells in slate units
gap: number?,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_HBox_props = {
--- Space kept between children in slate units
gap: number?,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_Image_props = {
--- Texture drawn, an item image, a ui.texture or a ui.thumbnail; nil draws nothing and keeps the space
image: Texture?,
--- Width and height at once, for a square picture; reads the width
size: number?,
--- Clockwise turn of the picture about its centre in degrees; the space it takes stays in place
angle: number?,
--- Tint multiplied into the texture, same forms as ui.Text color
color: string?,
--- Part of the texture drawn, { u0, v0, u1, v1 } from 0 to 1 across and down; the part fills the picture's width and height. Reads { 0, 0, 1, 1 } for the whole texture
uv: { number }?,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_Inventory_props = {
--- Inventory shown; nil or an empty one hides the grid
inventory: InventoryAccess?,
--- True draws the item counts in the slots
numbers: boolean?,
--- Slots per row, at least one
columns: number?,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_Scroll_props = {
--- Space kept between children in slate units
gap: number?,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_Spacer_props = {
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_Text_props = {
--- Source UTF-8 text, tokens and tags unexpanded
text: string?,
--- Font size in slate units
font_size: number?,
--- Where the lines sit: "left", "center" or "right"
align: string?,
--- Color of the text outside tinted runs: "#rrggbb", "#rrggbbaa" or a game color, "primary", "dim", "accent", "accent_light", "warning", "white"
color: string?,
--- True, the default, breaks long lines at the width the text is given; false keeps one line
wrap: boolean?,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_TextBox_props = {
--- Current UTF-8 text
text: string?,
--- Greyed text shown while the field is empty
hint: string?,
--- Called with the text after every edit the player makes
on_changed: ((...any) -> ...any)??,
--- Called with the text when the player presses Enter
on_commit: ((...any) -> ...any)??,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_VBox_props = {
--- Space kept between children in slate units
gap: number?,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,
--- Where the widget sits across the width its parent gives it: "fill", "left", "center" or "right"; unset is "fill", or "left" when the width is fixed
halign: string?,
--- Where the widget sits across the height its parent gives it: "fill", "top", "center" or "bottom"; unset is "fill", or "top" when the height is fixed
valign: string?,
[number]: ui_Widget,
}
export type ui_Window_props = {
--- The child, also given as the first list item
content: ui_Widget??,
--- Text shown in the title bar
title: string?,
--- Screen edge the window keeps to across: "left", "center" or "right"
anchor_x: string?,
--- Screen edge the window keeps to down: "top", "center" or "bottom"
anchor_y: string?,
--- Distance from the anchor across in slate units; dragging the window changes it
offset_x: number?,
--- Distance from the anchor down in slate units; dragging the window changes it
offset_y: number?,
--- True gives the window the cursor and the keyboard while the game keeps running
input: boolean?,
--- Hidden widgets keep their place in the tree and take no input
visible: boolean?,
--- Share of the free space this widget takes along an HBox or VBox; zero keeps it at the size of its content
fill: number?,
--- Fixed width in slate units; zero lets the content decide
width: number?,
--- Fixed height in slate units; zero lets the content decide
height: number?,
--- Space between the edge of the widget and its content: one number for every side, { horizontal, vertical } or { left, top, right, bottom }; reads as the four sides
padding: (number | { number })?,