Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_CampaignBuildingPlacingEditorComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/Editor", description: "Main conflict editor component to handle building mode placing", icon: "WBData/ComponentEditorProps/componentEditor.png")]
3 {
4  [Attribute(params: "et", desc: "List of prefabs that are ignored for clipping check.")]
5  protected ref array<ResourceName> m_aClippingCheckIgnoredPrefabs;
6 
7  bool ContainPrefab(ResourceName res)
8  {
9  if (m_aClippingCheckIgnoredPrefabs.Contains(res))
10  return true;
11 
12  return false;
13  }
14 }
15 
16 //------------------------------------------------------------------------------------------------
17 class SCR_CampaignBuildingPlacingEditorComponent : SCR_PlacingEditorComponent
18 {
19  [Attribute("{C7EE4C198B641E21}Sounds/Editor/BaseBuilding/Editor_BaseBuilding.acp", UIWidgets.ResourceNamePicker, "Sound project file to be used for building", "acp")]
20  protected ResourceName m_sSoundFile;
21 
22  [Attribute("", UIWidgets.ResourcePickerThumbnail, "WP that is spawned as default for placed AI.", "et")]
23  protected ResourceName m_sDefaultAIWP;
24 
25  protected bool m_bCanBeCreated = true;
26  protected SCR_CampaignBuildingEditorComponent m_CampaignBuildingComponent;
28  protected IEntity m_Provider;
31 
32  //------------------------------------------------------------------------------------------------
34  protected bool GetProviderBase(out SCR_MilitaryBaseComponent base)
35  {
36  SCR_CampaignBuildingProviderComponent providerComponent = SCR_CampaignBuildingProviderComponent.Cast(m_Provider.FindComponent(SCR_CampaignBuildingProviderComponent));
37  if (!providerComponent)
38  return false;
39 
40  base = SCR_MilitaryBaseComponent.Cast(m_Provider.FindComponent(SCR_MilitaryBaseComponent));
41  if (!base)
42  return false;
43 
44  return true;
45  }
46 
47  //------------------------------------------------------------------------------------------------
49  protected void OnPreviewCreated(SCR_EditablePreviewEntity previewEnt)
50  {
51  if (!previewEnt)
52  return;
53 
54  SCR_CampaignBuildingPlacingObstructionEditorComponent obstructionComponent = SCR_CampaignBuildingPlacingObstructionEditorComponent.Cast(FindEditorComponent(SCR_CampaignBuildingPlacingObstructionEditorComponent, true, true));
55  if (!obstructionComponent)
56  return;
57 
58  obstructionComponent.OnPreviewCreated(previewEnt);
59  }
60 
61  //------------------------------------------------------------------------------------------------
63  protected void SetInitialCanBeCreatedState(notnull SCR_EditablePreviewEntity previewEnt)
64  {
65  if (!previewEnt)
66  return;
67 
68  float distance = vector.DistanceSq(m_AreaTrigger.GetOrigin(), previewEnt.GetOrigin());
69  if (distance < m_AreaTrigger.GetSphereRadius() * m_AreaTrigger.GetSphereRadius())
70  m_bCanBeCreated = true;
71 
72  m_bCanBeCreated = false;
74  return;
75  }
76 
77  //------------------------------------------------------------------------------------------------
78  override void OnBeforeEntityCreatedServer(ResourceName prefab)
79  {
80  // Get SCR_CampaignBuildingManagerComponent (on Game mode) here and set temporary owner.
81  BaseGameMode gameMode = GetGame().GetGameMode();
82 
83  SCR_CampaignBuildingManagerComponent buildingManagerComponent = SCR_CampaignBuildingManagerComponent.Cast(gameMode.FindComponent(SCR_CampaignBuildingManagerComponent));
84  if (!buildingManagerComponent || !m_CampaignBuildingComponent)
85  return;
86 
87  buildingManagerComponent.SetTemporaryProvider(m_CampaignBuildingComponent.GetProviderEntity());
88  }
89 
90  //------------------------------------------------------------------------------------------------
91  override void OnEntityCreatedServer(array<SCR_EditableEntityComponent> entities)
92  {
94  return;
95 
96  int cooldownTime, aiBudgetValue;
97  int count = entities.Count();
98  SCR_EditorLinkComponent linkComponent;
99  SCR_EditableGroupComponent editableGroupComponent;
100  SCR_CampaignBuildingCompositionComponent compositionComponent;
101  SCR_AIGroup aiGroup;
102 
103  for (int i = 0; i < count; i++)
104  {
105  IEntity entityOwner = entities[i].GetOwnerScripted();
106  if (!entityOwner)
107  continue;
108 
109  linkComponent = SCR_EditorLinkComponent.Cast(entityOwner.FindComponent(SCR_EditorLinkComponent));
110  if (!linkComponent)
111  SCR_EditorLinkComponent.IgnoreSpawning(false);
112 
113  editableGroupComponent = SCR_EditableGroupComponent.Cast(entities[i]);
114  if (editableGroupComponent)
115  {
116  // Set Free Roam building Ai flag both group and characters in it to be able to process them on saving / loading as they use it's own struct.
117  SetAiFlag(editableGroupComponent);
118 
119  aiGroup = editableGroupComponent.GetAIGroupComponent();
120  if (aiGroup)
121  {
122  aiGroup.GetOnInit().Insert(InitGroup);
123 
124  EntitySpawnParams params = EntitySpawnParams();
125  params.TransformMode = ETransformMode.WORLD;
126  params.Transform[3] = aiGroup.GetOrigin();
127  SCR_AIWaypoint defendWP = SCR_AIWaypoint.Cast(GetGame().SpawnEntityPrefabLocal(Resource.Load(m_sDefaultAIWP), null, params));
128 
129  aiGroup.AddWaypointAt(defendWP, 0);
130  }
131  }
132 
133  compositionComponent = SCR_CampaignBuildingCompositionComponent.Cast(entityOwner.FindComponent(SCR_CampaignBuildingCompositionComponent));
134  if (compositionComponent)
135  SetProviderAndBuilder(compositionComponent);
136 
137  if (!UseCooldown())
138  continue;
139 
140  cooldownTime = GetEntityBudgetValue(entities[i], EEditableEntityBudget.COOLDOWN);
141  aiBudgetValue = GetEntityBudgetValue(entities[i], EEditableEntityBudget.AI);
142  }
143 
144  SetCooldownTimer(cooldownTime);
145  SetAIBudget(aiBudgetValue);
146  }
147 
148  //------------------------------------------------------------------------------------------------
150  protected void GetCooldownTimeClient(int prefabID, SCR_EditableEntityComponent entity)
151  {
153  }
154 
155  //------------------------------------------------------------------------------------------------
156  protected void GetAIBudgetClient(int prefabID, SCR_EditableEntityComponent entity)
157  {
159  }
160 
161  //------------------------------------------------------------------------------------------------
164  {
165  array<ref SCR_EntityBudgetValue> outBudgets = {};
166  entity.GetEntityChildrenBudgetCost(outBudgets);
167 
168  if (outBudgets.IsEmpty())
169  entity.GetEntityBudgetCost(outBudgets);
170 
171  foreach (SCR_EntityBudgetValue outBudget: outBudgets)
172  {
173  if (outBudget.GetBudgetType() == budget)
174  return outBudget.GetBudgetValue();
175  }
176 
177  return 0;
178  }
179 
180  //------------------------------------------------------------------------------------------------
182  protected void SetProviderAndBuilder(notnull SCR_CampaignBuildingCompositionComponent compositionComponent)
183  {
184  IEntity provider = m_CampaignBuildingComponent.GetProviderEntity();
185  if (!provider)
186  return;
187 
188  SCR_EditorManagerEntity managerEnt = GetManager();
189  if (!managerEnt)
190  return;
191 
192  int id = managerEnt.GetPlayerID();
193 
194  compositionComponent.SetBuilderId(id);
195  compositionComponent.SetProviderEntity(provider);
196 
197  // Don't set up this hook if the provider is a base. We don't want to change the ownership here
198  SCR_CampaignBuildingProviderComponent providerComponent = SCR_CampaignBuildingProviderComponent.Cast(provider.FindComponent(SCR_CampaignBuildingProviderComponent));
199  if (!providerComponent)
200  return;
201 
202  SCR_MilitaryBaseComponent base = providerComponent.GetMilitaryBaseComponent();
203  if (base)
204  return;
205 
207  compositionComponent.SetClearProviderEvent(ent);
208  }
209 
210  //------------------------------------------------------------------------------------------------
212  void InitGroup(SCR_AIGroup aiGroup)
213  {
214  if (!aiGroup)
215  return;
216 
217  aiGroup.GetOnInit().Remove(InitGroup);
218 
219  array<AIAgent> outAgents = {};
220  IEntity ent;
221  SCR_EditableEntityComponent editableEntityComponent;
222  SCR_CampaignBuildingProviderComponent providerComponent;
223 
224  aiGroup.GetAgents(outAgents);
225 
226  foreach (AIAgent agent: outAgents)
227  {
228  ent = agent.GetControlledEntity();
229  editableEntityComponent = SCR_EditableEntityComponent.Cast(ent.FindComponent(SCR_EditableEntityComponent));
230  if (editableEntityComponent)
231  SetAiFlag(editableEntityComponent);
232 
233  providerComponent = SCR_CampaignBuildingProviderComponent.Cast(m_Provider.FindComponent(SCR_CampaignBuildingProviderComponent));
234  if (!providerComponent)
235  continue;
236 
237  providerComponent.SetOnEntityKilled(agent.GetControlledEntity());
238  }
239  }
240 
241  //------------------------------------------------------------------------------------------------
243  {
244  component.SetEntityFlag(EEditableEntityFlag.FREE_ROAM_BUILDING_AI, true);
245  }
246 
247  //------------------------------------------------------------------------------------------------
248  protected void OnPlaceEntityServer(int prefabID, SCR_EditableEntityComponent entity)
249  {
250  vector position = entity.GetOwner().GetOrigin();
251  Rpc(PlaySoundEvent, position, m_sSoundFile);
252  PlaySoundEvent(position, m_sSoundFile);
253  }
254 
255  //------------------------------------------------------------------------------------------------
256  [RplRpc(RplChannel.Reliable, RplRcver.Broadcast)]
257  protected void PlaySoundEvent(vector pos, string soundEvent)
258  {
259  vector transform[4];
260  Math3D.MatrixIdentity4(transform);
261  transform[3] = pos;
262 
263  if (soundEvent && pos)
264  AudioSystem.PlayEvent(soundEvent, SCR_SoundEvent.SOUND_BUILD, transform, new array<string>, new array<float>);
265  }
266 
267  //------------------------------------------------------------------------------------------------
268  [RplRpc(RplChannel.Reliable, RplRcver.Server)]
269  override protected void CreateEntityServer(SCR_EditorPreviewParams params, RplId prefabID, int playerID, int entityIndex, bool isQueue, array<RplId> recipientIds, bool canBePlayer)
270  {
271  // Cancel spawning of the composition instantly and spawn a composition layout instead.
272  SCR_EditorLinkComponent.IgnoreSpawning(true);
273 
274  // Cancel a services registration to base - register once the final structure is erected.
275  SCR_ServicePointComponent.SpawnAsOffline(true);
276 
277  super.CreateEntityServer(params, prefabID, playerID, entityIndex, isQueue, recipientIds, canBePlayer);
278  }
279 
280  //------------------------------------------------------------------------------------------------
281  // Check if the preview is outisde of the building radius. if preview doesn't exist return false - preview doesn't exist on server and the same CanCreateEntity is used on server too.
283  {
284  if (!m_AreaTrigger || !m_PreviewEnt)
285  return false;
286 
287  return (vector.DistanceSqXZ(m_AreaTrigger.GetOrigin(), m_PreviewEnt.GetOrigin()) >= m_AreaTrigger.GetSphereRadius() * m_AreaTrigger.GetSphereRadius());
288  }
289 
290  //------------------------------------------------------------------------------------------------
292  ResourceName GetOutlineToSpawn(notnull SCR_EditableEntityComponent entity)
293  {
294  BaseGameMode gameMode = GetGame().GetGameMode();
295  if (!gameMode)
296  return string.Empty;
297 
298  SCR_CampaignBuildingManagerComponent buildingManagerComponent = SCR_CampaignBuildingManagerComponent.Cast(gameMode.FindComponent(SCR_CampaignBuildingManagerComponent));
299  if (!buildingManagerComponent)
300  return string.Empty;
301 
302  SCR_CampaignBuildingCompositionOutlineManager outlineManager = buildingManagerComponent.GetOutlineManager();
303  if (!outlineManager)
304  return string.Empty;
305 
306  return outlineManager.GetCompositionOutline(entity);
307  }
308 
309  //------------------------------------------------------------------------------------------------
310  override bool CanCreateEntity(out ENotification outNotification = -1, inout SCR_EPreviewState previewStateToShow = SCR_EPreviewState.PLACEABLE)
311  {
312  SCR_CampaignBuildingPlacingObstructionEditorComponent obstructionComponent = SCR_CampaignBuildingPlacingObstructionEditorComponent.Cast(FindEditorComponent(SCR_CampaignBuildingPlacingObstructionEditorComponent, true, true));
313  if (!obstructionComponent)
314  {
315  outNotification = ENotification.EDITOR_PLACING_BLOCKED;
316  return false;
317  }
318 
319  if (obstructionComponent.IsPreviewOutOfRange(outNotification))
320  {
321  previewStateToShow = SCR_EPreviewState.BLOCKED;
322  return false;
323  }
324 
325  return obstructionComponent.CanCreate(outNotification, previewStateToShow);
326  }
327 
328  //------------------------------------------------------------------------------------------------
329  override protected void EOnEditorActivate()
330  {
331  super.EOnEditorActivate();
332  InitVariables();
333  SetInitialEvent();
334  }
335 
336  //------------------------------------------------------------------------------------------------
337  override protected void EOnEditorActivateServer()
338  {
339  InitVariables();
340  GetOnPlaceEntityServer().Insert(OnPlaceEntityServer);
341  }
342 
343  //------------------------------------------------------------------------------------------------
344  override protected void EOnEditorOpen()
345  {
346  super.EOnEditorOpen();
347  InitVariables();
348  GetOnPlaceEntity().Insert(GetCooldownTimeClient);
349  }
350 
351  //------------------------------------------------------------------------------------------------
352  override protected void EOnEditorClose()
353  {
354  super.EOnEditorClose();
355  GetOnPlaceEntity().Remove(GetCooldownTimeClient);
356  }
357 
358  //------------------------------------------------------------------------------------------------
359  override protected void EOnEditorOpenServer()
360  {
361  super.EOnEditorOpenServer();
362  InitVariables();
363  }
364 
365  //------------------------------------------------------------------------------------------------
366  private void SetInitialEvent()
367  {
369  if (!m_PreviewManager)
370  return;
371 
372  m_PreviewManager.GetOnPreviewCreate().Insert(OnPreviewCreated);
373  }
374 
375  //------------------------------------------------------------------------------------------------
376  private void InitVariables()
377  {
378  m_CampaignBuildingComponent = SCR_CampaignBuildingEditorComponent.Cast(FindEditorComponent(SCR_CampaignBuildingEditorComponent, true, true));
380  return;
381 
382  m_Provider = m_CampaignBuildingComponent.GetProviderEntity();
384  }
385 
386  //------------------------------------------------------------------------------------------------
387  override protected void EOnEditorDeactivateServer()
388  {
389  GetOnPlaceEntityServer().Remove(OnPlaceEntityServer);
390  }
391 
392  //------------------------------------------------------------------------------------------------
394  bool UseCooldown()
395  {
396  SCR_CampaignBuildingProviderComponent providerComponent = SCR_CampaignBuildingProviderComponent.Cast(m_Provider.FindComponent(SCR_CampaignBuildingProviderComponent));
397  if (!providerComponent)
398  return false;
399 
400  return providerComponent.IsBudgetToEvaluate(EEditableEntityBudget.COOLDOWN);
401  }
402 
403  //------------------------------------------------------------------------------------------------
404  void SetCooldownTimer(int cooldownTime)
405  {
406  SCR_EditorManagerEntity managerEnt = GetManager();
407  if (!managerEnt)
408  return;
409 
410  int playerId = managerEnt.GetPlayerID();
411 
412  SCR_CampaignBuildingProviderComponent providerComponent = SCR_CampaignBuildingProviderComponent.Cast(m_Provider.FindComponent(SCR_CampaignBuildingProviderComponent));
413  if (!providerComponent)
414  return;
415 
416  providerComponent.SetPlayerCooldown(playerId, cooldownTime);
417  }
418 
419  //------------------------------------------------------------------------------------------------
420  void SetAIBudget(int value)
421  {
422  SCR_CampaignBuildingProviderComponent providerComponent = SCR_CampaignBuildingProviderComponent.Cast(m_Provider.FindComponent(SCR_CampaignBuildingProviderComponent));
423  if (!providerComponent)
424  return;
425 
426  providerComponent.AddAIValue(value);
427  }
428 }
429 
431 {
433  BLOCKED = 1,
434 }
IsPreviewOutOfRange
bool IsPreviewOutOfRange()
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:282
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
SetAiFlag
void SetAiFlag(SCR_EditableEntityComponent component)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:242
OnPreviewCreated
protected void OnPreviewCreated(SCR_EditablePreviewEntity previewEnt)
Method called when the preview of prefab to build is created.
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:49
EEditableEntityFlag
EEditableEntityFlag
Unique flags of the entity.
Definition: EEditableEntityFlag.c:5
SetCooldownTimer
void SetCooldownTimer(int cooldownTime)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:404
ECantBuildNotificationType
ECantBuildNotificationType
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:430
m_Provider
protected IEntity m_Provider
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:28
SetInitialCanBeCreatedState
protected void SetInitialCanBeCreatedState(notnull SCR_EditablePreviewEntity previewEnt)
Set the initial state of the preview can / can't be created (based on the place where player place th...
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:63
m_bCanBeCreated
protected bool m_bCanBeCreated
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:25
SetAIBudget
void SetAIBudget(int value)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:420
GetAIBudgetClient
protected void GetAIBudgetClient(int prefabID, SCR_EditableEntityComponent entity)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:156
Attribute
SCR_CampaignBuildingPlacingEditorComponentClass SCR_PlacingEditorComponentClass Attribute("{C7EE4C198B641E21}Sounds/Editor/BaseBuilding/Editor_BaseBuilding.acp", UIWidgets.ResourceNamePicker, "Sound project file to be used for building", "acp")] protected ResourceName m_sSoundFile
SCR_EditablePreviewEntity
Definition: SCR_EditablePreviewEntity.c:8
EOnEditorClose
override protected void EOnEditorClose()
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:352
OUT_OF_AREA
@ OUT_OF_AREA
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:432
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_AIWaypoint
Definition: SCR_AIWaypoint.c:5
SCR_SoundEvent
Definition: SCR_SoundEvent.c:1
m_PreviewManager
private SCR_PreviewEntityEditorComponent m_PreviewManager
Definition: SCR_CursorEditorUIComponent.c:22
OnPlaceEntityServer
protected void OnPlaceEntityServer(int prefabID, SCR_EditableEntityComponent entity)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:248
OnEntityCreatedServer
override void OnEntityCreatedServer(array< SCR_EditableEntityComponent > entities)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:91
m_sDefaultAIWP
protected ResourceName m_sDefaultAIWP
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:23
m_eBlockingReason
protected ECantBuildNotificationType m_eBlockingReason
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:29
SetProviderAndBuilder
protected void SetProviderAndBuilder(notnull SCR_CampaignBuildingCompositionComponent compositionComponent)
Set the provider and builder entity to composition. Provider is the entity to which a composition bel...
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:182
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_EditableGroupComponent
void SCR_EditableGroupComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_EditableGroupComponent.c:703
EOnEditorDeactivateServer
override protected void EOnEditorDeactivateServer()
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:387
SCR_EditorModeEntity
Definition: SCR_EditorModeEntity.c:22
SCR_EPreviewState
SCR_EPreviewState
Definition: SCR_PreviewEntityEditorComponent.c:1138
RplRpc
SCR_AchievementsHandlerClass ScriptComponentClass RplRpc(RplChannel.Reliable, RplRcver.Owner)] void UnlockOnClient(AchievementId achievement)
Definition: SCR_AchievementsHandler.c:11
GetEntityBudgetValue
int GetEntityBudgetValue(notnull SCR_EditableEntityComponent entity, EEditableEntityBudget budget)
Get value of given budget for given entity.
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:163
SCR_CampaignBuildingPlacingEditorComponentClass
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:2
EEditableEntityBudget
EEditableEntityBudget
Definition: EEditableEntityBudget.c:1
m_PreviewEnt
protected SCR_EditablePreviewEntity m_PreviewEnt
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:30
GetCooldownTimeClient
protected void GetCooldownTimeClient(int prefabID, SCR_EditableEntityComponent entity)
The placement is driven by a cooldown set on server. However for a client needs (to show him a remain...
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:150
InitVariables
private void InitVariables()
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:376
EOnEditorActivateServer
override protected void EOnEditorActivateServer()
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:337
m_aClippingCheckIgnoredPrefabs
protected ref array< ResourceName > m_aClippingCheckIgnoredPrefabs
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:3
ENotification
ENotification
Definition: ENotification.c:4
SCR_FreeRoamBuildingClientTriggerEntity
Definition: SCR_FreeRoamBuildingClientTriggerEntity.c:6
GetOutlineToSpawn
ResourceName GetOutlineToSpawn(notnull SCR_EditableEntityComponent entity)
Search for the outline that is assigned to this composition to be spawned.
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:292
SetInitialEvent
private void SetInitialEvent()
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:366
EOnEditorOpen
override protected void EOnEditorOpen()
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:344
BLOCKED
@ BLOCKED
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:433
SCR_CampaignBuildingCompositionOutlineManager
Definition: SCR_CampaignBuildingCompositionOutlineRegistry.c:6
distance
float distance
Definition: SCR_DestructibleTreeV2.c:29
SCR_EntityBudgetValue
Definition: SCR_EntityBudgetValue.c:2
OnBeforeEntityCreatedServer
override void OnBeforeEntityCreatedServer(ResourceName prefab)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:78
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
m_CampaignBuildingComponent
protected SCR_CampaignBuildingEditorComponent m_CampaignBuildingComponent
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:26
m_AreaTrigger
protected SCR_FreeRoamBuildingClientTriggerEntity m_AreaTrigger
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:27
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
GetProviderBase
protected bool GetProviderBase(out SCR_MilitaryBaseComponent base)
Return the base which belongs to a provider (if any)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:34
EOnEditorOpenServer
override protected void EOnEditorOpenServer()
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:359
PlaySoundEvent
protected void PlaySoundEvent(vector pos, string soundEvent)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:257
CanCreateEntity
override bool CanCreateEntity(out ENotification outNotification=-1, inout SCR_EPreviewState previewStateToShow=SCR_EPreviewState.PLACEABLE)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:310
SCR_AIGroup
Definition: SCR_AIGroup.c:68
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
EOnEditorActivate
override protected void EOnEditorActivate()
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:329
CreateEntityServer
override protected void CreateEntityServer(SCR_EditorPreviewParams params, RplId prefabID, int playerID, int entityIndex, bool isQueue, array< RplId > recipientIds, bool canBePlayer)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:269
SCR_PlacingEditorComponent
Definition: SCR_PlacingEditorComponent.c:118
UseCooldown
bool UseCooldown()
Check if the cooldown is set with this provider.
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:394
InitGroup
void InitGroup(SCR_AIGroup aiGroup)
Init spawned AI group (set events and flags)
Definition: SCR_CampaignBuildingPlacingEditorComponent.c:212
position
vector position
Definition: SCR_DestructibleTreeV2.c:30
SCR_EditorPreviewParams
Network packet of variables for entity placing and transformation.
Definition: SCR_EditorPreviewParams.c:4
SCR_PlacingEditorComponentClass
Definition: SCR_PlacingEditorComponent.c:2
SCR_PreviewEntityEditorComponent
Definition: SCR_PreviewEntityEditorComponent.c:12
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
SCR_EditorManagerEntity
Definition: SCR_EditorManagerEntity.c:26