3 [
Attribute(defvalue:
"0",
desc:
"Id of a variant that this action is meant to deploy.",
params:
"0 inf")]
6 [
Attribute(
desc:
"If game should check if ground on the deploy position is not tilted too much for given deployable variant")]
9 [
Attribute(
desc:
"If game should check if this place has enough space to fit this entity")]
12 [
Attribute(
desc:
"If game should check if storage of this is entity is empty, and in case that it is not, then prevent the player from using this action.")]
15 [
Attribute(
desc:
"If game should check if this place doesnt have a roof above it")]
18 [
Attribute(
desc:
"If game should try to render the visualisation of the replacment prefab")]
21 [
Attribute(defvalue:
"0",
desc:
"Dictates if more than one user at a time can use this action")]
24 [
Attribute(defvalue:
"0",
desc:
"Should the effect of this action be considered as dismantled")]
27 [
Attribute(EGadgetType.NONE.ToString(), uiwidget:
UIWidgets.ComboBox,
desc:
"What gadget player has to equip in order to be able to use this action", enumType: EGadgetType)]
50 super.Init(pOwnerEntity, pManagerComponent);
62 if (CompartmentAccessComponent.GetVehicleIn(user))
71 SCR_GadgetComponent gadgetComp =
m_GadgetManager.GetHeldGadgetComponent();
77 SCR_CampaignBuildingGadgetToolComponent etoolComp = SCR_CampaignBuildingGadgetToolComponent.Cast(gadgetComp);
78 if (etoolComp && etoolComp.GetIsPlacementModeEnabled())
91 SCR_BaseCompartmentManagerComponent compartmentManager = SCR_BaseCompartmentManagerComponent.Cast(owner.
FindComponent(SCR_BaseCompartmentManagerComponent));
92 if (compartmentManager && compartmentManager.GetOccupantCount() > 0)
96 return super.CanBeShownScript(user);
110 CharacterControllerComponent controller = character.GetCharacterController();
122 if (controller.IsChangingStance())
134 SCR_GadgetComponent gadgetComp =
m_GadgetManager.GetHeldGadgetComponent();
135 if (!gadgetComp || gadgetComp.GetMode() != EGadgetMode.IN_HAND)
151 SCR_MultiPartDeployableItemComponent multiPartComp = SCR_MultiPartDeployableItemComponent.Cast(
m_DeployableItemComp);
155 if (multiPartComp.GetCurrentlyCachedVariantId() !=
m_iVariantId)
160 if (multiPartComp.IsUsingPartPositionAndRotation())
167 array<IEntity> excludeArray = {owner, user};
168 param.ExcludeArray = excludeArray;
174 CharacterHeadAimingComponent headAiming = controller.GetHeadAimingComponent();
179 character.GetWorldTransform(charMat);
180 angle = headAiming.GetLookAngles();
181 angle = angle.AnglesToVector();
182 angle = angle.Multiply3(charMat);
183 angle = angle.VectorToAngles();
185 if (!multiPartComp.IsSurfaceValid(param.TraceEnt, transform[3], param.TraceNorm, param.NodeIndex, param.ColliderIndex, param.SurfaceProps, param.TraceMaterial, param.ColliderName))
195 multiPartComp.VisualizeReplacementEntity(transform, angle);
209 array<IEntity> outItems = {};
211 if (!outItems.IsEmpty())
218 if (
m_bCheckTilt && !multiPartComp.CheckSurfaceTilt(transform[1]))
225 if (!multiPartComp.FindRequiredElements(failReason))
254 SCR_MultiPartDeployableItemComponent multiPartComp = SCR_MultiPartDeployableItemComponent.Cast(
m_DeployableItemComp);
263 super.SetCannotPerformReason(
reason);
279 if (!rplComp || !rplComp.IsOwner())
282 SCR_MultiPartDeployableItemComponent multiPartComp = SCR_MultiPartDeployableItemComponent.Cast(
m_DeployableItemComp);
289 if (!multiPartComp.FindRequiredElements(failReason))
293 OnConfirmed(pUserEntity);
306 super.OnActionStart(pUserEntity);
315 CharacterControllerComponent controller = character.GetCharacterController();
319 CharacterHeadAimingComponent headAiming = controller.GetHeadAimingComponent();
324 character.GetWorldTransform(charMat);
346 int itemActionId = animationComponent.BindCommand(
"CMD_Item_Action");
349 params.SetEntity(gadgetEntity);
350 params.SetAllowMovementDuringAction(
false);
351 params.SetKeepInHandAfterSuccess(
true);
352 params.SetCommandID(itemActionId);
353 params.SetCommandIntArg(1);
355 controller.TryUseItemOverrideParams(
params);
367 SCR_BaseCompartmentManagerComponent compartmentMgr = SCR_BaseCompartmentManagerComponent.Cast(owner.
FindComponent(SCR_BaseCompartmentManagerComponent));
371 array<BaseCompartmentSlot> outCompartments = {};
372 if (compartmentMgr.GetCompartments(outCompartments) < 1)
377 compartment.SetReserved(blockingUser);
384 super.OnActionCanceled(pOwnerEntity, pUserEntity);
409 outName =
WidgetManager.Translate(info.GetName(), info.GetDescription());
421 CharacterControllerComponent charController = character.GetCharacterController();
426 if (!animationComponent)
431 cmdHandler.FinishItemUse(
true);
448 SCR_MultiPartDeployableItemComponent multiPartComp = SCR_MultiPartDeployableItemComponent.Cast(
m_DeployableItemComp);
455 multiPartComp.ClearCache();
ArmaReforgerScripted GetGame()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
proto external vector GetOrigin()
proto external BaseWorld GetWorld()
proto external void GetTransform(out vector mat[])
proto external IEntity GetParent()
proto external vector VectorToParent(vector vec)
void ResetDeployingDelayed(IEntity pUserEntity)
SCR_BaseDeployableInventoryItemComponent m_DeployableItemComp
override void OnActionStart(IEntity pUserEntity)
bool m_bCanBePerformedByMultipleUsers
const LocalizedString CANNOT_PERFORM_REASON_ALREADY_IN_USE
const LocalizedString CANNOT_PERFORM_REASON_TOO_STEEP
override void SetCannotPerformReason(string reason)
bool m_bCheckForAvailableSpace
EGadgetType m_eRequiredGadget
bool m_bReportAsDismantling
bool m_bLastCanPerformResult
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
BaseInventoryStorageComponent m_Storage
override bool CanBePerformedScript(IEntity user)
bool m_bShowVisualisation
SCR_GadgetManagerComponent m_GadgetManager
override void OnActionDeselected()
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
void ToggleCompartmentAccess(IEntity blockingUser=null)
override void OnActionCanceled(IEntity pOwnerEntity, IEntity pUserEntity)
const LocalizedString CANNOT_PERFORM_REASON_NOT_HERE
override void OnActionSelected()
const LocalizedString CANNOT_PERFORM_REASON_NOT_EMPTY
override bool GetActionNameScript(out string outName)
ECharacterStance m_eSavedStance
void StopAction(notnull ChimeraCharacter character)
WorldTimestamp m_NextCheckTimestamp
override bool CanBeShownScript(IEntity user)
const int VALIDATION_DELAY
delay in ms used to control how often costly parts are executed
ChimeraCharacter m_CurrentUser
void ~SCR_DeployMultiPartInventoryItemAction()
vector m_vDesiredDirection
static RplComponent GetEntityRplComponent(notnull IEntity entity)
static SCR_GadgetManagerComponent GetGadgetManager(IEntity entity)
static IEntity GetLocalControlledEntity()
static bool GetTerrainBasis(vector pos, out vector result[4], BaseWorld world=null, bool noUnderwater=false, TraceParam trace=null)
UIInfo - allows to define UI elements.
enum EPhysicsLayerPresets Vehicle
EPhysicsLayerPresets
Enum is filled by C++ by data in project config PhysicsSettings.LayerPresets.
IEntity GetOwner()
Owner entity of the fuel tank.
SCR_FieldOfViewSettings Attribute