110 return containerFrom;
113 SCR_ResourceConsumer consumer = resourceComponent.GetConsumer(
EResourceGeneratorID.DEFAULT_STORAGE, resourceType);
117 currentResourceValue = consumer.GetAggregatedResourceValue();
118 maxResourceValue = consumer.GetAggregatedMaxResourceValue();
127 currentResourceValue = consumer.GetAggregatedResourceValue();
128 maxResourceValue = consumer.GetAggregatedMaxResourceValue();
147 SCR_ResourceConsumer consumer = SCR_ResourceConsumer.Cast(actor);
150 return consumer.RequestAvailability(resourceValue).GetReason() ==
EResourceReason.SUFFICIENT;
187 if (ignoreOnEmptyBehavior)
198 SCR_ResourceConsumer consumer = SCR_ResourceConsumer.Cast(actor);
201 return consumer.RequestConsumtion(resourceValue).GetReason() ==
EResourceReason.SUFFICIENT;
256 if (!resourceComponentRplId.IsValid())
259 const typename interactorTypename = interactorType.ToType();
261 if (!interactorTypename)
264 SCR_ResourceComponent resourceComponent = SCR_ResourceComponent.Cast(
Replication.FindItem(resourceComponentRplId));
266 if (!resourceComponent)
269 SCR_ResourceInteractor interactor;
272 interactor = resourceComponent.GetGenerator(resourceIdentifier, resourceType);
273 else if (interactorTypename.IsInherited(SCR_ResourceConsumer))
274 interactor = resourceComponent.GetConsumer(resourceIdentifier, resourceType);
280 IEntity resourceOwner = resourceComponent.GetOwner();
286 prefab =
string.Format(
"(%1 doesnt have owner!)", resourceComponent);
289 prefab =
FilePath.StripPath(
data.GetPrefabName().GetPath());
291 prefab =
string.Format(
"(%1 doesnt have prefab data!)", resourceOwner);
294 string resourceValueName =
typename.EnumToString(
EResourceType, resourceType);
295 PrintFormat(
"SCR_ResourcePlayerControllerInventoryComponent.RpcAsk_RequestSubscription: %1 failed to provide interactor of type %2 when asked about EResourceGeneratorID=%3, and EResourceType=%4", prefab, interactorType, identifierValueName, resourceValueName, level:
LogLevel.ERROR);
299 GetGame().GetResourceSystemSubscriptionManager().SubscribeListener(
Replication.FindItemId(
this), interactor);
311 if (!resourceComponentRplId.IsValid())
314 const typename interactorTypename = interactorType.ToType();
316 if (!interactorTypename)
319 SCR_ResourceComponent resourceComponent = SCR_ResourceComponent.Cast(
Replication.FindItem(resourceComponentRplId));
321 if (!resourceComponent)
324 SCR_ResourceInteractor interactor;
327 interactor = resourceComponent.GetGenerator(resourceIdentifier, resourceType);
328 else if (interactorTypename.IsInherited(SCR_ResourceConsumer))
329 interactor = resourceComponent.GetConsumer(resourceIdentifier, resourceType);
335 IEntity resourceOwner = resourceComponent.GetOwner();
341 prefab =
string.Format(
"(%1 doesnt have owner!)", resourceComponent);
344 prefab =
FilePath.StripPath(
data.GetPrefabName().GetPath());
346 prefab =
string.Format(
"(%1 doesnt have prefab data!)", resourceOwner);
349 string resourceValueName =
typename.EnumToString(
EResourceType, resourceType);
350 PrintFormat(
"SCR_ResourcePlayerControllerInventoryComponent.RpcAsk_RequestSubscription: %1 failed to provide interactor of type %2 when asked about EResourceGeneratorID=%3, and EResourceType=%4", prefab, interactorType, identifierValueName, resourceValueName, level:
LogLevel.ERROR);
354 GetGame().GetResourceSystemSubscriptionManager().UnsubscribeListener(
Replication.FindItemId(
this), interactor);
367 if (!rplIdResourceComponentFrom.IsValid())
370 PlayerController playerController = PlayerController.Cast(
GetOwner());
372 if (!playerController)
375 SCR_ResourceComponent resourceComponentFrom = SCR_ResourceComponent.Cast(
Replication.FindItem(rplIdResourceComponentFrom));
377 if (!resourceComponentFrom)
380 SCR_ResourceComponent resourceComponentTo = SCR_ResourceComponent.Cast(
Replication.FindItem(rplIdResourceComponentTo));
382 OnPlayerInteraction(interactionType, resourceComponentFrom, resourceComponentTo, resourceType, resourceValue,
false);
394 SCR_ChimeraCharacter buyer = SCR_ChimeraCharacter.Cast(controller.GetControlledEntity());
398 SCR_InventoryStorageManagerComponent inventoryManagerComponent = SCR_InventoryStorageManagerComponent.Cast(buyer.GetCharacterController().GetInventoryStorageManager());
399 if (!inventoryManagerComponent)
402 if (!storageComponentRplId.IsValid())
405 BaseInventoryStorageComponent storageComponent = BaseInventoryStorageComponent.Cast(
Replication.FindItem(storageComponentRplId));
406 if (!storageComponent)
409 IEntity storageParent = storageComponent.GetOwner();
411 while (storageParent)
415 if (storageParent != buyer)
417 PrintFormat(
"SCR_ResourcePlayerControllerInventoryComponent.RpcAsk_ArsenalRequestItem: Player %1 tried to buy an item to a storage container which belongs to a different character.",
SCR_PlayerIdentityUtils.GetPlayerLogInfo(controller.GetPlayerId()), level:
LogLevel.WARNING);
424 storageParent = storageParent.
GetParent();
434 if (!resourceComponentRplId.IsValid())
437 SCR_ResourceComponent resourceComponent = SCR_ResourceComponent.Cast(
Replication.FindItem(resourceComponentRplId));
438 if (!resourceComponent)
441 SCR_ResourceConsumer consumer = resourceComponent.GetConsumer(
EResourceGeneratorID.DEFAULT, resourceType);
445 SCR_EntityCatalogManagerComponent entityCatalogManager = SCR_EntityCatalogManagerComponent.GetInstance();
446 if (!entityCatalogManager)
449 IEntity resourcesOwner = resourceComponent.GetOwner();
460 if (!inventoryManagerComponent.ValidateStorageRequest(resourcesOwner))
465 if (!arsenalComponent)
473 entry = entityCatalogManager.GetEntryWithPrefabFromFactionCatalog(
EEntityCatalogType.ITEM, resourceNameItem, faction);
475 entry = entityCatalogManager.GetEntryWithPrefabFromCatalog(
EEntityCatalogType.ITEM, resourceNameItem);
481 array<SCR_ArsenalItem> filteredArsenalItems = {};
484 bool containedInOverride;
496 containedInOverride =
true;
497 if (isArsenalUsingSupplies)
498 resourceCost = standaloneItem.GetSupplyCost(arsenalComponent.
GetSupplyCostType());
503 if (!containedInOverride)
507 keyInfo =
" | Arsenal faction key=" + faction.GetFactionKey();
509 PrintFormat(
"SCR_ResourcePlayerControllerInventoryComponent.RpcAsk_ArsenalRequestItem: Player %1 tried to buy an item which is not avialable in the arsenal that he used. Item=%2%3",
SCR_PlayerIdentityUtils.GetPlayerLogInfo(controller.GetPlayerId()),
FilePath.StripPath(resourceNameItem.GetPath()), keyInfo, level:
LogLevel.WARNING);
513 else if (isArsenalUsingSupplies)
522 int personalResourceCost;
523 SCR_ArsenalManagerComponent arsenalManager;
524 if (SCR_ArsenalManagerComponent.GetArsenalManager(arsenalManager))
525 personalResourceCost = arsenalManager.GetItemMilitarySupplyAllocationCost(resourceNameItem, arsenalComponent,
true);
528 SCR_PlayerSupplyAllocationComponent playerSupplyAllocationComponent = SCR_PlayerSupplyAllocationComponent.Cast(controller.FindComponent(SCR_PlayerSupplyAllocationComponent));
529 if (playerSupplyAllocationComponent && faction && personalResourceCost > 0)
532 if (playerFaction && playerFaction == faction && !playerSupplyAllocationComponent.HasPlayerEnoughAvailableAllocatedSupplies(personalResourceCost))
536 resourceCost *= consumer.GetBuyMultiplier();
541 s_OnArsenalItemRequested.Invoke(resourceComponent, resourceNameItem, controller, storageComponent, resourceType, resourceCost);
562 SCR_ChimeraCharacter seller = SCR_ChimeraCharacter.Cast(controller.GetControlledEntity());
566 if (!inventoryItemRplId.IsValid())
570 if (!inventoryItemComponent)
573 IEntity inventoryItemEntity = inventoryItemComponent.GetOwner();
574 if (!inventoryItemEntity)
578 if (!attributes || !attributes.IsRefundable())
580 PrintFormat(
"SCR_ResourcePlayerControllerInventoryComponent.RpcAsk_ArsenalRefundItem: Player %1 tried to sell an item which is not meant to be refunded. Item=%2",
SCR_PlayerIdentityUtils.GetPlayerLogInfo(controller.GetPlayerId()),
FilePath.StripPath(inventoryItemEntity.
GetPrefabData().GetPrefabName().GetPath()), level:
LogLevel.WARNING);
584 IEntity itemParent = inventoryItemEntity;
589 if (itemParent != seller)
591 PrintFormat(
"SCR_ResourcePlayerControllerInventoryComponent.RpcAsk_ArsenalRefundItem: Player %1 tried to sell an item which is in the inventory of a different character.",
SCR_PlayerIdentityUtils.GetPlayerLogInfo(controller.GetPlayerId()), level:
LogLevel.WARNING);
609 if (!resourceComponentRplId.IsValid())
612 SCR_ResourceComponent resourceComponent = SCR_ResourceComponent.Cast(
Replication.FindItem(resourceComponentRplId));
613 if (!resourceComponent)
620 IEntity resourcesOwner = resourceComponent.GetOwner();
625 if (!sellerInventoryManagerComponent || !sellerInventoryManagerComponent.ValidateStorageRequest(resourcesOwner))
627 PrintFormat(
"SCR_ResourcePlayerControllerInventoryComponent.RpcAsk_ArsenalRefundItem: Player %1 tried to sell an item in the arsenal which too far away from him.",
SCR_PlayerIdentityUtils.GetPlayerLogInfo(controller.GetPlayerId()), level:
LogLevel.WARNING);
638 if (!arsenalComponent)
642 float resourceCost =
Math.Clamp(SCR_ArsenalManagerComponent.GetItemRefundAmount(inventoryItemEntity, arsenalComponent,
false), 0,
float.MAX);
648 int personalResourceCost;
651 SCR_ArsenalManagerComponent arsenalManager;
652 if (arsenalFaction && arsenalFaction == seller.GetFaction() && SCR_ArsenalManagerComponent.GetArsenalManager(arsenalManager) && arsenalManager.IsMilitarySupplyAllocationEnabled())
653 personalResourceCost = arsenalManager.GetItemMilitarySupplyAllocationRefundAmount(inventoryItemEntity, arsenalComponent);
656 SCR_ArsenalManagerComponent.OnItemRefunded_S(inventoryItemEntity, PlayerController.Cast(
GetOwner()), arsenalComponent);
659 SCR_InventoryStorageManagerComponent inventoryManagerComponent;
661 inventoryManagerComponent = SCR_InventoryStorageManagerComponent.Cast(parentEntity.
FindComponent(SCR_InventoryStorageManagerComponent));
663 if (inventoryManagerComponent && !inventoryManagerComponent.TryDeleteItem(inventoryItemEntity))
665 else if (!inventoryManagerComponent)
666 RplComponent.DeleteRplEntity(inventoryItemEntity,
false);
668 if (personalResourceCost == 0)
672 SCR_PlayerSupplyAllocationComponent playerSupplyAllocationComponent = SCR_PlayerSupplyAllocationComponent.Cast(
GetOwner().
FindComponent(SCR_PlayerSupplyAllocationComponent));
673 if (playerSupplyAllocationComponent)
674 playerSupplyAllocationComponent.AddPlayerAvailableAllocatedSupplies(personalResourceCost);
694 if (!rplIdFrom.IsValid() || !rplIdTo.IsValid())
697 SCR_ResourceComponent componentFrom = SCR_ResourceComponent.Cast(
Replication.FindItem(rplIdFrom));
703 SCR_ChimeraCharacter user = SCR_ChimeraCharacter.Cast(playerController.GetControlledEntity());
705 if (!user || !characterController || characterController.GetLifeState() !=
ECharacterLifeState.ALIVE)
708 if (!componentFrom.CanBeUsedByCharacter(user))
711 SCR_ResourceComponent componentTo = SCR_ResourceComponent.Cast(
Replication.FindItem(rplIdTo));
716 float resourceValueCurrentFrom, resourceValueMaxFrom;
719 float resourceValueCurrentTo, resourceValueMaxTo;
722 float resourceUsed =
Math.Min(resourceValueCurrentFrom, resourceValueMaxTo - resourceValueCurrentTo);
742 if (!rplIdFrom.IsValid() || !rplIdTo.IsValid())
745 SCR_ResourceComponent componentFrom = SCR_ResourceComponent.Cast(
Replication.FindItem(rplIdFrom));
751 SCR_ChimeraCharacter user = SCR_ChimeraCharacter.Cast(playerController.GetControlledEntity());
753 if (!user || !characterController || characterController.GetLifeState() !=
ECharacterLifeState.ALIVE)
756 if (!componentFrom.CanBeUsedByCharacter(user))
759 SCR_ResourceComponent componentTo = SCR_ResourceComponent.Cast(
Replication.FindItem(rplIdTo));
764 float resourceValueCurrentFrom, resourceValueMaxFrom;
767 float resourceValueCurrentTo, resourceValueMaxTo;
770 float resourceUsed =
Math.Min(
Math.Min(resourceValueCurrentFrom, resourceValueMaxTo - resourceValueCurrentTo), requestedResources);
803 if (!resourceComponentRplId.IsValid())
806 SCR_ResourceComponent resourceComponentFrom = SCR_ResourceComponent.Cast(
Replication.FindItem(resourceComponentRplId));
808 if (!resourceComponentFrom)
812 SCR_ChimeraCharacter user = SCR_ChimeraCharacter.Cast(playerController.GetControlledEntity());
814 if (!user || !characterController || characterController.GetLifeState() !=
ECharacterLifeState.ALIVE)
817 if (!resourceComponentFrom.CanBeUsedByCharacter(user))
820 float resourceValueCurrentFrom, resourceValueMaxFrom;
826 float resourceValueCurrentTo, resourceValueMaxTo;
829 if (!inventoryManagerRplId.IsValid())
832 array<SCR_EntityCatalogEntry> entries = {};
833 array<SCR_BaseEntityCatalogData>
data = {};
836 int selectedEntryIdx;
840 for (selectedEntryIdx =
data.Count() - 1; selectedEntryIdx >= 0; --selectedEntryIdx)
845 if (resourceUsed >= requestedResources)
849 if (selectedEntryIdx < 0)
850 selectedEntryIdx = 0;
852 resourceUsed =
Math.Min(resourceUsed, requestedResources);
867 spawnParams.TransformMode = ETransformMode.WORLD;
868 spawnParams.Transform[3] =
position;
869 IEntity newStorageEntity =
GetGame().SpawnEntityPrefab(
Resource.Load(entries[selectedEntryIdx].GetPrefab()),
GetGame().GetWorld(), spawnParams);
870 SCR_ResourceComponent resourceComponentTo = SCR_ResourceComponent.FindResourceComponent(newStorageEntity);
871 actorConsumptionTo =
TryGetConsumptionActor(resourceComponentTo, resourceType, resourceValueCurrentTo, resourceValueMaxTo);
872 actorGenerationTo =
TryGetGenerationActor(resourceComponentTo, resourceType, resourceValueCurrentTo, resourceValueMaxTo);
883 delete newStorageEntity;
888 SCR_InventoryStorageManagerComponent inventoryManagerComponent = SCR_InventoryStorageManagerComponent.Cast(
Replication.FindItem(inventoryManagerRplId));
890 if (!inventoryManagerComponent)
893 if (!storageComponentRplId.IsValid())
896 BaseInventoryStorageComponent storageComponent = BaseInventoryStorageComponent.Cast(
Replication.FindItem(storageComponentRplId));
898 if (!storageComponent)
901 IEntity resourcesOwner = resourceComponentFrom.GetOwner();
903 int selectedEntryIdx = -1;
905 array<SCR_EntityCatalogEntry> entries = {};
906 array<SCR_BaseEntityCatalogData>
data = {};
912 if (inventoryManagerComponent.CanInsertResourceInStorage(entry.GetPrefab(), storageComponent))
914 selectedEntry = entry;
915 selectedEntryIdx =
idx;
926 float resourceUsed =
Math.Min(requestedResources, maxStoredResources);
932 spawnParams.TransformMode = ETransformMode.WORLD;
934 inventoryManagerComponent.GetOwner().GetTransform(spawnParams.Transform);
938 if (!newStorageEntity)
941 SCR_ResourceComponent resourceComponentTo = SCR_ResourceComponent.FindResourceComponent(newStorageEntity);
942 actorConsumptionTo =
TryGetConsumptionActor(resourceComponentTo, resourceType, resourceValueCurrentTo, resourceValueMaxTo);
943 actorGenerationTo =
TryGetGenerationActor(resourceComponentTo, resourceType, resourceValueCurrentTo, resourceValueMaxTo);
949 delete newStorageEntity;
954 inventoryManagerComponent.TryInsertItemInStorage(newStorageEntity, storageComponent);
971 param.LayerMask = EPhysicsLayerDefs.Projectile;
974 if (param.TraceEnt == null && distanceTraveled == 1)
976 position[1] =
GetGame().GetWorld().GetSurfaceY(param.End[0], param.End[2]);
978 param.Start = param.End +
vector.Up * maxVerticalOffset;
982 if (distanceTraveled < 1)
983 position = (param.End - param.Start) * distanceTraveled + param.Start;
993 if (BaseTree.Cast(e))
1027 PlayerController playerController = PlayerController.Cast(owner);
1029 if (!playerController)
1032 if (shouldBroadcast)
1034 RplComponent replicationComponent = RplComponent.Cast(owner.
FindComponent(RplComponent));
1036 if (replicationComponent && !replicationComponent.IsProxy() && !replicationComponent.IsOwner())
1042 system.
ActivateEffects(interactionType, resourceComponentFrom, resourceComponentTo, resourceType, resourceValue);
1045 GetOnPlayerInteraction().Invoke(interactionType, owner, resourceComponentFrom, resourceComponentTo, resourceType, resourceValue);
1064 super.OnDelete(owner);
1066 GetGame().GetResourceSystemSubscriptionManager().UnsubscribeListenerCompletely(
Replication.FindItemId(
this));
void SCR_BaseDebrisSmallEntity(IEntitySource src, IEntity parent)
ArmaReforgerScripted GetGame()
ResourceName resourceName
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
Get all prefabs that have the spawner data
EResourceContainerOnEmptyBehavior
EResourcePlayerInteractionType
ScriptInvokerBase< OnArsenalItemRequestedMethod > OnArsenalItemRequestedInvoker
ScriptInvokerBase< ScriptInvokerActiveWidgetInteractionFunc > ScriptInvokerResourceOnPlayerInteraction
func ScriptInvokerActiveWidgetInteractionFunc
typedef ScriptInvoker_ResourceOnPlayerInteraction
func OnArsenalItemRequestedMethod
proto external GenericComponent FindComponent(typename typeName)
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
proto external Managed FindComponent(typename typeName)
proto external vector GetOrigin()
proto external EntityPrefabData GetPrefabData()
proto external IEntity GetParent()
Object holding reference to resource. In destructor release the resource.
Replication item identifier.
SCR_Faction GetAssignedFaction()
static SCR_ArsenalComponent FindArsenalComponent(notnull IEntity entity, bool getFromSlotted=true)
bool IsArsenalUsingSupplies()
bool GetFilteredOverwriteArsenalItems(out notnull array< SCR_ArsenalItem > filteredArsenalItems, EArsenalItemDisplayType requiresDisplayType=-1)
SCR_EArsenalSupplyCostType GetSupplyCostType()
Arsenal Item to be added in the configs outside of The faction Catalog.
override ResourceName GetItemResourceName()
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 Prefab data return Prefab data *ResourceName GetPrefab()
static vector GenerateRandomPointInRadius(float minRadius, float maxRadius, vector center, bool uniform=true)
SCR_CharacterControllerComponent GetCharacterController()
bool DecreaseResourceValue(float value, bool notifyChange=true)
float ComputeResourceDifference()
float GetMaxResourceValue()
void SetOnEmptyBehavior(EResourceContainerOnEmptyBehavior behavior)
EResourceContainerOnEmptyBehavior GetOnEmptyBehavior()
bool IncreaseResourceValue(float value, bool notifyChange=true)
Get max resource value of container Data obtained from if no max resource value found return max Resource value *int GetMaxResourceValue()
EResourceReason GetReason()
override float GetAggregatedResourceValue()
SCR_ResourceGenerationResponse RequestAvailability(float resourceAmount)
SCR_ResourceGenerationResponse RequestGeneration(float resourceAmount, SCR_ResourceGenerator generator=null)
override float GetAggregatedMaxResourceValue()
void RpcAsk_MergeContainerWithContainerPartial(RplId rplIdFrom, RplId rplIdTo, EResourceType resourceType, float requestedResources)
void OnPlayerInteraction(EResourcePlayerInteractionType interactionType, SCR_ResourceComponent resourceComponentFrom, SCR_ResourceComponent resourceComponentTo, EResourceType resourceType, float resourceValue, bool shouldBroadcast=true)
void RpcAsk_ArsenalRefundItem(RplId resourceComponentRplId, RplId inventoryItemRplId, EResourceType resourceType)
void RequestSubscription(RplId resourceComponentRplId, typename interactorType, EResourceType resourceType, EResourceGeneratorID resourceIdentifier)
bool CheckResourceConsumptionAvailability(notnull SCR_ResourceActor actor, float resourceValue)
bool TryPerformResourceGeneration(notnull SCR_ResourceActor actor, float resourceValue)
void RpcAsk_RequestUnsubscription(RplId resourceComponentRplId, string interactorType, EResourceType resourceType, EResourceGeneratorID resourceIdentifier)
const float HORIZONTAL_SPAWN_OFFSET
ScriptInvokerResourceOnPlayerInteraction GetOnBeforePlayerInteraction()
void RpcAsk_MergeContainerWithContainer(RplId rplIdFrom, RplId rplIdTo, EResourceType resourceType)
void RpcAsk_ArsenalRefundItem_(RplId resourceComponentRplId, RplId inventoryItemRplId, EResourceType resourceType)
void RequestUnsubscription(RplId resourceComponentRplId, typename interactorType, EResourceType resourceType, EResourceGeneratorID resourceIdentifier)
const int MAX_REFUNDING_DISTANCE_SQ
30m to compensate for some large entities like Mi-8 which with arsenal truck can result in transactio...
void RpcAsk_CreatePhysicalContainerWithContainer_(RplId resourceComponentRplId, RplId inventoryManagerRplId, RplId storageComponentRplId, EResourceType resourceType, float requestedResources)
static OnArsenalItemRequestedInvoker GetOnArsenalItemRequested()
static bool TraceFilter(notnull IEntity e, vector start=vector.Zero, vector dir=vector.Zero)
void RpcAsk_ArsenalRequestItem(RplId resourceComponentRplId, RplId storageComponentRplId, ResourceName resourceNameItem, EResourceType resourceType)
static void FindSuitablePosition(inout vector position, float maxHorizontalOffset, float maxVerticalOffset)
static ref OnArsenalItemRequestedInvoker s_OnArsenalItemRequested
void RpcAsk_MergeContainerWithContainerPartial_(RplId rplIdFrom, RplId rplIdTo, EResourceType resourceType, float requestedResources)
void RpcAsk_OnPlayerInteraction(EResourcePlayerInteractionType interactionType, RplId rplIdResourceComponentFrom, RplId rplIdResourceComponentTo, EResourceType resourceType, float resourceValue)
bool CheckResourceGenerationAvailability(notnull SCR_ResourceActor actor, float resourceValue)
SCR_ResourceActor TryGetGenerationActor(notnull SCR_ResourceComponent resourceComponent, EResourceType resourceType, out float currentResourceValue, out float maxResourceValue)
void RpcAsk_ArsenalRequestItem_(RplId resourceComponentRplId, RplId storageComponentRplId, ResourceName resourceNameItem, EResourceType resourceType)
void OnDelete(IEntity owner)
void RpcAsk_CreatePhysicalContainerWithContainer(RplId resourceComponentRplId, RplId inventoryManagerRplId, RplId storageComponentRplId, EResourceType resourceType, float requestedResources)
bool TryPerformResourceConsumption(notnull SCR_ResourceActor actor, float resourceValue, bool ignoreOnEmptyBehavior=false)
ScriptInvokerResourceOnPlayerInteraction GetOnPlayerInteraction()
SCR_ResourceActor TryGetConsumptionActor(notnull SCR_ResourceComponent resourceComponent, EResourceType resourceType, out float currentResourceValue, out float maxResourceValue)
void RpcAsk_RequestSubscription(RplId resourceComponentRplId, string interactorType, EResourceType resourceType, EResourceGeneratorID resourceIdentifier)
void OnBeforePlayerInteraction(EResourcePlayerInteractionType interactionType, SCR_ResourceComponent resourceComponentFrom, SCR_ResourceComponent resourceComponentTo, EResourceType resourceType, float resourceValue)
const float VERTICAL_SPAWN_OFFSET
ref ScriptInvokerResourceOnPlayerInteraction m_OnBeforePlayerInteractionInvoker
ref ScriptInvokerResourceOnPlayerInteraction m_OnPlayerInteractionInvoker
void ActivateEffects(EResourcePlayerInteractionType interactionType, SCR_ResourceComponent resourceComponentFrom, SCR_ResourceComponent resourceComponentTo, EResourceType resourceType, float resourceValue)
proto external GenericEntity GetOwner()
Get owner entity.
enum EPhysicsLayerPresets Vehicle
LogLevel
Enum with severity of the logging message.
proto void PrintFormat(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL, LogLevel level=LogLevel.NORMAL)
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.