Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_PlaceEntityContextAction.c
Go to the documentation of this file.
3{
4 [Attribute(uiwidget: UIWidgets.ComboBox, desc: "Placing flags enabled upon creating an entity.", enums: ParamEnumArray.FromEnum(EEditorPlacingFlags))]
6
7 [Attribute(desc: "Active labels and white listed labels and label groups")]
9
10 override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
11 {
12 if (hoveredEntity || cursorWorldPosition == vector.Zero)
13 return false;
14
15 if (!SCR_Global.IsPositionWithinTerrainBounds(cursorWorldPosition))
16 return false;
17
18 //--- Player unit is dead or does not exist
19 if (m_PlacingFlag == EEditorPlacingFlags.CHARACTER_PLAYER)
20 {
22 if (!controlledEntity)
23 return true;
24
26 if (!damageManager)
27 return false;
28
29 return damageManager.GetState() == EDamageState.DESTROYED;
30 }
31 return true;
32 }
33
34 override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
35 {
36 return CanBeShown(hoveredEntity, selectedEntities, cursorWorldPosition, flags);
37 }
38
39 override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,int flags, int param = -1)
40 {
42 return;
43
45 if (!placingManager || placingManager.IsPlacing() || GetGame().GetMenuManager().IsAnyDialogOpen())
46 return;
47
48 vector transform[4];
49 transform[3] = cursorWorldPosition;
50
52 if (camera)
53 Math3D.AnglesToMatrix(Vector(camera.GetAngles()[0], 0, 0), transform);
54 else
55 Math3D.MatrixIdentity3(transform);
56
57 placingManager.SetPlacingFlag(m_PlacingFlag, true);
58
60 {
62 }
63 else
64 {
65 placingManager.SetPlacingFlag(m_PlacingFlag, false);
66 }
67 }
68 override bool IsServer()
69 {
70 return false;
71 }
72};
SCR_EAIThreatSectorFlags flags
EEditorPlacingFlags
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_ArsenalGameModeUIDataHolder SCR_BaseContainerCustomTitleUIInfo("m_UIInfo")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
static SCR_ManualCamera GetCameraInstance()
static bool OpenBrowserLabelConfigInstance(SCR_EditorContentBrowserDisplayConfig contentBrowserConfig=null)
Network packet of variables for entity placing and transformation.
static SCR_EditorPreviewParams CreateParams(vector transform[4], RplId parentID=Replication.INVALID_ID, EEditorTransformVertical verticalMode=EEditorTransformVertical.SEA, bool isUnderwater=false, SCR_EditableEntityComponent target=null, EEditableEntityInteraction targetInteraction=EEditableEntityInteraction.NONE)
static bool IsPositionWithinTerrainBounds(vector pos)
Definition Functions.c:1981
override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags)
ref SCR_EditorContentBrowserDisplayConfig m_ContentBrowserConfig
override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags, int param=-1)
override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags)
void SetPlacingFlag(EEditorPlacingFlags flag, bool toAdd)
void SetInstantPlacing(SCR_EditorPreviewParams param)
static IEntity GetLocalControlledEntity()
SCR_FieldOfViewSettings Attribute
EDamageState
proto native vector Vector(float x, float y, float z)