-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscar-api.chunk03.lua
997 lines (834 loc) · 34.9 KB
/
scar-api.chunk03.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
--- Returns true if the distance between a target squad and the source entity is less than it entity's sight distance. There is no LOS or FOW check.
---@param entity Entity
---@param target Squad
---@return boolean
function Entity_CanSeeSquad(entity, target) end
--- Clears any previous posture suggestions made to an entity
---@param entity Entity
function Entity_ClearPostureSuggestion(entity) end
--- Clears the tagged entity used for debugging
function Entity_ClearTagDebug() end
--- Instantly adds an upgrade to a given entity
---@param pEntity Entity
---@param upgradePBG ScarUpgradePBG
function Entity_CompleteUpgrade(pEntity, upgradePBG) end
--- Creates an entity at a given position and assigns it to a given player. 'blueprint' is a string value containing the name of the entity blueprint. This function does not spawn the entity so you will need to call Entity_Spawn to see this entity
---@param ebp ScarEntityPBG
---@param player Player
---@param pos ScarPosition
---@param toward ScarPosition
---@return Entity
function Entity_Create(ebp, player, pos, toward) end
--- Creates an entity at a given position and assigns it to a given player. 'blueprint' is a string value containing the name of the entity blueprint. This function spawns the entity so there is no need to call Entity_Spawn
---@param ebp ScarEntityPBG
---@param pos ScarPosition
---@param toward ScarPosition
---@return Entity
function Entity_CreateENV(ebp, pos, toward) end
--- DeSpawn the entity at its current position
---@param entity Entity
function Entity_DeSpawn(entity) end
--- Remove an entity from the world and destroy it.
---@param entity Entity
function Entity_Destroy(entity) end
--- Disables the death of the given entity building, only works for panel based destructible buldings
---@param pEntity Entity
---@param bDisableDeath boolean
---@return boolean
function Entity_DisableBuildingDeath(pEntity, bDisableDeath) end
--- Damages this entity but only if its a destructible building
---@param pEntity Entity
---@param cam ScarPosition
---@param terrain ScarPosition
---@param dmgType integer
---@param isDestory boolean
---@param radius number
function Entity_DoBuildingDamageRay(pEntity, cam, terrain, dmgType, isDestory, radius) end
--- Sets whether an entity pays attention to its surroundings
---@param entity Entity
---@param attentive boolean
function Entity_EnableAttention(entity, attentive) end
--- Sets whether an entity can produce anything (including upgrades)
---@param entity Entity
---@param enable boolean
function Entity_EnableProductionQueue(entity, enable) end
--- Sets whether an strategic point is active
---@param entity Entity
---@param enable boolean
function Entity_EnableStrategicPoint(entity, enable) end
--- Force constructs this entity but only if its a building
---@param e Entity
function Entity_ForceConstruct(e) end
--- Get an entity from a mission editor ID.
---@param id integer
---@return Entity
function Entity_FromWorldID(id) end
--- Returns the active entity command.
---@param entity Entity
---@return Entity
function Entity_GetActiveCommand(entity) end
--- Returns the entity's blueprint
---@param entity Entity
---@return ScarEntityPBG
function Entity_GetBlueprint(entity) end
--- Returns the construction progress (with range [0.0, 1.0] for a given entity. Returns 0.0 if the entity is not a building.
---@param pEntity Entity
---@return number
function Entity_GetBuildingProgress(pEntity) end
--- Get cover safety value from the where the entity is standing. The safety value is number from -.5 to .5.
---@param entity Entity
---@return number
function Entity_GetCoverValue(entity) end
--- Returns the entities unique id in the world
---@param entity Entity
---@return integer
function Entity_GetGameID(entity) end
--- Returns the heading of the entity. The heading is currently a lua table with three entries (x, y, z)
---@param entity Entity
---@return ScarPosition
function Entity_GetHeading(entity) end
--- Returns the health of an entity.
---@param entity Entity
---@return number
function Entity_GetHealth(entity) end
--- Returns the max health of an entity.
---@param entity Entity
---@return number
function Entity_GetHealthMax(entity) end
--- Returns the percentage health, taking into account destructible buildings
---@param entity Entity
---@return number
function Entity_GetHealthPercentage(entity) end
--- Check if the entity is invulnerable or not
---@param squad Squad
---@return boolean
function Entity_GetInvulnerable(squad) end
--- Returns the invulnerable point in terms of percentage
---@param entity Entity
---@return number
function Entity_GetInvulnerableMinCap(entity) end
--- get if an entity is invulnerable to critical effects
---@param entity Entity
---@return boolean
function Entity_GetInvulnerableToCritical(entity) end
--- Find the last squad attacker on this entity. If found, the squad is added to the sgroup
---@param entity Entity
---@param group SGroup
function Entity_GetLastAttacker(entity, group) end
--- Find the squad attackers on this entity from the last seconds specified. If found, the squads are added to the sgroup. Building attackers are ignored
---@param entity Entity
---@param group SGroup
---@param timeSeconds number
function Entity_GetLastAttackers(entity, group, timeSeconds) end
--- Gets the maximum capture crew size from a recrewable entity
---@param entity Entity
---@return integer
function Entity_GetMaxCaptureCrewSize(entity) end
--- Returns a position relative to an entity's current position and orientation. see LuaConsts.scar for explanation of 'offset' parameter.
---@param entity Entity
---@param offset integer
---@param distance number
---@return ScarPosition
function Entity_GetOffsetPosition(entity, offset, distance) end
--- Returns the Player owner of the given entity. Entity MUST NOT be owned by the world.
---@param entity Entity
---@return Player
function Entity_GetPlayerOwner(entity) end
--- Returns the position of the entity. The position is currently a lua table with three entries (x, y, z)
---@param entity Entity
---@return ScarPosition
function Entity_GetPosition(entity) end
--- Returns the blueprint for a production queue item with index.
---@param entity Entity
---@param index integer
---@return PropertyBagGroup
function Entity_GetProductionQueueItem(entity, index) end
--- Returns the production type (PITEM_Upgrade, PITEM_Spawn, PITEM_SquadUpgrade, PITEM_SquadReinforce, PITEM_PlayerUpgrade) for a production queue item with index.
---@param entity Entity
---@param index integer
---@return ProductionItemType
function Entity_GetProductionQueueItemType(entity, index) end
--- Returns the number of items in the entities production queue.
---@param entity Entity
---@return integer
function Entity_GetProductionQueueSize(entity) end
--- Returns the radius of the entity
---@param entity Entity
---@return number
function Entity_GetRadius(entity) end
--- Returns the resource type of this point
---@param entity Entity
---@return ResourceType
function Entity_GetResourceType(entity) end
--- Returns the inner sight radius for this entity
---@param entity Entity
---@return number
function Entity_GetSightInnerHeight(entity) end
--- Returns the inner sight radius for this entity
---@param entity Entity
---@return number
function Entity_GetSightInnerRadius(entity) end
--- Returns the outer sight radius for this entity
---@param entity Entity
---@return number
function Entity_GetSightOuterHeight(entity) end
--- Returns the outer sight radius for this entity
---@param entity Entity
---@return number
function Entity_GetSightOuterRadius(entity) end
--- Returns the Squad for the passed Entity. (May be nullptr)
---@param pEntity Entity
---@return Squad
function Entity_GetSquad(pEntity) end
--- Adds squads held by an entity to an SGroup
---@param pEntity Entity
---@param sgroup SGroup
---@return boolean
function Entity_GetSquadsHeld(pEntity, sgroup) end
--- Gets the total number of panels in a building (returns 0 for anything but panel based destructible buldings)
---@param pEntity Entity
---@return integer
function Entity_GetTotalPanelCount(pEntity) end
--- Gets the current number of undestroyed panels in a building (returns 0 for anything but panel based destructible buldings)
---@param pEntity Entity
---@return integer
function Entity_GetUndestroyedPanelCount(pEntity) end
--- Returns a weapon hardpoint ( 0 indexed )
---@param entity Entity
---@param hardPointIndex integer
---@return ScarWeaponPBG
function Entity_GetWeaponBlueprint(entity, hardPointIndex) end
--- Returns how many hardpoints an entity has
---@param entity Entity
---@return integer
function Entity_GetWeaponHardpointCount(entity) end
--- Checks if an entity has an ability
---@param entity Entity
---@param ability Ability
---@return boolean
function Entity_HasAbility(entity, ability) end
--- Return true if the entity has any critical applied to it
---@param pEntity Entity
---@return boolean
function Entity_HasAnyCritical(pEntity) end
--- Return true if the entity has the given criticalID applied to it
---@param pEntity Entity
---@param criticalPBG ScarCriticalPBG
---@return boolean
function Entity_HasCritical(pEntity, criticalPBG) end
--- Returns true if an entity has a production queue.
---@param entity Entity
---@return boolean
function Entity_HasProductionQueue(entity) end
--- Return true if the entity has purchased the specified upgrade.
---@param pEntity Entity
---@param upgradePBG ScarUpgradePBG
---@return boolean
function Entity_HasUpgrade(pEntity, upgradePBG) end
--- Strategic point will be captured instantly by the team of the supplied player
---@param entity Entity
---@param player Player
function Entity_InstantCaptureStrategicPoint(entity, player) end
--- Reverts an occupied building
---@param entity Entity
function Entity_InstantRevertOccupiedBuilding(entity) end
--- Returns true if entity is still alive
---@param pEntity Entity
---@return integer
function Entity_IsAlive(pEntity) end
--- Returns true if the entity is attacking within the time
---@param entity Entity
---@param time number
---@return boolean
function Entity_IsAttacking(entity, time) end
--- Returns true if the given entity is a building
---@param e Entity
---@return boolean
function Entity_IsBuilding(e) end
--- Returns true if the given entity is burning (buildings on fire or non-buildings with burn_exts)
---@param e Entity
---@return boolean
function Entity_IsBurning(e) end
--- Returns whether the entity is camouflaged.
---@param entity Entity
---@return boolean
function Entity_IsCamouflaged(entity) end
--- Returns true if the entity is a capturable building
---@param entity Entity
---@return boolean
function Entity_IsCapturableBuilding(entity) end
--- Returns true if entity is a casualty else false
---@param entity Entity
---@return boolean
function Entity_IsCasualty(entity) end
--- Returns whether this entity is cuttable
---@param entity Entity
---@return boolean
function Entity_IsCuttable(entity) end
--- Returns whether this entity's demolition charges are ready to be detonated
---@param entity Entity
---@return boolean
function Entity_IsDemolitionReady(entity) end
--- Returns true if the given blueprint is a building
---@param ebp ScarEntityPBG
---@return integer
function Entity_IsEBPBuilding(ebp) end
--- Returns true if the given blueprint is objcover
---@param ebp ScarEntityPBG
---@return boolean
function Entity_IsEBPObjCover(ebp) end
--- Returns true if the given blueprint is of the given type. Types are defined in type_ext/unit_type_list.
---@param ebp ScarEntityPBG
---@param type string
---@return boolean
function Entity_IsEBPOfType(ebp, type) end
--- Returns whether a hardpoint is active ( 0 indexed )
---@param entity Entity
---@param hardPointIndex integer
---@return boolean
function Entity_IsHardpointActive(entity, hardPointIndex) end
--- Check if the entity has a hold on anything
---@param entity Entity
---@return boolean
function Entity_IsHoldingAny(entity) end
--- Returns true if entity is in cover.
---@param entityId Entity
---@return boolean
function Entity_IsInCover(entityId) end
--- Returns whether an entity is moving.
---@param pEntity Entity
---@return boolean
function Entity_IsMoving(pEntity) end
--- Determines if this entity is of the given type. Types are defined in type_ext/unit_type_list
---@param entity Entity
---@param type string
---@return boolean
function Entity_IsOfType(entity, type) end
--- Returns true if the entity is part of a squad
---@param pEntity Entity
---@return boolean
function Entity_IsPartOfSquad(pEntity) end
--- Returns whether an entity is a plane (has a flight extension)
---@param pEntity Entity
---@return boolean
function Entity_IsPlane(pEntity) end
--- Return true if the entity is a slot item
---@param entity Entity
---@return boolean
function Entity_IsSlotItem(entity) end
--- Returns whether an entity is a soldier
---@param pEntity Entity
---@return boolean
function Entity_IsSoldier(pEntity) end
--- if entity is spawned return true
---@param entity Entity
---@return boolean
function Entity_IsSpawned(entity) end
--- Returns true if the entity is a starting position
---@param entity Entity
---@return boolean
function Entity_IsStartingPosition(entity) end
--- Returns true if the entity is a strategic point.
---@param entity Entity
---@return boolean
function Entity_IsStrategicPoint(entity) end
--- Returns true if strategic point is captured by the team of the player provided.
---@param entity Entity
---@param player Player
---@return boolean
function Entity_IsStrategicPointCapturedBy(entity, player) end
--- Return true if the entity is a team weapon
---@param entity Entity
---@return boolean
function Entity_IsSyncWeapon(entity) end
--- Returns true if the entity is under attack.
---@param entity Entity
---@param time number
---@return boolean
function Entity_IsUnderAttack(entity, time) end
--- Returns true if the entity is under attack by a certain player
---@param entity Entity
---@param pAttackerOwner Player
---@param time number
---@return boolean
function Entity_IsUnderAttackByPlayer(entity, pAttackerOwner, time) end
--- Returns true if the entity was under attack from a certain direction (8 offset types, see LuaConsts.scar)
---@param entity Entity
---@param offset integer
---@param timeSeconds number
---@return boolean
function Entity_IsUnderAttackFromDirection(entity, offset, timeSeconds) end
--- Check if an entity with the given ID can be found in the world
---@param id integer
---@return boolean
function Entity_IsValid(id) end
--- Returns whether an entity can be vaulted
---@param pEntity Entity
---@return boolean
function Entity_IsVaultable(pEntity) end
--- Returns whether an entity is a vehicle
---@param pEntity Entity
---@return boolean
function Entity_IsVehicle(pEntity) end
--- Returns true if entityID is a victory point
---@param pEntity Entity
---@return boolean
function Entity_IsVictoryPoint(pEntity) end
--- Kill the entity. Sets health to 0, and triggers death effects.
---@param entity Entity
function Entity_Kill(entity) end
--- Calls a function when an entity gets destroyed by the player clicking the "Detonate me" button next to an entity.
---@param entity Entity
---@param _function function
function Entity_NotifyOnPlayerDemolition(entity, _function) end
--- get entity pop cost, use CT_Personnel, CT_Vehicle, CT_Medic for captype
---@param entity Entity
---@param type CapType
---@return number
function Entity_Population(entity, type) end
--- Removes all booby-traps on this entity
---@param pEntityTarget Entity
function Entity_RemoveBoobyTraps(pEntityTarget) end
--- Remove a critical from a given entity
---@param pEntity Entity
---@param criticalPBG ScarCriticalPBG
function Entity_RemoveCritical(pEntity, criticalPBG) end
--- Removes all demolition charges on an entity
---@param entity Entity
function Entity_RemoveDemolitions(entity) end
--- Removes an upgrade from an entity
---@param entity Entity
---@param upgrade ScarUpgradePBG
function Entity_RemoveUpgrade(entity, upgrade) end
--- Trigger animation action for an entity. Please only use this for simple animations
---@param pEntity Entity
---@param actionName string
function Entity_SetAnimatorAction(pEntity, actionName) end
--- Set animation action parameter for an entity. Please only use this for simple animations
---@param pEntity Entity
---@param actionParameterName string
---@param actionParameterValue string
function Entity_SetAnimatorActionParameter(pEntity, actionParameterName, actionParameterValue) end
--- Set animation event for an entity. Please only use this for simple animations
---@param pEntity Entity
---@param eventName string
function Entity_SetAnimatorEvent(pEntity, eventName) end
--- Set animation state of a state machine for an entity. Please only use this for simple animations
---@param pEntity Entity
---@param stateMachineName string
---@param stateName string
function Entity_SetAnimatorState(pEntity, stateMachineName, stateName) end
--- Set animation variable value for an entity. Please only use this for simple animations
---@param pEntity Entity
---@param variableName string
---@param value number
function Entity_SetAnimatorVariable(pEntity, variableName, value) end
--- Set the visual fire state of a building (doesn't actually set the building on fire)
---@param pEntity Entity
---@param newFireState BuildingFireState
function Entity_SetBuildingVisualFireState(pEntity, newFireState) end
--- Overrides crushable behavior for an entity
---@param entity Entity
---@param crushable boolean
function Entity_SetCrushable(entity, crushable) end
--- Changes the crush mode of a given entity. Entity must have a crush extension.
---@param entity Entity
---@param mode CrushMode
function Entity_SetCrushMode(entity, mode) end
--- Fully wires this entity for demolitions, if it's set up to be demolishable. 'player' is the one that owns the demolitions and can detonate them.
---@param player Player
---@param entity Entity
---@param numcharges integer
---@return boolean
function Entity_SetDemolitions(player, entity, numcharges) end
---
---@param enable boolean
---@param pEntity Entity
function Entity_SetEnableCasualty(enable, pEntity) end
--- Sets the heading of the entity. The position is currently a lua table with three entries (x, y, z)
---@param entity Entity
---@param pos ScarPosition
---@param bInterpolate boolean
function Entity_SetHeading(entity, pos, bInterpolate) end
--- Set the health of an entity. healthPercent must be in the range [0.0, 1.0].
---@param entity Entity
---@param healthPercent number
function Entity_SetHealth(entity, healthPercent) end
--- Set invulnerability on the entity. Reset time is in seconds. If it it set, the invulnerability will expire after this time.
---@param entity Entity
---@param enable boolean
---@param reset_time number
function Entity_SetInvulnerable(entity, enable, reset_time) end
--- Make an entity invulnerable to physical damage when health is below the minimum health percentage
---@param entity Entity
---@param minHealthPercentage number
---@param resetTime number
function Entity_SetInvulnerableMinCap(entity, minHealthPercentage, resetTime) end
--- set an entity invulnerable to critical effects. Invulnerable to critical also means that kills a entity will not have effect
---@param entity Entity
---@param invulnerable boolean
function Entity_SetInvulnerableToCritical(entity, invulnerable) end
--- Sets an object on fire (also works on buildings)
---@param pEntity Entity
function Entity_SetOnFire(pEntity) end
--- Changes the owner of the given squad.
---@param entity Entity
---@param owner Player
function Entity_SetPlayerOwner(entity, owner) end
--- Sets the position of the entity. The position is currently a lua table with three entries (x, y, z)
---@param entity Entity
---@param pos ScarPosition
function Entity_SetPosition(entity, pos) end
--- Sets whether or not a projectile can explode.
---@param projectile Entity
---@param canExplode boolean
function Entity_SetProjectileCanExplode(projectile, canExplode) end
--- Sets an entity to be recrewable or not when it becomes abandoned
---@param entity Entity
---@param capturable boolean
function Entity_SetRecrewable(entity, capturable) end
--- Enables shared team production on a building (teammates can build using THEIR resources)
---@param entity Entity
---@param shared boolean
function Entity_SetSharedProductionQueue(entity, shared) end
--- Sets a strategic point to neutral (not owned by any team)
---@param entity Entity
function Entity_SetStrategicPointNeutral(entity) end
--- Makes an entity neutral
---@param entity Entity
function Entity_SetWorldOwned(entity) end
--- Shows/hides the entity in the simulation
---@param entity Entity
---@param hide boolean
function Entity_SimHide(entity, hide) end
--- Spawn the entity at its current position
---@param entity Entity
function Entity_Spawn(entity) end
--- Abruptly stops an active ability
---@param entity Entity
---@param ability ScarAbilityPBG
---@param bEarlyExit boolean
function Entity_StopAbility(entity, ability, bEarlyExit) end
--- Suggests a posture to an entity, lasting the passed duration
---@param entity Entity
---@param posture integer
---@param duration number
function Entity_SuggestPosture(entity, posture, duration) end
--- Returns whether this entity is set up to have demolitions placed on it
---@param entity Entity
---@return boolean
function Entity_SupportsDemolition(entity) end
--- Tags the entity to be used for debugging
---@param entity Entity
function Entity_TagDebug(entity) end
--- Hides or shows an entity visually.
---@param pEntity Entity
---@param bHide boolean
function Entity_VisHide(pEntity, bHide) end
--- Checks if this entity can cause suppression.
---@param aiPlayer Player
---@param entity Entity
---@return boolean
function EntityQuery_CanCauseSuppression(aiPlayer, entity) end
--- Check if the entity can load squad and shoot its target after loading (This function should only be called by AI)
---@param entity Entity
---@param squad Squad
---@param bCheckSquadState boolean
---@param bOverload boolean
---@return boolean
function EntityQuery_CanLoadSquadAndAttackCurrentTarget(entity, squad, bCheckSquadState, bOverload) end
--- Find the closest open position from a given position for a given Entity blueprint.
---@param aiPlayer Player
---@param pEntityPBG PropertyBagGroup
---@param posIn ScarPosition
---@return ScarPosition
function EntityQuery_FindClosestOpenPositionForStructure(aiPlayer, pEntityPBG, posIn) end
--- Converts any enum value to a number.
---@param var any
---@return integer
function Enum_ToNumber(var) end
--- Converts any enum value to a string.
---@param var any
---@return string
function Enum_ToString(var) end
--- Creates a Callback Event that triggers when ALL of the specified events are triggered.
---@param callback function
---@param data table
---@param events table
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, events: table)
function Event_CreateAND(callback, data, events, delay) end
--- Creates a Callback Event that triggers when ANY of the specified events are triggered.
---@param callback function
---@param data table
---@param events table
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, events: table)
function Event_CreateOR(callback, data, events, delay) end
--- Pauses for a given amount of time. This function MUST be called from a CTRL object in NISlet events only!
---@param seconds number
function Event_Delay(seconds) end
--- Callback given callback function with data, when the given squad/entity/position is on screen.
---@param callback function
---@param data table
---@param player Player
---@param element Marker|ScarPosition|SGroup|EGroup
---@param all any|boolean
---@param percent number
---@param canSee boolean
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, player: Player, element: Marker|ScarPosition|SGroup|EGroup)
---@overload fun(callback: function, data: table, player: Player, element: Marker|ScarPosition|SGroup|EGroup, all: any|boolean)
---@overload fun(callback: function, data: table, player: Player, element: Marker|ScarPosition|SGroup|EGroup, all: any|boolean, percent: number)
---@overload fun(callback: function, data: table, player: Player, element: Marker|ScarPosition|SGroup|EGroup, all: any|boolean, percent: number, canSee: boolean)
function Event_ElementOnScreen(callback, data, player, element, all, percent, canSee, delay) end
--- Trigger a Callback when an encounter is killed.
---@param callback function
---@param data table
---@param unknown table|encID
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table)
---@overload fun(callback: function, data: table, unknown: table|encID)
function Event_EncounterIsDead(callback, data, unknown, delay) end
--- checks to see if the given event currently exists
---@param eventID EventID
---@return boolean
function Event_Exists(eventID) end
--- Callback given callback function with data, when the egroup is burning
---@param callback function
---@param data table
---@param group_entityID EGroup|Entity
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, group_entityID: EGroup|Entity)
function Event_GroupBurning(callback, data, group_entityID, delay) end
--- Callback when the number of squads/entities in a group is <= count.
---@param callback any
---@param data table
---@param group EGroup|SGroup
---@param count integer
---@param spawned boolean
---@param delay number
---@return EventID
function Event_GroupCount(callback, data, group, count, spawned, delay) end
--- Callback given callback function with data, when entire group has a specified critical.
---@param callback function
---@param data table
---@param group SGroup
---@param delay_1 number
---@param Critical Blueprint
---@param ALL boolean
---@param delay_2 number
---@return EventID
function Event_GroupHasCritical(callback, data, group, delay_1, Critical, ALL, delay_2) end
--- Callback given callback function with data, when group is dead (empty).
---@param callback function
---@param data table
---@param group EGroup|SGroup
---@param delay number
---@param retreating boolean
---@return EventID
---@overload fun(callback: function, data: table, group: EGroup|SGroup)
---@overload fun(callback: function, data: table, group: EGroup|SGroup, delay: number)
function Event_GroupIsDead(callback, data, group, delay, retreating) end
--- Callback given callback function with data, when group is not pinned
---@param callback function
---@param data table
---@param group SGroup
---@param ANY_ALL boolean
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, group: SGroup)
---@overload fun(callback: function, data: table, group: SGroup, ANY_ALL: boolean)
function Event_GroupIsNotPinned(callback, data, group, ANY_ALL, delay) end
--- Callback given callback function with data, when group is not suppressed.
---@param callback function
---@param data table
---@param group SGroup
---@param ANY_ALL boolean
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, group: SGroup)
---@overload fun(callback: function, data: table, group: SGroup, ANY_ALL: boolean)
function Event_GroupIsNotSuppressed(callback, data, group, ANY_ALL, delay) end
--- Callback given callback function with data, when group is pinned
---@param callback function
---@param data table
---@param group SGroup
---@param ANY_ALL boolean
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, group: SGroup)
---@overload fun(callback: function, data: table, group: SGroup, ANY_ALL: boolean)
function Event_GroupIsPinned(callback, data, group, ANY_ALL, delay) end
--- Callback given callback function with data, when group is suppressed.
---@param callback function
---@param data table
---@param group SGroup
---@param ANY_ALL boolean
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, group: SGroup)
---@overload fun(callback: function, data: table, group: SGroup, ANY_ALL: boolean)
function Event_GroupIsSuppressed(callback, data, group, ANY_ALL, delay) end
--- Callback given callback function with data, when the amount of entities left in a group drops below amount.
---@param callback function
---@param data table
---@param group EGroup|SGroup
---@param amount integer
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, group: EGroup|SGroup, amount: integer)
function Event_GroupLeftAlive(callback, data, group, amount, delay) end
--- Returns true if any event is currently running [at or below (more important than) the priority threshold. If not specified, ignores threshold.]
---@param priority_threshold integer
---@return boolean
---@overload fun()
function Event_IsAnyRunning(priority_threshold) end
--- Callback given callback function with data, when group is doing an attack in the last attackTime seconds.
---@param callback function
---@param data table
---@param group EGroup|SGroup
---@param all any|boolean
---@param attackTime number
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, group: EGroup|SGroup, all: any|boolean, attackTime: number)
function Event_IsDoingAttack(callback, data, group, all, attackTime, delay) end
--- Callback given callback function with data, when group is doing an attack or is under attack in the last attackTime seconds.
---@param callback function
---@param data table
---@param group EGroup|SGroup
---@param all any|boolean
---@param attackTime number
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, group: EGroup|SGroup, all: any|boolean, attackTime: number)
function Event_IsEngaged(callback, data, group, all, attackTime, delay) end
--- Callback given callback function with data, when an element is holding anything or nothing.
---@param callback function
---@param data table
---@param target EGroup|SGroup|Entity|Squad
---@param empty boolean
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, target: EGroup|SGroup|Entity|Squad, empty: boolean)
function Event_IsHoldingAny(callback, data, target, empty, delay) end
--- Callback given callback function with data, when an element is holding a specific BP.
---@param callback function
---@param data table
---@param target EGroup|SGroup|Entity|Squad
---@param blueprint Squad|table
---@param delay number
---@return EventID
function Event_IsHoldingBP(callback, data, target, blueprint, delay) end
--- Callback given callback function with data, when a target element is in a hold or not.
---@param callback function
---@param data table
---@param target SGroup|Squad
---@param inHold boolean
---@param delay number
---@return EventID
function Event_IsInHold(callback, data, target, inHold, delay) end
--- Returns true if a given event is running.
---@param f function
---@return boolean
function Event_IsQueued(f) end
--- Returns true if a given event is running.
---@param f function
---@return boolean
function Event_IsRunning(f) end
--- Callback when a target element is selected.
---@param callback function
---@param data table
---@param target SGroup|Squad|EGroup|Entity
---@param delay number
---@return EventID
function Event_IsSelected(callback, data, target, delay) end
--- Callback given callback function with data, when group is under attack in the last attackTime seconds.
---@param callback function
---@param data table
---@param group EGroup|SGroup
---@param ANY_ALL boolean
---@param attackTime number
---@param player Player
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, group: EGroup|SGroup, ANY_ALL: boolean, attackTime: number)
---@overload fun(callback: function, data: table, group: EGroup|SGroup, ANY_ALL: boolean, attackTime: number, player: Player)
function Event_IsUnderAttack(callback, data, group, ANY_ALL, attackTime, player, delay) end
--- Callback when an SGroup's member count <= amount.
---@param callback function
---@param data table
---@param sgroup SGroup
---@param amount integer
---@param delay number
---@return EventID
function Event_MembersCount(callback, data, sgroup, amount, delay) end
--- Callback given callback function with data, a narrative event is running.
---@param callback function
---@param data table
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table)
function Event_NarrativeEventsNotRunning(callback, data, delay) end
--- Callback given callback function with data, when no narrative events are running.
---@param callback function
---@param data table
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table)
function Event_NarrativeEventsRunning(callback, data, delay) end
--- Callback given callback function with data, when the given objective has started.
---@param callback function
---@param data table
---@param Objective ObjectiveID
---@param delay number
---@return EventID
function Event_ObjectiveStarted(callback, data, Objective, delay) end
--- Callback given callback function with data, when an element's health falls below (or above if higher is true) given threshold.
---@param callback function
---@param data table
---@param target EGroup|SGroup|Entity|Squad
---@param threshold number
---@param higher boolean
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, target: EGroup|SGroup|Entity|Squad, threshold: number, higher: boolean)
function Event_OnHealth(callback, data, target, threshold, higher, delay) end
--- Callback given function with data, when player has greater than or equal to amountOfBuildings
---@param callback function
---@param data table
---@param player Player
---@param unknown integer
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, player: Player)
---@overload fun(callback: function, data: table, player: Player, unknown: integer)
function Event_PlayerBuildingCount(callback, data, player, unknown, delay) end
--- Callback given callback function with data, when the given player can not see the element.
---@param callback function
---@param data table
---@param player Player
---@param element Squad|SGroup|Entity|EGroup|Marker|ScarPosition|table
---@param all any|boolean
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, player: Player, element: Squad|SGroup|Entity|EGroup|Marker|ScarPosition|table)
---@overload fun(callback: function, data: table, player: Player, element: Squad|SGroup|Entity|EGroup|Marker|ScarPosition|table, all: any|boolean)
function Event_PlayerCanNotSeeElement(callback, data, player, element, all, delay) end
--- Callback given callback function with data, when the given player can see the element.
---@param callback function
---@param data table
---@param player_team Player|integer
---@param element Squad|SGroup|Entity|EGroup|Marker|ScarPosition|table
---@param all any|boolean
---@param delay number
---@return EventID
---@overload fun(callback: function, data: table, player_team: Player|integer, element: Squad|SGroup|Entity|EGroup|Marker|ScarPosition|table)
---@overload fun(callback: function, data: table, player_team: Player|integer, element: Squad|SGroup|Entity|EGroup|Marker|ScarPosition|table, all: any|boolean)
function Event_PlayerCanSeeElement(callback, data, player_team, element, all, delay) end