forked from FAForever/fa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sim.lua
1244 lines (1079 loc) · 33.1 KB
/
Sim.lua
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
---@meta
---@diagnostic disable: lowercase-global
---@class SimCommand
-- TODO : Needs Definision
---@alias TerrainType any
---@alias Task table
---@alias CSimSoundManager any
---@alias EconomyEvent moho.EconomyEvent
---@alias AIPersonality string
---@alias ArmyPlans any
---@alias Faction
---| 0 # UEF
---| 1 # Aeon
---| 2 # Cybran
---| 3 # Seraphim
---| 4 # (Nomads if enabled)
---@alias Object Blip | CollisionBeam | Entity | Prop | Projectile | Unit
---@alias ReclaimableObject Prop | Unit
---@alias BoneObject Projectile | Prop | Unit
--- Restricts the army from building the unit category
---@param army Army
---@param category EntityCategory
function AddBuildRestriction(army, category)
end
--- It is unknown what this function does or where it gets its value from
---@param army Army
---@deprecated
function ArmyGetHandicap(army)
end
--- Initialises the prebuilt units of an army via `AiBrain.OnSpawnPreBuiltUnits`
---@param army Army
function ArmyInitializePrebuiltUnits(army)
end
--- Returns if the indicated army is a civilian army
---@param army Army
---@return boolean
function ArmyIsCivilian(army)
end
--- Returns true if the indicated army has been defeated
---@param army Army
function ArmyIsOutOfGame(army)
end
--- Attaches a beam between two entities
---@param entityA BoneObject
---@param boneA Bone
---@param entityB BoneObject
---@param boneB Bone
---@param army number
---@param texture string
---@return moho.IEffect
function AttachBeamEntityToEntity(entityA, boneA, entityB, boneB, army, texture)
end
--- Attaches a beam to an entity
---@param emitter moho.IEffect
---@param entity BoneObject
---@param bone Bone
---@param army Army
---@return moho.IEffect
function AttachBeamToEntity(emitter, entity, bone, army)
end
--- Changes the army of a unit, returning a new unit. By default the ACU can not be shared
---@param unit Unit
---@param army Army
---@param noRestrictions? boolean
---@return Unit
function ChangeUnitArmy(unit, army, noRestrictions)
end
--- Returns true if cheats are enabled, logs the cheat attempt no matter what
---@return boolean
function CheatsEnabled()
end
--- It is not known what this does or what its parameters are
---@deprecated
function CoordinateAttacks()
end
--- Creates a bone manipulator for a weapon, allowing it to aim at a target
---@param weapon Weapon
---@param label string
---@param turretBone Bone
---@param barrelBone? Bone
---@param muzzleBone? Bone
---@return moho.AimManipulator
function CreateAimController(weapon, label, turretBone, barrelBone, muzzleBone)
end
--- Creates a bone manipulator for a unit, allowing it to be animated
---@param object BoneObject
---@return moho.manipulator_methods
function CreateAnimator(object)
end
--- Creates a beam that is attached to an entity
---@param object BoneObject
---@param bone Bone
---@param army Army
---@param length number
---@param thickness number
---@param beamBlueprint string
---@return moho.IEffect
function CreateAttachedBeam(object, bone, army, length, thickness, beamBlueprint)
end
--- Creates an emitter that is attached to an entity
---@see CreateEmitterAtBone() or CreateEmitterAtEntity() # Alternative functions where the emitter spawns at the entity / bone, but is not attached
---@param object BoneObject
---@param bone Bone
---@param army Army
---@param emitterBlueprint string
---@return moho.IEffect
function CreateAttachedEmitter(object, bone, army, emitterBlueprint)
end
--- Creates a beam, which then needs to be attached to a bone
---@see AttachBeamToEntity() # Attaches the beam to a bone
---@param blueprint string
---@param army Army
---@return moho.IEffect
function CreateBeamEmitter(blueprint, army)
end
--- Creates a beam and attaches it to an entity, usually used for weaponry
---@param object BoneObject
---@param tobone Bone
---@param army Army
---@param blueprint string
---@return moho.IEffect
function CreateBeamEmitterOnEntity(object, tobone, army, blueprint)
end
--- Creates a beam between two entities
---@param object BoneObject
---@param bone Bone
---@param other Entity
---@param otherBone Bone
---@param army Army
---@param blueprint string
---@return moho.CollisionBeamEntity
function CreateBeamEntityToEntity(object, bone, other, otherBone, army, blueprint)
end
--- ???
---@param object BoneObject
---@param bone Bone
---@param other Entity
---@param otherBone Bone
---@param army Army
---@param thickness number
---@param texture string
---@return moho.CollisionBeamEntity
function CreateBeamToEntityBone(object, bone, other, otherBone, army, thickness, texture)
end
--- Creates a builder arm controller that aims for the unit that is being built, repaired or reclaimed.
--- Similar to an aim controller for weapons.
---@param unit Unit
---@param turretBone Bone
---@param barrelBone Bone
---@param aimBone Bone
---@return moho.BuilderArmManipulator
function CreateBuilderArmController(unit, turretBone, barrelBone, aimBone)
end
--- Creates a collision detection manipulator, calls the function `self:OnAnimTerrainCollision(bone, x, y, z)`
--- when a bone that is being watched collides with the terrain
---@param unit Unit
---@return moho.CollisionManipulator
function CreateCollisionDetector(unit)
end
--- Creates a decal with supplied parameters, the decal is visible through the fog
---@param position Vector
---@param heading Vector
---@param textureName1 string
---@param textureName2 string
---@param type string
---@param sizeX number size on x axis in game units
---@param sizeZ number size on y axis in game units
---@param lodParam number distance in game units before the decals disappear
---@param duration number lifetime of the decal in seconds, 0 for infinite
---@param army Army
---@param fidelity? number
---@return moho.CDecalHandle
function CreateDecal(position, heading, textureName1, textureName2, type, sizeX, sizeZ, lodParam, duration, army, fidelity)
end
--- Creates an economy event for the unit that consumes resources over given time.
--- The unit shows the orange build bar for this event.
---@param unit Unit
---@param totalEnergy number
---@param totalMass number
---@param timeInSeconds number
---@return EconomyEvent
function CreateEconomyEvent(unit, totalEnergy, totalMass, timeInSeconds)
end
--- Creates an emitter at an object's bone, but does not attach the emitter to it
---@see CreateEmitterAtEntity() # at-object version
---@see CreateEmitterOnEntity() # on-object version
---@param object BoneObject
---@param army Army
---@param emitterBlueprint string
---@return moho.IEffect
function CreateEmitterAtBone(object, bone, army, emitterBlueprint)
end
--- Creates an emitter at an object, but does not attach the emitter to it
---@see CreateEmitterAtBone() # at-bone version
---@see CreateEmitterOnEntity() # on-object version
---@param object BoneObject
---@param army Army
---@param emitterBlueprint string
---@return moho.IEffect
function CreateEmitterAtEntity(object, army, emitterBlueprint)
end
--- Creates an emitter on an object and attaches the emitter to it
---@see CreateEmitterAtBone() # at-bone version
---@see CreateEmitterAtEntity() # at-object version
---@param object BoneObject
---@param army Army
---@param emitterBlueprint string
---@return moho.IEffect
function CreateEmitterOnEntity(object, army, emitterBlueprint)
end
--- Prevents a bone from going through the terrain, useful for units that walk
---@param unit Unit
---@param footBone Bone
---@param kneeBone Bone
---@param hipBone Bone
---@param straightLegs? boolean
---@param maxFootFall? number
---@return moho.FootPlantManipulator
function CreateFootPlantController(unit, footBone, kneeBone, hipBone, straightLegs, maxFootFall)
end
--- Spawns initial unit for the given army
---@param army Army
---@param unitId string
---@return Unit
function CreateInitialArmyUnit(army, unitId)
end
--- Creates a light particle that provides vision, is often used in combination with effects
---@see CreateLightParticleIntel() # intel-giving version
---@param object BoneObject
---@param bone Bone
---@param army Army
---@param size number
---@param lifetime number
---@param texture string
---@param rampName string
function CreateLightParticle(object, bone, army, size, lifetime, texture, rampName)
end
--- Creates a light particle, is often used in combination with effects
---@see CreateLightParticle() # non intel-giving version
---@param object BoneObject
---@param bone Bone
---@param army Army
---@param size number
---@param lifetime number
---@param texture string
---@param rampName string
function CreateLightParticleIntel(object, bone, army, size, lifetime, texture, rampName)
end
--- Spawns a prop, using the default orientation
---@see CreatePropHPR() # heading-pitch-roll version
---@param location Vector
---@param blueprintId string
---@return Prop
function CreateProp(location, blueprintId)
end
--- Spawns a prop with control over orientation
---@see CreateProp() # simple version
---@param blueprintPath string full path to the prop's blueprint
---@param x number
---@param y number
---@param z number
---@param heading number
---@param pitch number
---@param roll number
---@return Prop
function CreatePropHPR(blueprintPath, x, y, z, heading, pitch, roll)
end
--- Spawns mass and hydro deposits on the map
---@param type "Mass" | "Hydrocarbon"
---@param x number
---@param y number
---@param z number
---@param size number 1 for Mass, 3 for Hydro
function CreateResourceDeposit(type, x, y, z, size)
end
--- Creates a manipulator which rotates on a unit's bone
---@param object BoneObject
---@param bone string
---@param axis "x" | "y" | "z
---@param goal? unknown
---@param speed? number
---@param accel? number
---@param goalspeed? number
---@return moho.RotateManipulator
function CreateRotator(object, bone, axis, goal, speed, accel, goalspeed)
end
--- Creates a manipulator which copies the motion of `srcBone` onto `dstBone`.
--- Order matters! Only manipulators which come before the slave manipulator will be copied.
---@param object BoneObject
---@param destBone Bone
---@param srcBone Bone
---@return moho.SlaveManipulator
function CreateSlaver(object, destBone, srcBone)
end
--- Creates a slider similar to those used in robotics. When applied with other manipulators the
--- slider can cause the entire sequence to 'stutter' at one update per tick, usually you should
--- only manipulate a bone with a slider and nothing else
---@param object BoneObject
---@param bone Bone
---@param goalX? number
---@param goalY? number
---@param goalZ? number
---@param speed? number
---@param worldSpace? boolean
---@return moho.SlideManipulator
function CreateSlider(object, bone, goalX, goalY, goalZ, speed, worldSpace)
end
--- Adds a splat to the game at a position and heading
---@see CreateSplatOnBone() # adds the splat at an entity bone
---@param position Vector
---@param heading Vector
---@param texture string
---@param sizeX number
---@param sizeZ number
---@param lodParam number
---@param duration number
---@param army Army
---@param fidelity? number
function CreateSplat(position, heading, texture, sizeX, sizeZ, lodParam, duration, army, fidelity)
end
--- Adds a splat to the game at an entity bone position and heading
---@see CreateSplatOnBone() # adds the splat at a position
---@param object BoneObject
---@param offset Vector
---@param bone Bone
---@param texture string
---@param sizeX number
---@param sizeZ number
---@param lodParam number
---@param duration number
---@param army Army
function CreateSplatOnBone(object, offset, bone, texture, sizeX, sizeZ, lodParam, duration, army)
end
---
---@param object BoneObject
---@param bone Bone
---@param resource any
---@param minX number
---@param minY number
---@param minZ number
---@param maxX number
---@param maxY number
---@param maxZ number
---@return moho.StorageManipulator
function CreateStorageManip(object, bone, resource, minX, minY, minZ, maxX, maxY, maxZ)
end
---
---@param unit Unit
---@param label string
---@param thrustBone Bone
---@return moho.ThrustManipulator
function CreateThrustController(unit, label, thrustBone)
end
---
---@param object BoneObject
---@param bone Bone
---@param army Army
---@param trailBlueprint string
---@return moho.IEffect
function CreateTrail(object, bone, army, trailBlueprint)
end
--- Creates a unit from a blueprint for an army, at a position with quaternion orientation
---@see CreateUnit2() # simple version
---@see CreateUnitHPR() # heading-pitch-roll version
---@param blueprint string
---@param army Army
---@param x number
---@param y number
---@param z number
---@param qx number
---@param qy number
---@param qz number
---@param qw number
---@param layer? number
---@return Unit
function CreateUnit(blueprint, army, x, y, z, qx, qy, qz, qw, layer)
end
--- Creates a unit from a blueprint for an army, at an X-Z map point with a heading
---@see CreateUnit() # quaternion version
---@see CreateUnitHPR() # heading-pitch-roll version
---@param blueprint string
---@param army Army
---@param layer? number
---@param x number
---@param z number
---@param heading number
---@return Unit
function CreateUnit2(blueprint, army, layer, x, z, heading)
end
--- Creates a unit from a blueprint for an army, at a position with heading, pitch, and roll
---@see CreateUnit() # quaternion version
---@see CreateUnit2() # simple version
---@param blueprint string
---@param army Army
---@param x number
---@param y number
---@param z number
---@param heading number
---@param pitch number
---@param roll number
---@return Unit
function CreateUnitHPR(blueprint, army, x, y, z, heading, pitch, roll)
end
--- Deals damage to the target unit
---@param instigator Unit | nil
---@param location Vector origin of the damage, used for effects
---@param target Unit
---@param amount number
---@param damageType DamageType
function Damage(instigator, location, target, amount, damageType)
end
--- Deals damage in an circle
---@param instigator Unit | nil
---@param location Vector
---@param radius number
---@param damage number
---@param damageType DamageType
---@param damageFriendly boolean
---@param damageSelf? boolean
function DamageArea(instigator, location, radius, damage, damageType, damageFriendly, damageSelf)
end
--- Deals damage in an ring
---@param instigator Unit | nil
---@param location Vector
---@param minRadius number
---@param maxRadius number
---@param damage number
---@param damageType DamageType
---@param damageFriendly boolean
---@param damageSelf? boolean
function DamageRing(instigator, location, minRadius, maxRadius, damage, damageType, damageFriendly, damageSelf)
end
--- Gets the selected units for debug purposes. Note that the selection depends on the player,
--- so it should not be used in synchronous code.
---@return Unit[]
function DebugGetSelection()
end
--- Draws a 3D circle
---@param position Vector
---@param diameter number
---@param color Color
function DrawCircle(position, diameter, color)
end
--- Draws a 3D line
---@param pointA Vector
---@param pointB Vector
---@param color Color
function DrawLine(pointA, pointB, color)
end
--- Draws a 3D line with a circle at the end
---@param start Vector
---@param finish Vector
---@param color Color
function DrawLinePop(start, finish, color)
end
--- Returns true if the economy event is finished
---@param event EconomyEvent
---@return boolean
function EconomyEventIsDone(event)
end
--- Signals the end of the game (acts like a permanent pause)
function EndGame()
end
--- Counts how many units fit the specified category.
---@param category EntityCategory
---@param tblUnits Unit[]
---@return number
function EntityCategoryCount(category, tblUnits)
end
--- Counts how many units fit the specified category around a position.
---@param category EntityCategory
---@param position Vector
---@return number
function EntityCategoryCountAroundPosition(category, position)
end
--- Changes elevation of the map in the desired area.
--- Used mainly for spawning buildings, so they don't float in air.
---@param x number
---@param z number
---@param sizeX number
---@param sizeZ number
---@param elevation number
function FlattenMapRect(x, z, sizeX, sizeZ, elevation)
end
--- Removes all recon blips from the target area, if the area is in radar range it generates unseen recon blips
---@param minX number
---@param minZ number
---@param maxX number
---@param maxZ number
function FlushIntelInRect(minX, minZ, maxX, maxZ)
end
---
---@param armyName string
function GenerateArmyStart(armyName)
end
---
---@return Quaternion
function GenerateRandomOrientation()
end
--- Returns an army's brain
---@param army Army
---@return AIBrain
function GetArmyBrain(army)
end
--- Returns the army's unit cap
---@param army Army
---@return number
function GetArmyUnitCap(army)
end
--- Returns the total unit cap cost of the army
---@param army Army
---@return number
function GetArmyUnitCostTotal(army)
end
---
---@return Army
function GetCurrentCommandSource()
end
--- Returns the entities inside the given rectangle
---@param rectangle Rectangle
function GetEntitiesInRect(rectangle)
end
--- Gets entity by entity id.
--- This ID is unique for each entity.
---@param id string
---@return Entity
function GetEntityById(id)
end
--- Gets the current game time in ticks.
--- The game time is the simulation time, that stops when the game is paused.
---@return number
function GetGameTick()
end
--- Returns map size
---@return number sizeX
---@return number sizeZ
function GetMapSize()
end
--- Returns the reclaimable objects inside the given rectangle.
--- This includes props, units, wreckages.
---@param rectangle Rectangle
---@return ReclaimableObject[] | nil
---@overload fun(x0: number, z0: number, x1: number, z1: number): ReclaimableObject[] | nil
function GetReclaimablesInRect(rectangle)
end
--- Returns surface elevation at given position.
--- Takes water into count.
---@param x number
---@param z number
---@return number
function GetSurfaceHeight(x, z)
end
--- Returns System time in seconds
---@return number
function GetSystemTimeSecondsOnlyForProfileUse()
end
--- Returns elevation at given position.
--- Ignores water surface.
---@param x number
---@param z number
---@return number
function GetTerrainHeight(x, z)
end
--- Returns terrain type at given position
---@param x number
---@param z number
---@return TerrainType
function GetTerrainType(x, z)
end
---
---@return number
function GetTerrainTypeOffset(x, z)
end
--- Returns unit's blueprint given the blueprint's name
---@param bpName string
---@return UnitBlueprint
function GetUnitBlueprintByName(bpName)
end
--- Retrieves all units in a rectangle, excludes insignificant units (such as the Cybran build bot)
--- by default
---@param rectangle Rectangle
---@return Unit[] | nil
---@overload fun(x0: number, z0: number, x1: number, z1: number): Unit[] | nil
function GetUnitsInRect(rectangle)
end
--- Starts the AI on given army
---@param army string
function InitializeArmyAI(army)
end
---
---@param object Object
---@return boolean
function IsBlip(object)
end
---
---@param object Object
---@return boolean
function IsCollisionBeam(object)
end
--- Returns true if the given command is finished
---@param cmd SimCommand
---@return boolean
function IsCommandDone(cmd)
end
--- Returns true if the given object is an Entity
---@param object Object
---@return boolean
function IsEntity(object)
end
--- Returns true if the game is over
---@return boolean
function IsGameOver()
end
--- Returns true if the target entity is a projectile
---@param object Object
---@return boolean
function IsProjectile(object)
end
--- Returns true if the target entity is a prop
---@param object Object
---@return boolean
function IsProp(object)
end
--- Returns true if the target entity is a unit
---@param object Object
---@return boolean
function IsUnit(object)
end
--- Orders a group of units to attack-move to a position
---@param units Unit[]
---@param position Vector
---@return SimCommand
function IssueAggressiveMove(units, position)
end
--- Orders a group of units to attack a target
---@param units Unit[]
---@param target Unit
---@return SimCommand
function IssueAttack(units, target)
end
--- Orders a group of units to build a unit
---@param units Unit[]
---@param blueprintID string
---@param count number
---@return SimCommand
function IssueBuildFactory(units, blueprintID, count)
end
--- Orders a group of units to build a unit, each unit is assigned the closest building.
--- Takes some time to process (at least 3 ticks).
---@param units Unit[]
---@param position Vector
---@param blueprintID string
---@param table number[] # A list of alternative build locations, similar to AiBrain.BuildStructure. Doesn't appear to function properly
---@return SimCommand
function IssueBuildMobile(units, position, blueprintID, table)
end
--- Orders a group of units to capture a target, usually engineers
---@param units Unit[]
---@param target Unit
---@return SimCommand
function IssueCapture(units, target)
end
--- Clears out all commands issued on the group of units, this happens immediately
---@param units Unit[]
---@return SimCommand
function IssueClearCommands(units)
end
--- Clears out all commands issued on the group of factories without affecting
--- the build queue, allows you to change the rally point
---@param factories Unit[]
---@return SimCommand
function IssueClearFactoryCommands(factories)
end
--- Orders a group of units to destroy themselves, doesn't leave a wreckage
---@see IssueKillSelf() # an alternative that does leave a wreckage
---@param units Unit[]
---@return SimCommand
function IssueDestroySelf(units)
end
--- Orders a group of units to dive
---@param units Unit[]
---@return SimCommand
function IssueDive(units)
end
--- Orders a group of factories to assist another factory
---@param units Unit[]
---@param target Unit
---@return SimCommand
function IssueFactoryAssist(units, target)
end
--- Orders a group of factories to set their rally point
---@param units Unit[]
---@param position Vector
---@return SimCommand
function IssueFactoryRallyPoint(units, position)
end
--- Orders a group of units to setup a ferry
---@param units Unit[]
---@param position Vector
---@return SimCommand
function IssueFerry(units, position)
end
--- Orders a group of units to attack move to a position in formation
--- @param units Unit[]
--- @param position Vector
--- @param formation UnitFormations # Unit formation to use as defined in `formations.lua`
--- @param degrees number # Orientation the platoon takes when it reaches the position. South is 0 degrees, east is 90 degrees, etc.
--- @return SimCommand
function IssueFormAggressiveMove(units, position, formation, degrees)
end
--- Orders a group of units to attack a target in formation
--- @param units Unit[]
--- @param target Unit
--- @param formation UnitFormations # Unit formation to use as defined in `formations.lua`
--- @param degrees number # Orientation the platoon takes when it reaches the position. South is 0 degrees, east is 90 degrees, etc.
--- @return SimCommand
function IssueFormAttack(units, target, formation, degrees)
end
--- Orders a group of units to move to a position in formation
--- @param units Unit[]
--- @param position Vector
--- @param formation UnitFormations # Unit formation to use as defined in `formations.lua`
--- @param degrees number # Orientation the platoon takes when it reaches the position. South is 0 degrees, east is 90 degrees, etc.
--- @return SimCommand
function IssueFormMove(units, position, formation, degrees)
end
--- Orders a group of units to patrol to a position in formation
--- @param units Unit[]
--- @param position Vector
--- @param formation UnitFormations # Unit formation to use as defined in `formations.lua`
--- @param degrees number # Orientation the platoon takes when it reaches the position. South is 0 degrees, east is 90 degrees, etc.
--- @return SimCommand
function IssueFormPatrol(units, position, formation, degrees)
end
--- Orders a group of units to guard a target
---@param units Unit[]
---@param target Unit
---@return SimCommand
function IssueGuard(units, target)
end
--- Orders a group of units to kill themselves
---@see IssueDestroySelf() # an alternative that does not leave a wreckage
---@param units Unit[]
---@return SimCommand
function IssueKillSelf(units)
end
--- Orders a group of units to move to a position
---@param units Unit[]
---@param position Vector
---@return SimCommand
function IssueMove(units, position)
end
--- Orders a group of units to move off a factory build site
---@param units Unit[]
---@param position Vector
---@return SimCommand
function IssueMoveOffFactory(units, position)
end
--- Orders a group of units to launch a strategic missile at a position
---@see IssueTactical() # for tactical missiles
---@param units Unit[]
---@param position Vector
---@return SimCommand
function IssueNuke(units, position)
end
--- Orders a group of units to use Overcharge at a target
---@param units Unit[]
---@param target Unit
---@return SimCommand
function IssueOverCharge(units, target)
end
--- Orders a group of units to patrol to a position
---@param units Unit[]
---@param position Vector
---@return SimCommand
function IssuePatrol(units, position)
end
--- Orders a unit to pause, this happens immediately
---@param unit Unit
function IssuePause(unit)
end
--- Orders a group of units to reclaim a target
---@param units Unit[]
---@param target ReclaimableObject
---@return SimCommand
function IssueReclaim(units, target)
end
--- Orders a group of units to repair a target
---@param units Unit[]
---@param target Unit
---@return SimCommand
function IssueRepair(units, target)
end
--- Orders a group of units to sacrifice, yielding part of their build cost to a target
---@param tblUnits Unit[]
---@param target Unit
---@return SimCommand
function IssueSacrifice(tblUnits, target)
end
--- Orders a group of units to run a script sequence, as an example:
--- `{ TaskName = "EnhanceTask", Enhancement = "AdvancedEngineering" }`
---@param tblUnits Unit[]
---@param order Task
---@return ScriptTask
function IssueScript(tblUnits, order)
end
--- Orders a group of units (SML or SMD) to build a nuke
---@param units Unit[]
---@return SimCommand
function IssueSiloBuildNuke(units)
end
--- Orders a group of units to build a tactical missile
---@param units Unit[]
---@return SimCommand
function IssueSiloBuildTactical(units)
end
--- Orders a group of units to stop, this happens immediately
---@param units Unit[]
function IssueStop(units)
end
--- Orders a group of units to launch a tactical missile
---@see IssueNuke() # for nuclear missiles
---@param units Unit[]
---@param target Unit | Vector
---@return SimCommand
function IssueTactical(units, target)
end
--- Orders a group of units to teleport to a position
---@param units Unit[]
---@param position Vector
---@return SimCommand
function IssueTeleport(units, position)
end
---
---@param units Unit[]
---@param beacon unknown
---@return SimCommand
function IssueTeleportToBeacon(units, beacon)
end
--- Orders a group of units to attach themselves to a transport
---@param units Unit[]
---@param transport Unit
---@return SimCommand
function IssueTransportLoad(units, transport)
end
--- Orders a group of transports to unload their cargo at a position
---@param units Unit[]
---@param position Vector
---@return SimCommand
function IssueTransportUnload(units, position)
end
--- Orders a group of ~~transports~~ or carriers to unload specific units,
--- appears to work only for carriers
---@param units Unit[]
---@param position Vector
---@param category EntityCategory
---@return SimCommand
function IssueTransportUnloadSpecific(units, category, position)
end
--- Orders a group of units to upgrade
---@param units Unit[]
---@param blueprintID string
---@return SimCommand
function IssueUpgrade(units, blueprintID)
end
--- Latent unit move
---@param unit Unit
---@param target Vector
function LUnitMove(unit, target)
end
--- Latent unit move near
---@param unit Unit
---@param target Vector