Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_PlaceableItemComponent.c
Go to the documentation of this file.
1 [EntityEditorProps(category: "GameScripted/Components", description: "")]
2 class SCR_PlaceableItemComponentClass : ScriptComponentClass
3 {
4 }
5 
6 class SCR_PlaceableItemComponent : ScriptComponent
7 {
8  [Attribute(params: "xob")]
9  protected ResourceName m_sPreviewObject;
10 
11  [Attribute("0.5084", desc: "Max placement distance in meters.")]
12  protected float m_fMaxPlacementDistance;
13 
14  [Attribute(uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(SCR_EPlacementType))]
15  protected SCR_EPlacementType m_ePlacementType;
16 
17  //------------------------------------------------------------------------------------------------
19  SCR_EPlacementType GetPlacementType()
20  {
21  return m_ePlacementType;
22  }
23 
24  //------------------------------------------------------------------------------------------------
27  {
28  return m_fMaxPlacementDistance;
29  }
30 
31  //------------------------------------------------------------------------------------------------
34  {
35  if (m_sPreviewObject.IsEmpty())
36  return GetOwner().GetVObject();
37 
38  Resource resource = Resource.Load(m_sPreviewObject);
39  if (!resource.IsValid())
40  return GetOwner().GetVObject();
41 
42  BaseResourceObject resourceObject = resource.GetResource();
43  if (!resourceObject)
44  return GetOwner().GetVObject();
45 
46  return resourceObject.ToVObject();
47  }
48 }
49 
51 {
54 }
Attribute
SCR_PlaceableItemComponentClass ScriptComponentClass Attribute(params:"xob")
Definition: SCR_PlaceableItemComponent.c:8
EntityEditorProps
enum EQueryType EntityEditorProps(category:"GameScripted/Sound", description:"THIS IS THE SCRIPT DESCRIPTION.", color:"0 0 255 255")
Definition: SCR_AmbientSoundsComponent.c:12
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
SCR_EPlacementType
SCR_EPlacementType
Definition: SCR_PlaceableItemComponent.c:50
GetMaxPlacementDistance
float GetMaxPlacementDistance()
Definition: SCR_PlaceableItemComponent.c:26
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
XZ_FIXED
@ XZ_FIXED
Definition: SCR_PlaceableItemComponent.c:52
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
GetPreviewVobject
VObject GetPreviewVobject()
Definition: SCR_PlaceableItemComponent.c:33
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
XYZ
@ XYZ
Definition: SCR_PlaceableItemComponent.c:53
SCR_PlaceableItemComponentClass
Definition: SCR_PlaceableItemComponent.c:2
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180