forked from Tobias00723/DCS-Scripting-Library-Updated
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclasses.lua
More file actions
1337 lines (1086 loc) · 80.5 KB
/
classes.lua
File metadata and controls
1337 lines (1086 loc) · 80.5 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
---@diagnostic disable: undefined-doc-name
--[[
updated by Tobias00723
orignial author : unkown ;/
from the TGFB server
Discord : https://discord.gg/hEHd4A3czx
any questions? ^^
find me on the my discord server ^^
feel free to use these DCS prototypes
no mentions or anything needed :)
]]
-- TODO : make more classes of the getDescByName functions
-- https://wiki.hoggitworld.com/view/DCS_func_getDescByName
-- Unit.hasSensors and below check for classe
---@meta
--- Represents the bounding box of an object with minimum and maximum coordinates.
--- @class Box
--- @field min vec3 The minimum 3D coordinates of the box
--- @field max vec3 The maximum 3D coordinates of the box
--- Represents the attributes of an aircraft with boolean values.
--- @class Attributes
--- @field Air boolean Indicates if the object is classified as Air
--- @field Battle_airplanes boolean Indicates if the object is a battle airplane
--- @field NonAndLightArmoredUnits boolean Indicates if the object is non or lightly armored
--- @field Battleplanes boolean Indicates if the object is a battleplane
--- @field Refuelable boolean Indicates if the object is refuelable
--- @field All boolean Indicates if the object is classified under all
--- @field Planes boolean Indicates if the object is a plane
--- @field NonArmoredUnits boolean Indicates if the object is non-armored
--- Represents the detailed information of an aircraft.
--- @class decs
--- @field speedMax0 number Maximum speed at sea level
--- @field massEmpty number Empty mass of the aircraft in kg
--- @field tankerType number Tanker type identifier
--- @field range number Maximum range of the aircraft in km
--- @field box Box Bounding box of the aircraft
--- @field Hmax number Maximum operational altitude in meters
--- @field Kmax number Maximum G-load
--- @field category number Category of the aircraft
--- @field speedMax10K number Maximum speed at 10,000 meters
--- @field NyMin number Minimum load factor (G-force)
--- @field fuelMassMax number Maximum fuel mass in kg
--- @field speedMax number Maximum speed in km/h
--- @field NyMax number Maximum load factor (G-force)
--- @field massMax number Maximum mass of the aircraft in kg
--- @field RCS number Radar Cross Section (RCS)
--- @field displayName string Display name of the aircraft
--- @field life number Structural life in years
--- @field VyMax number Maximum climb rate in m/s
--- @field attributes Attributes The attributes of the aircraft
--- @field typeName string Type name of the aircraft
--- @field Kab number Kab rating
---@class Runway
---@field course number The course or bearing in radians
---@field Name number The identifier for the runway
---@field position vec3 The position of the runway
---@field length number The length of the runway in meters
---@field width number The width of the runway in meters
-- https://wiki.hoggitworld.com/view/Simulator_Scripting_Engine_Documentation
---Represents an object with body, unique name, category and type. Non-final class
---https://wiki.hoggitworld.com/view/DCS_Class_Object
Object = {}
---Object.Category enum that stores object categories.
---https://wiki.hoggitworld.com/view/DCS_Class_Object
---@enum Object.Category
Object.Category = {
UNIT = 1,
WEAPON = 2,
STATIC = 3,
BASE = 2,
SCENERY = 2,
Cargo = 2,
}
---Represents all objects placed on the map. Bridges, buildings, etc.
---https://wiki.hoggitworld.com/view/DCS_Class_Scenery_Object
SceneryObject = {}
---Represents all Objects those may belong to a coalition: units, airbases, static objects, weapon. Non-final class.
---https://wiki.hoggitworld.com/view/DCS_Class_Coalition_Object
CoalitionObject = {}
---Represents units: airplanes, helicopters, vehicles, ships and armed ground structures.
---https://wiki.hoggitworld.com/view/DCS_Class_Unit
Unit = {}
---Represents units: airplanes, helicopters, vehicles, ships and armed ground structures.
---https://wiki.hoggitworld.com/view/DCS_Class_Unit
Unit = {
---@enum Unit_category
Category = {
AIRPLANE = 0,
HELICOPTER = 1,
GROUND_UNIT = 2,
SHIP = 3,
STRUCTURE = 4
}
}
---Represents units: airplanes, helicopters, vehicles, ships and armed ground structures.
---https://wiki.hoggitworld.com/view/DCS_Class_Unit
Unit.RefuelingSystem = {
BOOM_AND_RECEPTACLE = 0,
PROBE_AND_DROGUE = 1
}
---Represents units: airplanes, helicopters, vehicles, ships and armed ground structures.
---https://wiki.hoggitworld.com/view/DCS_Class_Unit
Unit = {
---@enum Unit_sensortype
SensorType = {
OPTIC = 0,
RADAR = 1,
IRST = 2,
RWR = 3
}
}
---Represents units: airplanes, helicopters, vehicles, ships and armed ground structures.
---https://wiki.hoggitworld.com/view/DCS_Class_Unit
Unit.OpticType = {
TV = 0,
LLTV = 1,
IR = 2
}
---Represents units: airplanes, helicopters, vehicles, ships and armed ground structures.
---https://wiki.hoggitworld.com/view/DCS_Class_Unit
Unit.RadarType = {
AS = 0,
SS = 1
}
---Represents airbases: airdromes, helipads and ships with flying decks or landing pads.
---https://wiki.hoggitworld.com/view/DCS_Class_Airbase
Airbase = {}
---Represents airbases: airdromes, helipads and ships with flying decks or landing pads.
---https://wiki.hoggitworld.com/view/DCS_Class_Airbase
Airbase.Category = {
AIRDROME = 0,
HELIPAD = 1,
SHIP = 2
}
---Represents a weapon object: shell, rocket, missile and bomb
---https://wiki.hoggitworld.com/view/DCS_Class_Weapon
Weapon = {}
---Represents a weapon object: shell, rocket, missile and bomb
---https://wiki.hoggitworld.com/view/DCS_Class_Weapon
Weapon.Category = {
SHELL = 0,
MISSILE = 1,
ROCKET = 2,
BOMB = 3
}
---Represents a weapon object: shell, rocket, missile and bomb
---https://wiki.hoggitworld.com/view/DCS_Class_Weapon
Weapon.GuidanceType = {
INS = 1,
IR = 2,
RADAR_ACTIVE = 3,
RADAR_SEMI_ACTIVE = 4,
RADAR_PASSIVE = 5,
TV = 6,
LASER = 7,
TELE = 8
}
---Represents a weapon object: shell, rocket, missile and bomb
---https://wiki.hoggitworld.com/view/DCS_Class_Weapon
Weapon.MissileCategory = {
AAM = 1,
SAM = 2,
BM = 3,
ANTI_SHIP = 4,
CRUISE = 5,
OTHER = 6
}
---Represents a weapon object: shell, rocket, missile and bomb
---https://wiki.hoggitworld.com/view/DCS_Class_Weapon
Weapon.WarheadType = {
AP = 0,
HE = 1,
SHAPED_EXPLOSIVE = 2
}
---Represents static objects added in the Mission Editor or via scripting commands.
---https://wiki.hoggitworld.com/view/DCS_Class_Static_Object
StaticObject = {}
---Represents static objects added in the Mission Editor or via scripting commands.
---https://wiki.hoggitworld.com/view/DCS_Class_Static_Object
StaticObject.Category = {
VOID = 0,
UNIT = 1,
WEAPON = 2,
STATIC = 3,
BASE = 4,
SCENERY = 5,
CARGO = 6
}
---Represents a group of units.
---https://wiki.hoggitworld.com/view/DCS_Class_Group
Group = {}
---Represents a group of units.
---https://wiki.hoggitworld.com/view/DCS_Class_Group
Group = {
---@enum groupCategory
Category = {
AIRPLANE = 0,
HELICOPTER = 1,
GROUND = 2,
SHIP = 3,
TRAIN = 4
}
}
---Controller is an object that performs AI-routines. In other words a controller is an instance of the AI. Controller stores the current main task, active enroute tasks, and behavior options. Controllers also can perform commands. Controllers exist at both a group and unit level. However only planes and helicopters can be controlled individually at a unit level. Some functions can only work for Unit Controllers. Different tasks, options, and commands are available for the different group types. (Plane, Helicopter, Ground Unit, and Ship). See the linked articles on these subjects for more information.
---https://wiki.hoggitworld.com/view/DCS_Class_Controller
Controller = {}
---Controller is an object that performs AI-routines. In other words a controller is an instance of the AI. Controller stores the current main task, active enroute tasks, and behavior options. Controllers also can perform commands. Controllers exist at both a group and unit level. However only planes and helicopters can be controlled individually at a unit level. Some functions can only work for Unit Controllers. Different tasks, options, and commands are available for the different group types. (Plane, Helicopter, Ground Unit, and Ship). See the linked articles on these subjects for more information.
---https://wiki.hoggitworld.com/view/DCS_Class_Controller
Controller.Detection = {
VISUAL = 1,
OPTIC = 2,
RADAR = 4,
IRST = 8,
RWR = 16,
DLINK = 32
}
---Represents a spot from laser or IR-pointer. Final class.
---https://wiki.hoggitworld.com/view/DCS_Class_Spot
Spot = {}
---Represents a spot from laser or IR-pointer. Final class.
---https://wiki.hoggitworld.com/view/DCS_Class_Spot
Spot.Category = {
INFRA_RED = 0,
LASER = 1
}
---The warehouse class gives control over warehouses that exist in airbase objects. These warehouses can limit the aircraft, munitions, and fuel available to coalition aircraft.
---https://wiki.hoggitworld.com/view/DCS_Class_Warehouse
Warehouse = {}
---The warehouse class gives control over warehouses that exist in airbase objects. These warehouses can limit the aircraft, munitions, and fuel available to coalition aircraft.
---**Documentation is poor so this might not be correct**
---https://wiki.hoggitworld.com/view/DCS_Class_Warehouse
Warehouse = {
---@enum liquidType
liquidtypes = {
jetfuel = 0,
Aviation_gasoline = 1,
MW50 = 2,
Diesel = 3
}
}
---@class Airbase
Airbase = {}
do
---Changes the passed airbase object's coalition to the set value. Must be used with Airbase.autoCapture to disable auto capturing of the base, otherwise the base can revert back to a different coalition depending on the situation and built in game capture rules.
---https://wiki.hoggitworld.com/view/DCS_func_setCoalition
---@param coa_enum side .
function Airbase.setCoalition(self , coa_enum) end
---Enables or disables the airbase and FARP auto capture game mechanic where ownership of a base can change based on the presence of ground forces or the default setting assigned in the editor.
---true : enables autoCapture behavior
---false : disables autoCapture behavior
---https://wiki.hoggitworld.com/view/DCS_func_autoCapture
---@param setting boolean
function Airbase.autoCapture(self , setting) end
---Returns the current autoCapture setting for the passed base.
---true: Auto capture is enabled
---false; Auto capture is disabled
---https://wiki.hoggitworld.com/view/DCS_func_autoCaptureIsOn
---@return boolean
function Airbase.autoCaptureIsOn(self) end
---Returns the wsType of every object that exists in DCS. A wsType is a table consisting of 4 entries indexed numerically. It can be used to broadly categorize object types. The table can be broken down as: {mainCategory, subCat1, subCat2, index}
---For example all 3 A-10 aircraft in game will have a wsType of {1, 1, 6, n} where n is whichever index the unit happens to be in.
---There are several items that have a wsType of {0, 0, 0, 0}. Typically these include shells, static objects, and turrets.
---https://wiki.hoggitworld.com/view/DCS_func_getResourceMap
---@return table
function Airbase.getResourceMap(self) end
---Returns the warehouse object associated with the airbase object. Can then be used to call the warehouse class functions to modify the contents of the warehouse.
---https://wiki.hoggitworld.com/view/DCS_func_getWarehouse
---@return Warehouse class
function Airbase.getWarehouse(self) end
---Returns an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object and how the function is called. See enumerators Group.Category, Object.Category, and Spot.Category for further reference.
---https://wiki.hoggitworld.com/view/DCS_func_getCategoryEx
---@return enum
function Airbase.getCategoryEx(self) end
---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_isExist
---@return boolean
function Airbase.isExist(self) end
---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_destroy
---@return function
function Airbase.destroy(self) end
---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category.
---https://wiki.hoggitworld.com/view/DCS_func_getCategory
---@return any enum
function Airbase.getCategory(self) end
---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon
---https://wiki.hoggitworld.com/view/DCS_func_getCoalition
---@return number enum coalition.side: 0 = neutral, 1 = red, 2 = blue
function Airbase.getCoalition(self) end
---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id.
---https://wiki.hoggitworld.com/view/DCS_func_getName
---@return string
function Airbase.getName(self) end
---Returns a number which defines the unique mission id of a given object.
---https://wiki.hoggitworld.com/view/DCS_func_getID
---@return number
function Airbase.getID(self) end
---Returns the unit object of the specified unitIndex within the group. If the index is not valid, this function will return nil.
---https://wiki.hoggitworld.com/view/DCS_func_getUnit
---@ExampleDesc Returns the first unit in a group
---@Example local unit1 = Group.getByName('tanks'):getUnit(1)
---@return Unit class
---@param UnitIndex number
function Airbase.getUnit(self, UnitIndex) end
---Return a string of the objects type name. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getTypeName
---@return string
function Airbase.getTypeName(self) end
---Return a description table of the given object. Table entries are dependent on the category of object and the sub-categories that may exist within that object type. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getDesc
---@return table
function Airbase.getDesc(self) end
---Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_hasAttribute
---@return boolean
---@param attribute string
function Airbase.hasAttribute(self, attribute) end
---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getPoint
---@return vec3 class
function Airbase.getPoint(self) end
---Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getPosition
---@ExampleDesc Position 3 is a table consisting of the point and orientation tables.
---@Exampele Position3 = { p = Vec3, x = Vec3, y = Vec3, z = Vec3 }
---@return position3 class
function Airbase.getPosition(self) end
---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_getVelocity
---@return vec3 class
function Airbase.getVelocity(self) end
---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_inAir
---@return boolean
function Airbase.inAir(self) end
---Returns an enumerator that defines the country that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon
---https://wiki.hoggitworld.com/view/DCS_func_getCountry
---@return countryid country
function Airbase.getCountry(self) end
---Returns a localized string of the units callsign. In the case of airbases the callsign of world airbases is defined by the game. Callsigns for units, farps, or ships can be specified by the user with the mission editor or scripting engine.
---https://wiki.hoggitworld.com/view/DCS_func_getCallsign
---@return string
function Airbase.getCallsign(self) end
---Returns a table of parking data for a given airbase. If the optional value is passed only available parking will be returned, otherwise all parking at the base is returned. Term types have the following enumerated values: TODO:
---https://wiki.hoggitworld.com/view/DCS_func_getParking
---@return table
---@param available boolean
function Airbase.getParking(self, available) end
---Returns a table with runway information like length, width, course, and Name. position: Returns the center of the runway width: width of the runway in meters Name: runway name, can be off course: bearing in radians. Multiply by -1 to make it useful
---https://wiki.hoggitworld.com/view/DCS_func_getRunways
---@Example { [1] = { ["course"] = -1.597741484642, ["Name"] = 8, ["position"] = { ["y"] = 952.94458007813, ["x"] = -360507.1875, ["z"] = -75590.0703125, }, ["length"] = 1859.3155517578, ["width"] = 60, }, [2] = { ["course"] = -2.5331676006317, ["Name"] = 26, ["position"] = { ["y"] = 952.94458007813, ["x"] = -359739.875, ["z"] = -75289.5078125, }, ["length"] = 1859.3155517578, ["width"] = 60, }, }
---@return table<number,Runway> class
function Airbase.getRunways(self) end
---Returns a table of vec3 objects corresponding to the passed value. Seems to only ever return a single object "Tower" object. Have been unable to get it to work with other types.
---https://wiki.hoggitworld.com/view/DCS_func_getTechObjectPos
---@Example Return: { ["pos"] = { ["y"] = 30.01003074646, ["x"] = 11039.798828125, ["z"] = 367775.40625, }, }
---@return table<"pos", vec3>
---@param ObjectType number|string
function Airbase.getTechObjectPos(self, ObjectType) end
---Returns a boolean value for whether or not the ATC for the passed airbase object has been silenced.
---https://wiki.hoggitworld.com/view/DCS_func_getRadioSilentMode
---@return boolean
function Airbase.getRadioSilentMode(self) end
---Sets the ATC belonging to an airbase object to be silent and unresponsive. This is useful for disabling the award winning ATC behavior in DCS. Note that this DOES NOT remove the airbase from the list. It just makes it unresponsive and silent to any radio calls to it. true : enabled silent mode. false : disables silent mode.
---https://wiki.hoggitworld.com/view/DCS_func_setRadioSilentMode
---@param silent boolean
function Airbase.setRadioSilentMode(self, silent) end
---Returns an instance of the calling class for the object of a specified name. The objects name is defined either in the mission editor or within functions that can dynamically spawn objects. All static objects and unit names must be unique. However groups may have the same name as a unit or static object. This function can provide access to non activated units and groups.
---https://wiki.hoggitworld.com/view/DCS_func_getByName
---@return Airbase class
---@param name string
function Airbase.getByName(name) end
---Return a description table of the specified Object type. Object does not need to be in the mission in order to query its data. Function works with Unit, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getDescByName
---@return decs class
---@param typeName string
function Airbase.getDescByName(typeName) end
end
---@class Warehouse
Warehouse = {}
do
---Adds the passed amount of a given item to the warehouse.
---itemName is the typeName associated with the item: "weapons.missiles.AIM_54C_Mk47"
---A wsType table can also be used, however the last digit with wsTypes has been known to change. {4, 4, 7, 322}
---https://wiki.hoggitworld.com/view/DCS_func_addItem
---@param itemName string|table string or table
---@param count number
function Warehouse.addItem(self , itemName ,count) end
---Returns the number of the passed type of item currently in a warehouse object.
---itemName is the typeName associated with the item: "weapons.missiles.AIM_54C_Mk47"
---A wsType table can also be used, however the last digit with wsTypes has been known to change. {4, 4, 7, 322}
---https://wiki.hoggitworld.com/view/DCS_func_getItemCount
---@return number
---@param itemName string|table string or table
function Warehouse.getItemCount(self , itemName ) end
---Sets the passed amount of a given item to the warehouse.
---itemName is the typeName associated with the item: "weapons.missiles.AIM_54C_Mk47"
---A wsType table can also be used, however the last digit with wsTypes has been known to change. {4, 4, 7, 322}
---https://wiki.hoggitworld.com/view/DCS_func_setItem
---@param itemName string|table string or table
---@param count number
function Warehouse.setItem(self , itemName, count) end
---Removes the amount of the passed item from the warehouse.
---itemName is the typeName associated with the item: "weapons.missiles.AIM_54C_Mk47"
---A wsType table can also be used, however the last digit with wsTypes has been known to change. {4, 4, 7, 322}
---https://wiki.hoggitworld.com/view/DCS_func_removeItemWarehouse
---@param itemName string|table string or table
---@param count number number
function Warehouse.removeItem(self , itemName, count) end
---Adds the passed amount of a liquid fuel into the warehouse inventory
---https://wiki.hoggitworld.com/view/DCS_func_addLiquid
---@param liquidType liquidType
---@param count number number
function Warehouse.addLiquid(self , liquidType , count) end
---Returns the amount of the passed liquid type within a given warehouse.
---https://wiki.hoggitworld.com/view/DCS_func_getLiquidAmount
---@param liquidType liquidType
---@return number
function Warehouse.getLiquidAmount(self , liquidType) end
---Adds the passed amount of a liquid fuel into the warehouse inventory
---https://wiki.hoggitworld.com/view/DCS_func_addLiquid
---@param liquidType liquidType
---@param count number number
function Warehouse.setLiquidAmount(self , liquidType , count) end
---Removes the set amount of liquid from the inventory in a warehouse.
---https://wiki.hoggitworld.com/view/DCS_func_removeLiquid
---@param liquidType liquidType
---@param count number number
function Warehouse.removeLiquid(self , liquidType , count) end
---Returns the airbase object associated with the warehouse object
---https://wiki.hoggitworld.com/view/DCS_func_getOwner
---@return Airbase class
function Warehouse.getOwner(self) end
---Returns a full itemized list of everything currently in a warehouse. If a category is set to unlimited then the table will be returned empty.
---Aircraft and weapons are indexed by strings.
---https://wiki.hoggitworld.com/view/DCS_func_getInventory
---@return table
---@param itemName string|table string or table
function Warehouse.getInventory(self , itemName ) end
---Returns an instance of the calling class for the object of a specified name. The objects name is defined either in the mission editor or within functions that can dynamically spawn objects. All static objects and unit names must be unique. However groups may have the same name as a unit or static object. This function can provide access to non activated units and groups.
---https://wiki.hoggitworld.com/view/DCS_func_getByName
---@return Warehouse class
---@param name string
function Warehouse.getByName(name) end
end
---@class Unit
Unit = {}
do
---Returns an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object and how the function is called. See enumerators Group.Category, Object.Category, and Spot.Category for further reference.
---https://wiki.hoggitworld.com/view/DCS_func_getCategoryEx
---@return Unit_category enum
function Unit.getCategoryEx(self) end
---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_isExist
---@return boolean
function Unit.isExist(self) end
---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_destroy
function Unit.destroy(self) end
---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category.
---https://wiki.hoggitworld.com/view/DCS_func_getCategory
---@return any enum
function Unit.getCategory(self) end
---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon
---https://wiki.hoggitworld.com/view/DCS_func_getCoalition
---@return any enum coalition.side: 0 = neutral, 1 = red, 2 = blue
function Unit.getCoalition(self) end
---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id.
---https://wiki.hoggitworld.com/view/DCS_func_getName
---@return string
function Unit.getName(self) end
---Returns a number which defines the unique mission id of a given object.
---https://wiki.hoggitworld.com/view/DCS_func_getID
---@return number
function Unit.getID(self) end
---Sets the passed group or unit objects radar emitters on or off. Can be used on sam sites for example to shut down the radar without setting AI off or changing the alarm state.
---https://wiki.hoggitworld.com/view/DCS_func_enableEmission
---@param setting boolean
function Unit.enableEmission(self, setting) end
---Returns the controller of the specified object. Ships and ground units can only be controlled at a group level. Airplanes and helicopters can be controlled at both a group and unit level.
---https://wiki.hoggitworld.com/view/DCS_func_getController
---@return Controller class
function Unit.getController(self) end
---Returns the current "life" of a unit. Also referred to as "hit points". All units in DCS have a value that defines how much life is left. If this value is less than 1 the unit is considered "dead". Ground and ship units that are on fire and in the process of "cooking off" will return a life value of 0 until the object explodes. Aircraft are more complex due to sub-systems and damage models which will effect the life value.
---https://wiki.hoggitworld.com/view/DCS_func_getLife
---@return number
function Unit.getLife(self) end
---Return a string of the objects type name. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_getTypeName
---@return string
function Unit.getTypeName(self) end
---Return a description table of the given object. Table entries are dependent on the category of object and the sub-categories that may exist within that object type. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getDesc
---@return table
function Unit.getDesc(self) end
---Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_hasAttribute
---@return boolean
---@param attribute string
function Unit.hasAttribute(self, attribute) end
---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getPoint
---@return vec3 class
function Unit.getPoint(self) end
---Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getPosition
---@ExampleDesc Position 3 is a table consisting of the point and orientation tables.
---@Exampele Position3 = { p = Vec3, x = Vec3, y = Vec3, z = Vec3 }
---@return position3 class
function Unit.getPosition(self) end
---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_getVelocity
---@return vec3 class
function Unit.getVelocity(self) end
---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_inAir
---@return boolean
function Unit.inAir(self) end
---Returns an enumerator that defines the country that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon
---https://wiki.hoggitworld.com/view/DCS_func_getCountry
---@return number enum country.id
function Unit.getCountry(self) end
---Returns a boolean value if the unit is activated. Units set to late activation would return false if checked by this function.
---https://wiki.hoggitworld.com/view/DCS_func_isActive
---@return boolean
function Unit.isActive(self) end
---Returns a string value of the name of the player if the unit is currently controlled by a player. If a unit is controlled by AI the function returns nil.
---https://wiki.hoggitworld.com/view/DCS_func_getPlayerName
---@return string
function Unit.getPlayerName(self) end
---Returns a numerical value of the default index of the specified unit within the group as defined within the mission editor or addGroup scripting function. This value is not changed as units within the group are destroyed.
---https://wiki.hoggitworld.com/view/DCS_func_getNumber
---@return number index
function Unit.getNumber(self) end
---Returns the Group object that the Unit belongs to.
---https://wiki.hoggitworld.com/view/DCS_func_getGroup
---@return Group class
function Unit.getGroup(self) end
---Returns a localized string of the units callsign. In the case of airbases the callsign of world airbases is defined by the game. Callsigns for units, farps, or ships can be specified by the user with the mission editor or scripting engine.
---https://wiki.hoggitworld.com/view/DCS_func_getCallsign
---@return string
function Unit.getCallsign(self) end
---Returns the initial life value of a unit. All units spawn with "max HP" and this value will never change. Can be used with Unit.getLife() to determine the percentage of a units life as each unit has a unique life value.
---https://wiki.hoggitworld.com/view/DCS_func_getLife0
---@return number
function Unit.getLife0(self) end
---Returns a percentage of the current fuel remaining in an aircraft's inventory based on the maximum possible fuel load. Value ranges from 0.00 to 1.00. If external fuel tanks are present the value may display above 1.0. Fuel is always drained from the external tanks before moving to internal tanks. Ground vehicles and ships will always return a value of 1.
---https://wiki.hoggitworld.com/view/DCS_func_getLife0
---@return number
function Unit.getFuel(self) end
---Returns an ammo table for all types of loaded ammunition on a given object. Ammo table is indexed by ammo type and contains a weapon description table and a count variable defining "how much" is on board.
---https://wiki.hoggitworld.com/view/DCS_func_getAmmo
---@return table
function Unit.getAmmo(self) end
---Returns a table defining each of the sensors available to the specified unit.
---https://wiki.hoggitworld.com/view/DCS_func_getSensors
---@return table
function Unit.getSensors(self) end
---Returns true if the unit has the specified sensors. If SensorType is not specified the function will return true if the unit has any type of sensors. Some sensorTypes have additional subcategories which can be used to further specify for certain sensors.
---https://wiki.hoggitworld.com/view/DCS_func_hasSensors
---@Example TODO:
---@return boolean
---@param SensorType Unit_sensortype
---@param SubCategory any enum
function Unit.hasSensors(self, SensorType, SubCategory) end
---Returns two values. The first value is a boolean indicating if any radar on the Unit is operational. The second value is the Object the radar is most interested in and/or actively tracking.
---https://wiki.hoggitworld.com/view/DCS_func_getRadar
---@Example TODO:
---@return boolean, Object class
function Unit.getRadar(self) end
---Returns the current value for an animation argument on the external model of the given object. Each model animation has an id tied to with different values representing different states of the model. Animation arguments can be figured out by opening the respective 3d model in the modelviewer. For example you can determine the rotation and orientation of the barrel of a Tanks cannon by checking its animation arguments. More practically you can determine whether or not a helicopters doors are open. If draw argument value is invalid for the unit in question a value of 0 will be returned.
---https://wiki.hoggitworld.com/view/DCS_func_getDrawArgumentValue
---@Example Return -1 to +1 TODO:
---@return number
---@param arg number
function Unit.getDrawArgumentValue(self, arg) end
---Returns a table of friendly cargo objects indexed numerically and sorted by distance from the helicopter. Returns nil if used on any object other than a helicopter.
---https://wiki.hoggitworld.com/view/DCS_func_getNearestCargos
---@Example TODO:
---@return table
function Unit.getNearestCargos(self) end
---Sets the passed group or unit objects radar emitters on or off. Can be used on sam sites for example to shut down the radar without setting AI off or changing the alarm state.
---https://wiki.hoggitworld.com/view/DCS_func_enableEmission
---@return nil nothing
---@param setting boolean
function Unit.enableEmission(self, setting) end
---Returns the number of infantry that can be embark onto the aircraft. Only returns a value if run on airplanes or helicopters. Returns nil if run on ground or ship units.
---https://wiki.hoggitworld.com/view/DCS_func_getDescentCapacity
---@return number
function Unit.getDescentCapacity(self) end
---Returns an instance of the calling class for the object of a specified name. The objects name is defined either in the mission editor or within functions that can dynamically spawn objects. All static objects and unit names must be unique. However groups may have the same name as a unit or static object. This function can provide access to non activated units and groups.
---https://wiki.hoggitworld.com/view/DCS_func_getByName
---@return Unit class
---@param name string
function Unit.getByName(name) end
---Return a description table of the specified Object type. Object does not need to be in the mission in order to query its data. Function works with Unit, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getDescByName
---@return table
---@param typeName string
function Unit.getDescByName(typeName) end
---Returns the runtime object Id associated with the unit. Every single object on the map is represented by a unique objectID value.
---https://wiki.hoggitworld.com/view/DCS_func_getObjectID
---@return number
function Unit.getObjectID(self) end
end
---@class Group
Group = {}
do
---Returns an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object and how the function is called. See enumerators Group.Category, Object.Category, and Spot.Category for further reference.
---https://wiki.hoggitworld.com/view/DCS_func_getCategoryEx
---@return number
function Group.getCategoryEx(self) end
---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_isExist
---@return boolean
function Group.isExist(self) end
---Activates the group if the group has a delayed start or late activation.
---https://wiki.hoggitworld.com/view/DCS_func_activate
function Group.activate(self) end
---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_destroy
function Group.destroy(self) end
---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category.
---https://wiki.hoggitworld.com/view/DCS_func_getCategory
---@return number
function Group.getCategory(self) end
---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon
---https://wiki.hoggitworld.com/view/DCS_func_getCoalition
---@return number enum coalition.side: 0 = neutral, 1 = red, 2 = blue
function Group.getCoalition(self) end
---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id.
---https://wiki.hoggitworld.com/view/DCS_func_getName
---@return string
function Group.getName(self) end
---Returns a number which defines the unique mission id of a given object.
---https://wiki.hoggitworld.com/view/DCS_func_getID
---@return number
function Group.getID(self) end
---Returns the unit object of the specified unitIndex within the group. If the index is not valid, this function will return nil.
---https://wiki.hoggitworld.com/view/DCS_func_getUnit
---@ExampleDesc Returns the first unit in a group
---@Example local unit1 = Group.getByName('tanks'):getUnit(1)
---@return Unit Class
---@param UnitIndex number
function Group.getUnit(self, UnitIndex) end
---Returns a table of unit objects indexed in unit order. Useful for getting unit specific data for every unit in the group.
---https://wiki.hoggitworld.com/view/DCS_func_getUnits
---@ExampleDesc The following would run a function if any of the aircraft in the groups fuel level is below 10%
---@return table<number, Unit>
function Group.getUnits(self) end
---Returns the current size of the group. This value will change as units are destroyed. Can be used in combination with getUnit to not accidentally use to big a value for that function, or to access the last unit in the group.
---https://wiki.hoggitworld.com/view/DCS_func_getSize
---@return number
function Group.getSize(self) end
---Sets the passed group or unit objects radar emitters on or off. Can be used on sam sites for example to shut down the radar without setting AI off or changing the alarm state.
---https://wiki.hoggitworld.com/view/DCS_func_enableEmission
---@param setting boolean
function Group.enableEmission(self, setting) end
---Returns the controller of the specified object. Ships and ground units can only be controlled at a group level. Airplanes and helicopters can be controlled at both a group and unit level.
---https://wiki.hoggitworld.com/view/DCS_func_getController
---@return Controller class
function Group.getController(self) end
---Returns the initial size of the group as defined in the mission editor or if spawned via function. This number will not change as units are destroyed.
---https://wiki.hoggitworld.com/view/DCS_func_getInitialSize
---@return number
function Group.getInitialSize(self) end
---Returns an instance of the calling class for the object of a specified name. The objects name is defined either in the mission editor or within functions that can dynamically spawn objects. All static objects and unit names must be unique. However groups may have the same name as a unit or static object. This function can provide access to non activated units and groups.
---https://wiki.hoggitworld.com/view/DCS_func_getByName
---@return Group class
---@param name string
function Group.getByName(name) end
end
---@class Object
Object = {}
do
---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_isExist
---@return boolean
function Object.isExist(self) end
---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_destroy TODO: Examples
function Object.destroy(self) end
---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category.
---https://wiki.hoggitworld.com/view/DCS_func_getCategory
---@return number enum
function Object.getCategory(self) end
---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon
---https://wiki.hoggitworld.com/view/DCS_func_getCoalition
---@return number enum coalition.side: 0 = neutral, 1 = red, 2 = blue
function Object.getCoalition(self) end
---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id.
---https://wiki.hoggitworld.com/view/DCS_func_getName
---@return string
function Object.getName(self) end
---Return a string of the objects type name. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_getTypeName
---@return string
function Object.getTypeName(self) end
---Return a description table of the given object. Table entries are dependent on the category of object and the sub-categories that may exist within that object type. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getDesc
---@return table
function Object.getDesc(self) end
---Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_hasAttribute
---@return boolean
---@param attribute string
function Object.hasAttribute(self, attribute) end
---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getPoint
---@return vec3 class
function Object.getPoint(self) end
---Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getPosition
---@ExampleDesc Position 3 is a table consisting of the point and orientation tables.
---@Exampele Position3 = { p = Vec3, x = Vec3, y = Vec3, z = Vec3 }
---@return position3 class
function Object.getPosition(self) end
---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_getVelocity
---@return vec3 class
function Object.getVelocity(self) end
---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_inAir
---@return boolean
function Object.inAir(self) end
---Returns an enumerator that defines the country that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon
---https://wiki.hoggitworld.com/view/DCS_func_getCountry
---@return number enum country.id
function Object.getCountry(self) end
end
---@class StaticObject
StaticObject = {}
do
---Returns an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object and how the function is called. See enumerators Group.Category, Object.Category, and Spot.Category for further reference.
---https://wiki.hoggitworld.com/view/DCS_func_getCategoryEx
---@return number
function StaticObject.getCategoryEx(self) end
---Return a boolean value based on whether the object currently exists in the mission. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_isExist
---@return boolean
function StaticObject.isExist(self) end
---Destroys the object, physically removing it from the game world without creating an event. The object simply disappears. If used with a group, the entire group will be destroyed. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_destroy
function StaticObject.destroy(self) end
---Return an enumerator of the category for the specific object. The enumerator returned is dependent on the category of the object. See enumerators Group.Category, Object.Category, and Spot.Category for further reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase. When used with any of these objects the category returned is related to the Object.Category.
---https://wiki.hoggitworld.com/view/DCS_func_getCategory
---@return number enum
function StaticObject.getCategory(self) end
---Returns an enumerator that defines the coalition that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon
---https://wiki.hoggitworld.com/view/DCS_func_getCoalition
---@return number enum coalition.side: 0 = neutral, 1 = red, 2 = blue
function StaticObject.getCoalition(self) end
---Returns a string of the name of the object as defined by the mission editor or dynamic spawning functions. Function also works with Unit, Static Object, Airbase When run as Object.getName(obj) the value can be different than if run via Unit.getName(obj) or obj:getName(). It appears to be returning the runtime Id.
---https://wiki.hoggitworld.com/view/DCS_func_getName
---@return string
function StaticObject.getName(self) end
---Returns a number which defines the unique mission id of a given object.
---https://wiki.hoggitworld.com/view/DCS_func_getID
---@return number
function StaticObject.getID(self) end
---Returns the current "life" of a unit. Also referred to as "hit points". All units in DCS have a value that defines how much life is left. If this value is less than 1 the unit is considered "dead". Ground and ship units that are on fire and in the process of "cooking off" will return a life value of 0 until the object explodes. Aircraft are more complex due to sub-systems and damage models which will effect the life value.
---https://wiki.hoggitworld.com/view/DCS_func_getLife
---@return number
function StaticObject.getLife(self) end
---Return a string of the objects type name. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_getTypeName
---@return string
function StaticObject.getTypeName(self) end
---Return a description table of the given object. Table entries are dependent on the category of object and the sub-categories that may exist within that object type. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getDesc
---@return table
function StaticObject.getDesc(self) end
---Returns a boolean value if the object in question has the passed attribute. See Article list of Attributes or db_attibutes.lua in C:\Program Files\Eagle Dynamics\DCS World\Scripts\Database for more details. Additionally attributes for each object are defined within their DB lua file. DB files provided on github for reference. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_hasAttribute
---@return boolean
---@param attribute string
function StaticObject.hasAttribute(self, attribute) end
---Returns a vec3 table of the x, y, and z coordinates for the position of the given object in 3D space. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getPoint
---@return vec3 class
function StaticObject.getPoint(self) end
---Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getPosition
---@ExampleDesc Position 3 is a table consisting of the point and orientation tables.
---@Exampele Position3 = { p = Vec3, x = Vec3, y = Vec3, z = Vec3 }
---@return position3 class
function StaticObject.getPosition(self) end
---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_getVelocity
---@return vec3 class
function StaticObject.getVelocity(self) end
---Returns a vec3 table of the objects velocity vectors. Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase
---https://wiki.hoggitworld.com/view/DCS_func_inAir
---@return boolean
function StaticObject.inAir(self) end
---Returns an enumerator that defines the country that an object currently belongs to. Function also works with Unit, Static Object, Airbase, Weapon
---https://wiki.hoggitworld.com/view/DCS_func_getCountry
---@return number enum country.id
function StaticObject.getCountry(self) end
---Returns the current value for an animation argument on the external model of the given object. Each model animation has an id tied to with different values representing different states of the model. Animation arguments can be figured out by opening the respective 3d model in the modelviewer. For example you can determine the rotation and orientation of the barrel of a Tanks cannon by checking its animation arguments. More practically you can determine whether or not a helicopters doors are open. If draw argument value is invalid for the unit in question a value of 0 will be returned.
---https://wiki.hoggitworld.com/view/DCS_func_getDrawArgumentValue
---@Example Return -1 to +1 TODO:
---@param arg number
---@return number
function StaticObject.getDrawArgumentValue(self, arg) end
---Returns a string of a cargo objects mass in the format 'mass kg'. Can't be used to check IF an object is a cargo object. As of 1.2.16.38741 the simulator will crash if this function is passed a non cargo static object.
---https://wiki.hoggitworld.com/view/DCS_func_getCargoDisplayName
---@example 1500 kg
---@return string
function StaticObject.getCargoDisplayName(self) end
---Returns the mass of a cargo object measured in kg.
---https://wiki.hoggitworld.com/view/DCS_func_getCargoWeight
---@example 700
---@return number
function StaticObject.getCargoWeight(self) end
---Return a description table of the specified Object type. Object does not need to be in the mission in order to query its data. Function works with Unit, Static Object, Scenery Object, Airbase.
---https://wiki.hoggitworld.com/view/DCS_func_getDescByName
---@return table
---@param typeName string