7class SCR_ConsumableItemComponent : SCR_GadgetComponent
10 protected ref SCR_ConsumableEffectBase m_ConsumableEffect;
33 if (!m_ConsumableEffect)
36 m_ConsumableEffect.ApplyEffect(target, user, item, animParams);
41 RplComponent.DeleteRplEntity(
GetOwner(),
false);
68 if (animParams.GetCommandIntArg() == -1)
70 Print(
"Consumable item OnItemUseComplete event called with empty SCR_ConsumableEffectAnimationParameters",
LogLevel.ERROR);
80 bool deleteItem =
true;
108 if (!targetDamageMan)
120 if (!inventoryItemComp)
124 if (!attributeCollection)
128 if (!additionalModels)
133 consumableModel = additionalModels.GetAlternativeModel();
144 VObject asset = baseResource.ToVObject();
162 super.ModeSwitch(mode, charOwner);
164 if (mode == EGadgetMode.IN_HAND)
175 if (mode == EGadgetMode.IN_HAND)
182 super.ModeClear(mode);
218 super.OnDelete(owner);
226 if (m_ConsumableEffect)
227 return m_ConsumableEffect.m_eConsumableType;
237 return m_ConsumableEffect;
243 return EGadgetType.CONSUMABLE;
ArmaReforgerScripted GetGame()
SCR_RplTestComponentClass m_CharacterOwner
EBandagingAnimationBodyParts
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
SCR_EConsumableType
Type of consumable gadget.
void ClearInvokers(int targetGroup=-1)
SCR_ConsumableEffectBase GetConsumableEffect()
SCR_EConsumableType GetConsumableType()
void SetTargetCharacter(IEntity target)
void SetHealedGroup(EBandagingAnimationBodyParts group, bool healed)
void OnUseBegan(IEntity item, ItemUseParameters animParams)
OnItemUseBegan event from SCR_CharacterControllerComponent.
void OnApplyToCharacter(IEntity item, bool successful, ItemUseParameters animParams)
OnItemUseComplete event from SCR_CharacterControllerComponent.
IEntity m_TargetCharacter
Target character is the target set when it's not m_CharacterOwner.
SCR_CharacterControllerComponent m_CharController
IEntity GetTargetCharacter()
void ApplyItemEffect(IEntity target, IEntity user, ItemUseParameters animParams, IEntity item, bool deleteItem=true)
bool m_bAlternativeModelOnAction
void SetAlternativeModel(bool useAlternative)
override bool IsVisibleEquipped()
proto external Managed FindComponent(typename typeName)
proto external bool IsDeleted()
Object holding reference to resource. In destructor release the resource.
void SetGroupIsBeingHealed(ECharacterHitZoneGroup hitZoneGroup, bool setIsBeingHealed)
ECharacterHitZoneGroup FindAssociatedHitZoneGroup(EBandagingAnimationBodyParts bodyPartToBandage)
static ResourceName GetPrefabAttributeResource(notnull IEntity entity, string containerType, string attributeName)
IEntity GetOwner()
Owner entity of the fuel tank.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute