Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_MilitaryBaseComponent.c
Go to the documentation of this file.
1 void ScriptInvokerServiceUnregisteredMethod(SCR_MilitaryBaseComponent militaryBaseComponent, SCR_ServicePointComponent serviceComponent);
3 typedef ScriptInvokerBase<ScriptInvokerServiceUnregisteredMethod> ScriptInvokerServiceUnregistered;
4 
5 class SCR_MilitaryBaseComponentClass : ScriptComponentClass
6 {
7 }
8 
9 class SCR_MilitaryBaseComponent : ScriptComponent
10 {
11  [Attribute("100"), RplProp(onRplName: "OnRadiusChanged")]
12  protected int m_iRadius;
13 
14  [Attribute("0", desc: "Not all capture points controlled are required for seizing this base, only the majority.")]
15  protected bool m_bSeizedByMajority;
16 
17  [Attribute("1")]
18  protected bool m_bShowNotifications;
19 
20  [Attribute("1")]
21  protected bool m_bShowMapIcon;
22 
23  [Attribute(ENotification.BASE_SEIZING_DONE_FRIENDLIES.ToString(), uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ENotification))]
24  protected ENotification m_eCapturedByFriendliesNotification;
25 
26  [Attribute(ENotification.BASE_SEIZING_DONE_ENEMIES.ToString(), uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ENotification))]
27  protected ENotification m_eCapturedByEnemiesNotification;
28 
29  static const int INVALID_BASE_CALLSIGN = -1;
30 
31  protected int m_iCallsignSignal = INVALID_BASE_CALLSIGN;
32 
33  protected string m_sCallsign;
34  protected string m_sCallsignUpper;
35  protected string m_sCallsignNameOnly;
36  protected string m_sCallsignNameOnlyUC;
37 
38  protected ref ScriptInvoker m_OnRadiusChanged;
39  protected ref ScriptInvoker m_OnServiceRegistered;
40  protected ref ScriptInvokerServiceUnregistered m_OnServiceUnregistered;
41 
42  protected ref array<SCR_MilitaryBaseLogicComponent> m_aSystems = {};
43  protected ref array<SCR_ServicePointDelegateComponent> m_aServiceDelegates = {};
44 
45  protected RplComponent m_RplComponent;
47 
48  [RplProp(onRplName: "OnCapturingFactionChanged")]
49  protected FactionKey m_sCapturingFaction;
50 
51  [RplProp(onRplName: "OnCallsignAssigned")]
52  protected int m_iCallsign = INVALID_BASE_CALLSIGN;
53 
54  //------------------------------------------------------------------------------------------------
55  protected bool IsProxy()
56  {
57  return (m_RplComponent && m_RplComponent.IsProxy());
58  }
59 
60  //------------------------------------------------------------------------------------------------
63  void AllowNotifications(bool allow)
64  {
65  m_bShowNotifications = allow;
66  }
67 
68  //------------------------------------------------------------------------------------------------
72  {
73  return m_bShowNotifications;
74  }
75 
76  //------------------------------------------------------------------------------------------------
79  {
81  }
82 
83  //------------------------------------------------------------------------------------------------
86  {
88  }
89 
90  //------------------------------------------------------------------------------------------------
92  ScriptInvoker GetOnRadiusChanged()
93  {
94  if (!m_OnRadiusChanged)
95  m_OnRadiusChanged = new ScriptInvoker();
96 
97  return m_OnRadiusChanged;
98  }
99 
100  //------------------------------------------------------------------------------------------------
102  ScriptInvoker GetOnServiceRegistered()
103  {
104  if (!m_OnServiceRegistered)
105  m_OnServiceRegistered = new ScriptInvoker();
106 
107  return m_OnServiceRegistered;
108  }
109 
110  //------------------------------------------------------------------------------------------------
113  {
114  if (!m_OnServiceUnregistered)
115  m_OnServiceUnregistered = new ScriptInvokerServiceUnregistered();
116 
117  return m_OnServiceUnregistered;
118  }
119 
120  //------------------------------------------------------------------------------------------------
122  void SetCallsign(notnull SCR_Faction faction)
123  {
124  if (m_iCallsign == INVALID_BASE_CALLSIGN)
125  return;
126 
127  SCR_MilitaryBaseCallsign callsignInfo = faction.GetBaseCallsignByIndex(m_iCallsign);
128 
129  if (!callsignInfo)
130  return;
131 
132  m_sCallsign = callsignInfo.GetCallsign();
133  m_sCallsignNameOnly = callsignInfo.GetCallsignShort();
134  m_sCallsignNameOnlyUC = callsignInfo.GetCallsignUpperCase();
135  m_iCallsignSignal = callsignInfo.GetSignalIndex();
136  }
137 
138  //------------------------------------------------------------------------------------------------
141  {
142  return m_iCallsign;
143  }
144 
145  //------------------------------------------------------------------------------------------------
148  {
149  return m_iCallsignSignal;
150  }
151 
152  //------------------------------------------------------------------------------------------------
155  {
156  SCR_Faction faction = SCR_Faction.Cast(SCR_FactionManager.SGetLocalPlayerFaction());
157 
158  if (faction)
159  {
160  SetCallsign(faction);
161  return;
162  }
163 
164  PlayerController pc = GetGame().GetPlayerController();
165 
166  if (!pc)
167  return;
168 
170 
171  if (!playerFactionAff)
172  return;
173 
174  playerFactionAff.GetOnPlayerFactionResponseInvoker_O().Insert(OnPlayerFactionResponse_O);
175  }
176 
177  //------------------------------------------------------------------------------------------------
178  protected void OnPlayerFactionResponse_O(SCR_PlayerFactionAffiliationComponent component, int factionIndex, bool response)
179  {
180  if (!response)
181  return;
182 
183  FactionManager factionManager = GetGame().GetFactionManager();
184 
185  if (!factionManager)
186  return;
187 
188  SCR_Faction faction = SCR_Faction.Cast(factionManager.GetFactionByIndex(factionIndex));
189 
190  if (!faction)
191  return;
192 
193  SetCallsign(faction);
194  }
195 
196  //------------------------------------------------------------------------------------------------
199  {
200  return m_sCallsignNameOnly;
201  }
202 
203  //------------------------------------------------------------------------------------------------
206  {
207  return m_sCallsign;
208  }
209 
210  //------------------------------------------------------------------------------------------------
213  {
214  return m_sCallsignNameOnlyUC;
215  }
216 
217  //------------------------------------------------------------------------------------------------
220  {
221  return m_sCallsignUpper;
222  }
223 
224  //------------------------------------------------------------------------------------------------
228  int GetServices(out array<SCR_ServicePointComponent> services = null)
229  {
230  int count;
231 
232  foreach (SCR_MilitaryBaseLogicComponent component : m_aSystems)
233  {
234  SCR_ServicePointComponent service = SCR_ServicePointComponent.Cast(component);
235 
236  if (service)
237  {
238  count++;
239 
240  if (services)
241  services.Insert(service);
242  }
243  }
244 
245  return count;
246  }
247 
248  //------------------------------------------------------------------------------------------------
252  int GetServicesByType(out array<SCR_ServicePointComponent> services, SCR_EServicePointType type)
253  {
254  int count;
255 
256  foreach (SCR_MilitaryBaseLogicComponent component : m_aSystems)
257  {
258  SCR_ServicePointComponent service = SCR_ServicePointComponent.Cast(component);
259 
260  if (service && service.GetType() == type)
261  {
262  count++;
263 
264  if (services)
265  services.Insert(service);
266  }
267  }
268 
269  return count;
270  }
271 
272  //------------------------------------------------------------------------------------------------
275  SCR_ServicePointComponent GetServiceByLabel(EEditableEntityLabel label)
276  {
277  foreach (SCR_MilitaryBaseLogicComponent component : m_aSystems)
278  {
279  SCR_ServicePointComponent service = SCR_ServicePointComponent.Cast(component);
280 
281  if (service && service.GetLabel() == label)
282  return service;
283  }
284 
285  return null;
286  }
287 
288  //------------------------------------------------------------------------------------------------
291  SCR_ServicePointComponent GetServiceByType(SCR_EServicePointType type)
292  {
293  foreach (SCR_MilitaryBaseLogicComponent component : m_aSystems)
294  {
295  SCR_ServicePointComponent service = SCR_ServicePointComponent.Cast(component);
296 
297  if (service && service.GetType() == type)
298  return service;
299  }
300 
301  return null;
302  }
303 
304  //------------------------------------------------------------------------------------------------
307  int GetServiceDelegates(out array<SCR_ServicePointDelegateComponent> delegates = null)
308  {
309  int count;
310 
311  foreach (SCR_ServicePointDelegateComponent delegate : m_aServiceDelegates)
312  {
313  if (delegate)
314  {
315  count++;
316 
317  if (delegates)
318  delegates.Insert(delegate);
319  }
320  }
321 
322  return count;
323  }
324 
325  //------------------------------------------------------------------------------------------------
329  int GetServiceDelegatesByType(out array<SCR_ServicePointDelegateComponent> delegates, SCR_EServicePointType type)
330  {
331  int count;
332 
333  foreach (SCR_ServicePointDelegateComponent delegate : m_aServiceDelegates)
334  {
335  if (delegate && delegate.GetType() == type)
336  {
337  count++;
338 
339  if (delegates)
340  delegates.Insert(delegate);
341  }
342  }
343 
344  return count;
345  }
346 
347  //------------------------------------------------------------------------------------------------
350  SCR_ServicePointDelegateComponent GetServiceDelegateByLabel(EEditableEntityLabel label)
351  {
352  foreach (SCR_ServicePointDelegateComponent delegate : m_aServiceDelegates)
353  {
354  if (delegate && delegate.GetLabel() == label)
355  return delegate;
356  }
357 
358  return null;
359  }
360 
361  //------------------------------------------------------------------------------------------------
364  SCR_ServicePointDelegateComponent GetServiceDelegateByType(SCR_EServicePointType type)
365  {
366  foreach (SCR_ServicePointDelegateComponent delegate : m_aServiceDelegates)
367  {
368  if (delegate && delegate.GetType() == type)
369  return delegate;
370  }
371 
372  return null;
373  }
374 
375  //------------------------------------------------------------------------------------------------
377  int GetBuildingProviders(out array<SCR_CampaignBuildingProviderComponent> providers)
378  {
379  int count;
380  SCR_CampaignBuildingProviderComponent provider;
381 
382  providers.Clear();
383 
384  foreach (SCR_MilitaryBaseLogicComponent component : m_aSystems)
385  {
386  provider = SCR_CampaignBuildingProviderComponent.Cast(component);
387 
388  if (provider)
389  {
390  count++;
391 
392  if (providers)
393  providers.Insert(provider);
394  }
395  }
396 
397  return count;
398  }
399 
400  //------------------------------------------------------------------------------------------------
404  int GetCapturePoints(out array<SCR_SeizingComponent> capturePoints)
405  {
406  int count;
407 
408  foreach (SCR_MilitaryBaseLogicComponent component : m_aSystems)
409  {
410  SCR_SeizingComponent capturePoint = SCR_SeizingComponent.Cast(component);
411 
412  if (capturePoint)
413  {
414  count++;
415 
416  if (capturePoints)
417  capturePoints.Insert(capturePoint);
418  }
419  }
420 
421  return count;
422  }
423 
424  //------------------------------------------------------------------------------------------------
428  int GetFlags(out array<SCR_FlagComponent> flags)
429  {
430  int count;
431 
432  foreach (SCR_MilitaryBaseLogicComponent component : m_aSystems)
433  {
434  SCR_FlagComponent flag = SCR_FlagComponent.Cast(component);
435 
436  if (flag)
437  {
438  count++;
439 
440  if (flags)
441  flags.Insert(flag);
442  }
443  }
444 
445  return count;
446  }
447 
448  //------------------------------------------------------------------------------------------------
450  void SetRadius(int radius)
451  {
452  if (IsProxy())
453  return;
454 
455  if (radius == m_iRadius)
456  return;
457 
458  if (radius <= 0)
459  {
460  Print("SCR_MilitaryBaseComponent: SetRadius called with suspicious value (" + radius + ").", LogLevel.WARNING);
461  radius = 0;
462  }
463 
464  m_iRadius = radius;
465 
466  Replication.BumpMe();
467  OnRadiusChanged();
468  }
469 
470  //------------------------------------------------------------------------------------------------
471  protected void OnRadiusChanged()
472  {
473  if (m_OnRadiusChanged)
474  m_OnRadiusChanged.Invoke(m_iRadius, this);
475  }
476 
477  //------------------------------------------------------------------------------------------------
479  int GetRadius()
480  {
481  return m_iRadius;
482  }
483 
484  //------------------------------------------------------------------------------------------------
486  void SetFaction(Faction faction)
487  {
488  if (IsProxy())
489  return;
490 
491  if (!m_FactionComponent)
492  return;
493 
494  m_FactionComponent.SetAffiliatedFaction(faction);
495  }
496 
497  //------------------------------------------------------------------------------------------------
499  void SetFaction(FactionKey faction)
500  {
501  if (IsProxy())
502  return;
503 
504  if (!m_FactionComponent)
505  return;
506 
507  m_FactionComponent.SetAffiliatedFactionByKey(faction);
508  }
509 
510  //------------------------------------------------------------------------------------------------
511  protected void OnFactionChanged(FactionAffiliationComponent owner, Faction previousFaction, Faction faction)
512  {
513  if (!GetGame().InPlayMode())
514  return;
515 
516  if (!IsProxy())
517  m_sCapturingFaction = FactionKey.Empty;
518 
519  foreach (SCR_MilitaryBaseLogicComponent comp : m_aSystems)
520  {
521  if (!comp)
522  continue;
523 
524  comp.OnBaseFactionChanged(faction);
525  }
526 
527  SCR_MilitaryBaseSystem.GetInstance().OnBaseFactionChanged(faction, this);
528 
529  if (!faction)
530  return;
531 
532  ChangeFlags(faction);
533 
534  if (m_bShowNotifications)
535  NotifyPlayerInRadius(faction);
536  }
537 
538  //------------------------------------------------------------------------------------------------
541  Faction GetFaction(bool checkDefaultFaction = false)
542  {
543  if (!m_FactionComponent)
544  return null;
545 
546  Faction faction = m_FactionComponent.GetAffiliatedFaction();
547 
548  if (!faction && checkDefaultFaction)
549  faction = m_FactionComponent.GetDefaultAffiliatedFaction();
550 
551  return faction;
552  }
553 
554  //------------------------------------------------------------------------------------------------
557  {
558  return GetGame().GetFactionManager().GetFactionByKey(m_sCapturingFaction);
559  }
560 
561  //------------------------------------------------------------------------------------------------
565  // To be overridden in inherited classes
566  void OnServiceStateChanged(SCR_EServicePointStatus state, notnull SCR_ServicePointComponent serviceComponent)
567  {
568 
569  }
570 
571  //------------------------------------------------------------------------------------------------
574  void RegisterServiceDelegate(notnull SCR_ServicePointDelegateComponent delegate)
575  {
576  m_aServiceDelegates.Insert(delegate);
577  }
578 
579  //------------------------------------------------------------------------------------------------
582  void UnregisterServiceDelegate(notnull SCR_ServicePointDelegateComponent delegate)
583  {
584  m_aServiceDelegates.RemoveItem(delegate);
585  }
586 
587  //------------------------------------------------------------------------------------------------
590  void RegisterLogicComponent(notnull SCR_MilitaryBaseLogicComponent component)
591  {
592  if (m_aSystems.Contains(component))
593  return;
594 
595  m_aSystems.Insert(component);
596 
597  SCR_ServicePointComponent service = SCR_ServicePointComponent.Cast(component);
598 
599  if (service)
600  {
601  if (m_OnServiceRegistered)
602  m_OnServiceRegistered.Invoke(this, service);
603 
604  OnServiceStateChanged(service.GetServiceState(), service);
605  service.GetOnServiceStateChanged().Insert(OnServiceStateChanged);
606  }
607 
608  SCR_MilitaryBaseSystem.GetInstance().OnLogicRegisteredInBase(component, this);
609 
610  SCR_FlagComponent flag = SCR_FlagComponent.Cast(component);
611 
612  if (flag && GetFaction())
613  GetGame().GetCallqueue().CallLater(ChangeFlags, 500, false, GetFaction()); // Give the system time to properly register slots
614 
615  if (!IsProxy())
616  {
617  SCR_SeizingComponent seizingComponent = SCR_SeizingComponent.Cast(component);
618 
619  if (seizingComponent)
620  {
621  seizingComponent.GetOnCaptureFinish().Insert(OnPointCaptured);
622  seizingComponent.GetOnCaptureStart().Insert(OnPointContested);
623  seizingComponent.GetOnCaptureInterrupt().Insert(OnPointSecured);
624  }
625  }
626  }
627 
628  //------------------------------------------------------------------------------------------------
631  void UnregisterLogicComponent(notnull SCR_MilitaryBaseLogicComponent component)
632  {
633  if (!m_aSystems.Contains(component))
634  return;
635 
636  m_aSystems.RemoveItem(component);
637 
638  SCR_ServicePointComponent service = SCR_ServicePointComponent.Cast(component);
639  SCR_MilitaryBaseSystem baseManager = SCR_MilitaryBaseSystem.GetInstance();
640 
641  if (baseManager)
642  baseManager.OnLogicUnregisteredInBase(component, this);
643 
644  if (service && baseManager)
645  {
646  service.GetOnServiceStateChanged().Remove(OnServiceStateChanged);
647 
648  if (m_OnServiceUnregistered)
649  m_OnServiceUnregistered.Invoke(this, service);
650  }
651 
652  if (!IsProxy())
653  {
654  SCR_SeizingComponent seizingComponent = SCR_SeizingComponent.Cast(component);
655 
656  if (seizingComponent)
657  {
658  seizingComponent.GetOnCaptureFinish().Remove(OnPointCaptured);
659  seizingComponent.GetOnCaptureStart().Remove(OnPointContested);
660  seizingComponent.GetOnCaptureInterrupt().Remove(OnPointSecured);
661  }
662  }
663  }
664 
665  //------------------------------------------------------------------------------------------------
669  void OnPointCaptured(notnull SCR_Faction faction, notnull SCR_SeizingComponent point)
670  {
671  if (faction == GetFaction())
672  return;
673 
674  array<SCR_SeizingComponent> capturePoints = {};
675  int pointsCount = GetCapturePoints(capturePoints);
676  int controlled;
677 
678  foreach (SCR_SeizingComponent capturePoint : capturePoints)
679  {
680  if (capturePoint == point || capturePoint.GetFaction() == faction)
681  controlled++;
682  }
683 
684  // Capture this base if the required amount of registered capture points has been seized
685  if (pointsCount == controlled || (m_bSeizedByMajority && controlled > (pointsCount - controlled)))
686  OnRequiredPointsCaptured(faction);
687  }
688 
689  //------------------------------------------------------------------------------------------------
693  void OnPointContested(notnull SCR_Faction faction, notnull SCR_SeizingComponent point)
694  {
695  if (faction == GetFaction())
696  return;
697 
698  array<SCR_SeizingComponent> capturePoints = {};
699  int pointsCount = GetCapturePoints(capturePoints);
700  int controlled;
701 
702  foreach (SCR_SeizingComponent capturePoint : capturePoints)
703  {
704  if (capturePoint.GetFaction() == faction)
705  controlled++;
706  }
707 
708  // This base is currently being seized
709  if (controlled + 1 == pointsCount || (m_bSeizedByMajority && controlled + 1 > (pointsCount - controlled)))
710  {
711  m_sCapturingFaction = faction.GetFactionKey();
713  }
714  }
715 
716  //------------------------------------------------------------------------------------------------
720  void OnPointSecured(notnull SCR_Faction faction, notnull SCR_SeizingComponent point)
721  {
722  if (faction != GetCapturingFaction())
723  return;
724 
725  array<SCR_SeizingComponent> capturePoints = {};
726  int pointsCount = GetCapturePoints(capturePoints);
727  int controlled;
728 
729  foreach (SCR_SeizingComponent capturePoint : capturePoints)
730  {
731  if (capturePoint.GetFaction() == faction)
732  controlled++;
733  }
734 
735  // This base is no longer being seized
736  if (controlled + 1 == pointsCount || (m_bSeizedByMajority && controlled + 1 > (pointsCount - controlled)))
737  {
738  m_sCapturingFaction = FactionKey.Empty;
740  }
741  }
742 
743  //------------------------------------------------------------------------------------------------
746  void OnRequiredPointsCaptured(notnull SCR_Faction faction)
747  {
748  SetFaction(faction);
749  }
750 
751  //------------------------------------------------------------------------------------------------
754  {
755  }
756 
757  //------------------------------------------------------------------------------------------------
758  protected void ChangeFlags(notnull Faction faction)
759  {
760  SCR_Faction factionCast = SCR_Faction.Cast(faction);
761 
762  if (!factionCast)
763  return;
764 
765  array<SCR_FlagComponent> flags = {};
766  GetFlags(flags);
767 
768  foreach (SCR_FlagComponent flagComponent : flags)
769  {
770  flagComponent.ChangeMaterial(factionCast.GetFactionFlagMaterial());
771  }
772  }
773 
774  //------------------------------------------------------------------------------------------------
775  protected bool GetIsLocalPlayerPresent()
776  {
777  IEntity player = GetGame().GetPlayerManager().GetPlayerControlledEntity(SCR_PlayerController.GetLocalPlayerId());
778 
779  if (!player)
780  return false;
781 
782  return GetIsEntityPresent(player);
783  }
784 
785  //------------------------------------------------------------------------------------------------
788  bool GetIsEntityPresent(notnull IEntity entity)
789  {
790  return (vector.DistanceSqXZ(entity.GetOrigin(), GetOwner().GetOrigin()) <= (m_iRadius * m_iRadius));
791  }
792 
793  //------------------------------------------------------------------------------------------------
794  protected void NotifyPlayerInRadius(notnull Faction faction)
795  {
796  Faction playerFaction = SCR_FactionManager.SGetLocalPlayerFaction();
797 
798  if (!playerFaction)
799  return;
800 
802  return;
803 
804  if (playerFaction == faction)
805  SCR_NotificationsComponent.SendLocal(m_eCapturedByFriendliesNotification);
806  else
807  SCR_NotificationsComponent.SendLocal(m_eCapturedByEnemiesNotification);
808  }
809 
810  //------------------------------------------------------------------------------------------------
811  override void EOnInit(IEntity owner)
812  {
813  super.EOnInit(owner);
814 
815  // Check for play mode again in case init event was set from outside of this class
816  if (!GetGame().InPlayMode())
817  return;
818 
819  SCR_MilitaryBaseSystem baseManager = SCR_MilitaryBaseSystem.GetInstance();
820 
821  if (baseManager)
822  baseManager.RegisterBase(this);
823  }
824 
825  //------------------------------------------------------------------------------------------------
826  override void OnPostInit(IEntity owner)
827  {
828  super.OnPostInit(owner);
829 
830  m_RplComponent = RplComponent.Cast(owner.FindComponent(RplComponent));
832 
833  // Attributes check
834  if (!m_RplComponent)
835  Print("SCR_MilitaryBaseComponent: RplComponent not found on owner entity. Multiplayer functionality will not be available.", LogLevel.WARNING);
836 
837  if (!m_FactionComponent)
838  Print("SCR_MilitaryBaseComponent: SCR_FactionAffiliationComponent not found on owner entity. Faction handling will not be available.", LogLevel.WARNING);
839 
840  if (m_iRadius <= 0)
841  {
842  Print("SCR_MilitaryBaseComponent: m_iRadius set to suspicious value (" + m_iRadius + ").", LogLevel.WARNING);
843  m_iRadius = 0;
844  }
845 
846  if (!GetGame().InPlayMode())
847  return;
848 
849  if (m_FactionComponent)
850  m_FactionComponent.GetOnFactionChanged().Insert(OnFactionChanged);
851 
852  SetEventMask(owner, EntityEvent.INIT);
853  }
854 
855  //------------------------------------------------------------------------------------------------
856  // destructor
858  {
859  SCR_MilitaryBaseSystem baseManager = SCR_MilitaryBaseSystem.GetInstance();
860 
861  if (baseManager)
862  baseManager.UnregisterBase(this);
863 
864  foreach (SCR_MilitaryBaseLogicComponent component : m_aSystems)
865  {
866  if (component)
867  component.UnregisterBase(this);
868  }
869  }
870 }
m_iCallsign
protected int m_iCallsign
Definition: SCR_MilitaryBaseComponent.c:52
EEditableEntityLabel
EEditableEntityLabel
Definition: EEditableEntityLabel.c:1
GetOnServiceUnregistered
ScriptInvokerServiceUnregistered GetOnServiceUnregistered()
Definition: SCR_MilitaryBaseComponent.c:112
OnCallsignAssigned
void OnCallsignAssigned()
Definition: SCR_MilitaryBaseComponent.c:154
GetCapturingFaction
Faction GetCapturingFaction()
Definition: SCR_MilitaryBaseComponent.c:556
m_sCapturingFaction
protected FactionKey m_sCapturingFaction
Definition: SCR_MilitaryBaseComponent.c:49
SCR_PlayerController
Definition: SCR_PlayerController.c:31
GetFlags
int GetFlags(out array< SCR_FlagComponent > flags)
Definition: SCR_MilitaryBaseComponent.c:428
m_FactionComponent
protected SCR_FactionAffiliationComponent m_FactionComponent
Definition: SCR_MilitaryBaseComponent.c:46
GetServiceDelegates
int GetServiceDelegates(out array< SCR_ServicePointDelegateComponent > delegates=null)
Definition: SCR_MilitaryBaseComponent.c:307
RegisterLogicComponent
void RegisterLogicComponent(notnull SCR_MilitaryBaseLogicComponent component)
Definition: SCR_MilitaryBaseComponent.c:590
GetFaction
Faction GetFaction(bool checkDefaultFaction=false)
Definition: SCR_MilitaryBaseComponent.c:541
SetRadius
void SetRadius(int radius)
Definition: SCR_MilitaryBaseComponent.c:450
ScriptInvokerServiceUnregisteredMethod
func ScriptInvokerServiceUnregisteredMethod
Definition: SCR_MilitaryBaseComponent.c:2
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
GetCallsignDisplayName
LocalizedString GetCallsignDisplayName()
Definition: SCR_MilitaryBaseComponent.c:205
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
GetCallsignSignal
int GetCallsignSignal()
Definition: SCR_MilitaryBaseComponent.c:147
OnCapturingFactionChanged
void OnCapturingFactionChanged()
Definition: SCR_MilitaryBaseComponent.c:753
RegisterServiceDelegate
void RegisterServiceDelegate(notnull SCR_ServicePointDelegateComponent delegate)
Definition: SCR_MilitaryBaseComponent.c:574
GetIsLocalPlayerPresent
protected bool GetIsLocalPlayerPresent()
Definition: SCR_MilitaryBaseComponent.c:775
SetCallsignIndexAutomatic
void SetCallsignIndexAutomatic(int index)
Definition: SCR_MilitaryBaseComponent.c:78
GetCallsignDisplayNameUpperCase
LocalizedString GetCallsignDisplayNameUpperCase()
Definition: SCR_MilitaryBaseComponent.c:219
SCR_MilitaryBaseSystem
Definition: SCR_MilitaryBaseSystem.c:11
GetCapturePoints
int GetCapturePoints(out array< SCR_SeizingComponent > capturePoints)
Definition: SCR_MilitaryBaseComponent.c:404
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
GetBuildingProviders
int GetBuildingProviders(out array< SCR_CampaignBuildingProviderComponent > providers)
Get all registered systems inherited from SCR_CampaignBuildingProviderComponent.
Definition: SCR_MilitaryBaseComponent.c:377
GetCallsign
int GetCallsign()
Definition: SCR_MilitaryBaseComponent.c:140
ChangeFlags
protected void ChangeFlags(notnull Faction faction)
Definition: SCR_MilitaryBaseComponent.c:758
func
func
Definition: SCR_AIThreatSystem.c:5
GetServiceDelegateByType
SCR_ServicePointDelegateComponent GetServiceDelegateByType(SCR_EServicePointType type)
Definition: SCR_MilitaryBaseComponent.c:364
AllowNotifications
void AllowNotifications(bool allow)
Definition: SCR_MilitaryBaseComponent.c:63
SetFaction
void SetFaction(Faction faction)
Definition: SCR_MilitaryBaseComponent.c:486
ENotification
ENotification
Definition: ENotification.c:4
GetOrigin
vector GetOrigin()
Definition: SCR_AIUtilityComponent.c:279
OnServiceStateChanged
void OnServiceStateChanged(SCR_EServicePointStatus state, notnull SCR_ServicePointComponent serviceComponent)
Definition: SCR_MilitaryBaseComponent.c:566
GetServiceDelegatesByType
int GetServiceDelegatesByType(out array< SCR_ServicePointDelegateComponent > delegates, SCR_EServicePointType type)
Definition: SCR_MilitaryBaseComponent.c:329
OnPlayerFactionResponse_O
protected void OnPlayerFactionResponse_O(SCR_PlayerFactionAffiliationComponent component, int factionIndex, bool response)
Definition: SCR_MilitaryBaseComponent.c:178
OnRequiredPointsCaptured
void OnRequiredPointsCaptured(notnull SCR_Faction faction)
Definition: SCR_MilitaryBaseComponent.c:746
IsProxy
protected bool IsProxy()
Definition: SCR_MilitaryBaseComponent.c:55
ScriptInvokerServiceUnregistered
ScriptInvokerBase< ScriptInvokerServiceUnregisteredMethod > ScriptInvokerServiceUnregistered
Definition: SCR_MilitaryBaseComponent.c:3
SCR_SeizingComponent
Definition: SCR_SeizingComponent.c:18
Attribute
SCR_MilitaryBaseComponentClass ScriptComponentClass Attribute("100")
SCR_MilitaryBaseComponentClass
Definition: SCR_MilitaryBaseComponent.c:5
m_RplComponent
protected RplComponent m_RplComponent
Definition: SCR_MilitaryBaseComponent.c:45
~SCR_MilitaryBaseComponent
void ~SCR_MilitaryBaseComponent()
Definition: SCR_MilitaryBaseComponent.c:857
OnPostInit
override void OnPostInit(IEntity owner)
Called on PostInit when all components are added.
Definition: SCR_MilitaryBaseComponent.c:826
NotificationsAllowed
bool NotificationsAllowed()
Definition: SCR_MilitaryBaseComponent.c:71
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
SetCallsign
void SetCallsign(notnull SCR_Faction faction)
Definition: SCR_MilitaryBaseComponent.c:122
GetServiceByLabel
SCR_ServicePointComponent GetServiceByLabel(EEditableEntityLabel label)
Definition: SCR_MilitaryBaseComponent.c:275
GetOnRadiusChanged
ScriptInvoker GetOnRadiusChanged()
Definition: SCR_MilitaryBaseComponent.c:92
GetServiceDelegateByLabel
SCR_ServicePointDelegateComponent GetServiceDelegateByLabel(EEditableEntityLabel label)
Definition: SCR_MilitaryBaseComponent.c:350
EOnInit
override void EOnInit(IEntity owner)
Definition: SCR_MilitaryBaseComponent.c:811
GetServices
int GetServices(out array< SCR_ServicePointComponent > services=null)
Definition: SCR_MilitaryBaseComponent.c:228
Faction
Definition: Faction.c:12
NotifyPlayerInRadius
protected void NotifyPlayerInRadius(notnull Faction faction)
Definition: SCR_MilitaryBaseComponent.c:794
GetServicesByType
int GetServicesByType(out array< SCR_ServicePointComponent > services, SCR_EServicePointType type)
Definition: SCR_MilitaryBaseComponent.c:252
SCR_PlayerFactionAffiliationComponent
Definition: SCR_PlayerFactionAffiliationComponent.c:16
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition: SCR_DestructionSynchronizationComponent.c:17
GetOnServiceRegistered
ScriptInvoker GetOnServiceRegistered()
Definition: SCR_MilitaryBaseComponent.c:102
OnFactionChanged
protected void OnFactionChanged(FactionAffiliationComponent owner, Faction previousFaction, Faction faction)
Event which is triggered when the owning faction changes.
Definition: SCR_MilitaryBaseComponent.c:511
GetCallsignDisplayNameOnly
LocalizedString GetCallsignDisplayNameOnly()
Definition: SCR_MilitaryBaseComponent.c:198
GetCallsignDisplayNameOnlyUC
LocalizedString GetCallsignDisplayNameOnlyUC()
Definition: SCR_MilitaryBaseComponent.c:212
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
GetServiceByType
SCR_ServicePointComponent GetServiceByType(SCR_EServicePointType type)
Definition: SCR_MilitaryBaseComponent.c:291
SCR_FactionAffiliationComponent
Definition: SCR_FactionAffiliationComponent.c:10
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition: SCR_FactionManager.c:461
GetIsEntityPresent
bool GetIsEntityPresent(notnull IEntity entity)
Definition: SCR_MilitaryBaseComponent.c:788
m_aServiceDelegates
protected ref array< SCR_ServicePointDelegateComponent > m_aServiceDelegates
Definition: SCR_MilitaryBaseComponent.c:43
LocalizedString
Definition: LocalizedString.c:21
SCR_EServicePointType
SCR_EServicePointType
Definition: SCR_ServicePointComponent.c:180
UnregisterServiceDelegate
void UnregisterServiceDelegate(notnull SCR_ServicePointDelegateComponent delegate)
Definition: SCR_MilitaryBaseComponent.c:582
OnPointCaptured
void OnPointCaptured(notnull SCR_Faction faction, notnull SCR_SeizingComponent point)
Definition: SCR_MilitaryBaseComponent.c:669
SCR_Faction
Definition: SCR_Faction.c:6
OnPointContested
void OnPointContested(notnull SCR_Faction faction, notnull SCR_SeizingComponent point)
Definition: SCR_MilitaryBaseComponent.c:693
UnregisterLogicComponent
void UnregisterLogicComponent(notnull SCR_MilitaryBaseLogicComponent component)
Definition: SCR_MilitaryBaseComponent.c:631
OnPointSecured
void OnPointSecured(notnull SCR_Faction faction, notnull SCR_SeizingComponent point)
Definition: SCR_MilitaryBaseComponent.c:720
RplProp
SCR_MilitaryBaseComponentClass ScriptComponentClass RplProp(onRplName:"OnRadiusChanged")
Definition: SCR_MilitaryBaseComponent.c:11
GetRadius
int GetRadius()
Definition: SCR_MilitaryBaseComponent.c:479
SetCallsignIndex
void SetCallsignIndex(int index)
Definition: SCR_MilitaryBaseComponent.c:85
OnRadiusChanged
protected void OnRadiusChanged()
Definition: SCR_MilitaryBaseComponent.c:471