Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ResupplySelfSupportStationAction.c
Go to the documentation of this file.
2{
3 [Attribute("1", desc: "Check if magazines or projectiles in owner storage. If not it will not allow to resupply. Used in tandum with arsenals")]
4 protected bool m_bCheckIfItemInStorage;
5
6 [Attribute("0", desc: "If true allows to get storage manager from parent if not on self. Storagemanager is used to check if magazine is in the storage and is used in tandum with arsenal. Ignored if m_bCheckIfMagazineInStorage is false.")]
8
10
11 //------------------------------------------------------------------------------------------------
12 protected override void SetTargetInventory(IEntity user, IEntity owner)
13 {
14 m_InventoryManagerTarget = SCR_InventoryStorageManagerComponent.Cast(user.FindComponent(SCR_InventoryStorageManagerComponent));
15 }
16
17 //------------------------------------------------------------------------------------------------
18 override bool CanBeShownScript(IEntity user)
19 {
20 if (!super.CanBeShownScript(user))
21 return false;
22
23 bool canPerform = super.CanBePerformedScript(user);
24 if (!canPerform && GetShowButDisabled())
25 return true;
26
27 return canPerform;
28 }
29
30 //------------------------------------------------------------------------------------------------
31 override bool CanBePerformedScript(IEntity user)
32 {
33 return !GetShowButDisabled();
34 }
35
36 //------------------------------------------------------------------------------------------------
41
42 //------------------------------------------------------------------------------------------------
43 protected override void ResetReferencesOnServer()
44 {
46 super.ResetReferencesOnServer();
47 }
48
49 //------------------------------------------------------------------------------------------------
50 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
51 {
52 super.Init(pOwnerEntity, pManagerComponent);
53
54 //~ Get storage manager to check if ammo is in storage (Should be used only if arseneal)
56 {
60
62 Print(string.Format("'SCR_ResupplySelfSupportStationAction': %1 should check if Item is in storage but no storage manager found so this step will be ignored!", pOwnerEntity.GetName()), LogLevel.ERROR);
63 }
64 }
65}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
proto external IEntity GetParent()
proto external string GetName()
SCR_InventoryStorageManagerComponent m_InventoryManagerTarget
override void SetTargetInventory(IEntity user, IEntity owner)
InventoryStorageManagerComponent m_InventoryManagerProvider
override InventoryStorageManagerComponent GetProviderInventory()
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute