Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_MineInventoryItemComponent.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/Components", description: "Mine inventory item component.")]
3 {
4 }
5 
6 class SCR_MineInventoryItemComponent : SCR_PlaceableInventoryItemComponent
7 {
8  protected static ref ScriptInvokerInt s_onMinePlaced;
9 
10  //------------------------------------------------------------------------------------------------
11  override void PlacementDone(notnull IEntity user)
12  {
13  super.PlacementDone(user);
14 
15  SCR_PressureTriggerComponent pressureTrigger = SCR_PressureTriggerComponent.Cast(GetOwner().FindComponent(SCR_PressureTriggerComponent));
16  if (!pressureTrigger)
17  return;
18 
19  pressureTrigger.SetUser(user);
20 
21  if (s_onMinePlaced)
22  s_onMinePlaced.Invoke(GetGame().GetPlayerManager().GetPlayerIdFromControlledEntity(user));
23  }
24 
25  //------------------------------------------------------------------------------------------------
26  override bool ShouldHideInVicinity()
27  {
28  SCR_PressureTriggerComponent triggerComponent = SCR_PressureTriggerComponent.Cast(GetOwner().FindComponent(SCR_PressureTriggerComponent));
29  if (!triggerComponent)
30  return false;
31 
32  return triggerComponent.IsActivated();
33  }
34 
35  //------------------------------------------------------------------------------------------------
37  static ScriptInvokerInt GetOnMinePlaced()
38  {
39  if (!s_onMinePlaced)
41 
42  return s_onMinePlaced;
43  }
44 }
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
ScriptInvokerInt
ScriptInvokerBase< ScriptInvokerIntMethod > ScriptInvokerInt
Definition: SCR_ScriptInvokerHelper.c:24
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
ShouldHideInVicinity
override bool ShouldHideInVicinity()
Definition: SCR_MineInventoryItemComponent.c:26
SCR_PlaceableInventoryItemComponentClass
Definition: SCR_PlaceableInventoryItemComponent.c:2
s_onMinePlaced
SCR_MineInventoryItemComponentClass s_onMinePlaced
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
PlacementDone
override void PlacementDone(notnull IEntity user)
Definition: SCR_MineInventoryItemComponent.c:11
SCR_MineInventoryItemComponentClass
Definition: SCR_MineInventoryItemComponent.c:2
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180