3 [
Attribute(defvalue:
EResourceType.SUPPLIES.ToString(), uiwidget:
UIWidgets.ComboBox,
desc:
"Sets the type of Resource to be used.\nOnly a transaction matching Resource types can be successfully concluded.", enums: ParamEnumArray.FromEnum(
EResourceType))]
9 [
Attribute(
"#AR-Supplies_Refund_Action_Object_NoSupplies",
desc:
"If no supplies are returned or supplies are disabled action name")]
12 [
Attribute(
"#AR-Supplies_Refund_Action_Vehicle_NoDepot",
desc:
"Invalid reason shown when there is no valid refund point")]
15 [
Attribute(
"#AR-Supplies_Refund_Action_Vehicle_Occupied",
desc:
"Invalid reason shown when entity is a vehicle and it is occupied")]
68 RplComponent.DeleteRplEntity(
GetOwner(),
false);
116 if (additionalSettings && !additionalSettings.IsEntityRefundingActionAllowed())
139 SCR_ResourceComponent resourceComponent;
144 float distanceSq =
float.MAX;
145 float distanceSqCompare =
float.MAX;
147 foreach (SCR_CatalogEntitySpawnerComponent component : SCR_CatalogEntitySpawnerComponent.INSTANCES)
149 distanceSqCompare =
vector.DistanceSq(ownerOrigin, component.GetOwner().GetOrigin());
151 if (distanceSq <= distanceSqCompare && !component.CanRefund(
GetOwner(), user))
154 resourceComponent = SCR_ResourceComponent.Cast(component.GetOwner().FindComponent(SCR_ResourceComponent));
158 distanceSq = distanceSqCompare;
165 resourceGeneratorCompare = null;
169 if (resourceComponent)
188 if (additionalSettings && (!additionalSettings.IsEntityRefundingActionAllowed() && additionalSettings.GetEntityRefundingDisabledReason().IsEmpty()))
191 return super.CanBeShownScript(user);
219 if (factionComponent)
259 array<ref SCR_EntityBudgetValue> budgets = {};
ArmaReforgerScripted GetGame()
void SCR_AdditionalGameModeSettingsComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Get all prefabs that have the spawner data
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
ScriptInvokerBase< ScriptInvokerEntity2Method > ScriptInvokerEntity2
proto external IEntity GetOwner()
Returns the parent entity of this action.
string m_sCannotPerformReason
string ActionNameParams[9]
Can be filled in scripts to be used as params when name is being formatted when displayed in UI.
proto external Managed FindComponent(typename typeName)
proto external vector GetOrigin()
proto external EntityPrefabData GetPrefabData()
void GetEntityAndChildrenBudgetCost(out notnull array< ref SCR_EntityBudgetValue > outBudgets)
Get Entity and its children budgets.
Get prefab entity Data of type Ignores disabled Data s param dataType class of Data type you with to obtain return Entity Data of given type Null if not found *SCR_BaseEntityCatalogData GetEntityDataOfType(typename dataType)
Get UI info Prefab needs to be an editable entity or have a custom UI info logic Note that if UIInfo is NULL then the autotest will fail return Ui info *SCR_UIInfo GetEntityUiInfo()
bool m_bIsResourceEnabled
override event bool CanBePerformedScript(IEntity user)
override event void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
void DelayedInit(IEntity pOwnerEntity, GenericComponent pManagerComponent)
SCR_ResourceGenerator m_ResourceGenerator
override event bool CanBeShownScript(IEntity user)
bool SelectSuitableResourceGenerator(IEntity user)
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
static ScriptInvokerEntity2 GetOnRefundPerformed()
EResourceGeneratorID m_eGeneratorIdentifier
SCR_EntityCatalogManagerComponent m_EntityCatalogManager
LocalizedString m_sInvalidNoValidRefundPoint
EResourceType m_eResourceType
SCR_CatalogEntitySpawnerComponent m_CatalogEntitySpawnerComponent
RplComponent m_ReplicationComponent
override bool GetActionNameScript(out string outName)
LocalizedString m_sInvalidIsOccupied
SCR_BaseCompartmentManagerComponent m_CompartmentManager
LocalizedString m_sNoSuppliesActionName
static ref ScriptInvokerEntity2 s_OnRefundPerformed
A scripted action class having optional logic to check if vehicle is valid.
SCR_FieldOfViewSettings Attribute