Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ResupplyVehicleWeaponSupportStationAction.c
Go to the documentation of this file.
2{
3 [Attribute("1", desc: "If the action is hidden if the entity does not have a parent")]
4 protected bool m_bHideIfNoParent;
5
6 protected const LocalizedString X_OUTOF_Y_FORMATTING = "#AR-SupportStation_ActionFormat_ItemAmount";
7
8 protected const LocalizedString INVALID_FULL = "#AR-SupportStation_ActionInvalid_VehicleWeaponFullyReloaded";
9
10 //------------------------------------------------------------------------------------------------
11 override bool CanBeShownScript(IEntity user)
12 {
13 //~ Not valid or has no parent
14 if (m_bHideIfNoParent && (!GetOwner() || !GetOwner().GetParent()))
15 return false;
16
17 return super.CanBeShownScript(user);
18 }
19
20 //------------------------------------------------------------------------------------------------
22 {
23 if (reasonInvalid == ESupportStationReasonInvalid.RESUPPLY_INVENTORY_FULL)
24 return INVALID_FULL;
25
26 return super.GetInvalidPerformReasonString(reasonInvalid);
27 }
28
29 //------------------------------------------------------------------------------------------------
30 override bool CanBePerformedScript(IEntity user)
31 {
32 return super.CanBePerformedScript(user);
33 }
34
35 //------------------------------------------------------------------------------------------------
37 {
38 return ESupportStationType.VEHICLE_WEAPON;
39 }
40
41 //------------------------------------------------------------------------------------------------
42 protected override void DelayedInit(IEntity owner)
43 {
44 if (!owner)
45 return;
46
47 super.DelayedInit(owner);
48
50 if (!itemData)
51 return;
52
53 m_sItemPrefab = itemData.GetItemPrefab();
55 }
56
57 //------------------------------------------------------------------------------------------------
58 protected override string GetActionStringParam()
59 {
60 return string.Empty;
61 }
62
63 //------------------------------------------------------------------------------------------------
64 override bool GetActionNameScript(out string outName)
65 {
66 UIInfo uiInfo = GetUIInfo();
67 if (!uiInfo)
68 return super.GetActionNameScript(outName);
69
70 outName = WidgetManager.Translate(uiInfo.GetName(), m_sItemName);
71
72 return super.GetActionNameScript(outName);
73 }
74}
ESupportStationType
Faction GetParent()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
override LocalizedString GetInvalidPerformReasonString(ESupportStationReasonInvalid reasonInvalid)
UIInfo - allows to define UI elements.
Definition UIInfo.c:14
IEntity GetOwner()
Owner entity of the fuel tank.
SCR_FieldOfViewSettings Attribute