1[
EntityEditorProps(
category:
"GameScripted/Campaign", description:
"Makes a vehicle able to carry Conflict resources.", color:
"0 0 255 255")]
16 protected static const float SUPPLY_TRUCK_UNLOAD_RADIUS = 25;
29 [
Attribute(
"0",
desc:
"How many supplies this component holds when it is created."),
RplProp(onRplName:
"OnSuppliesChanged")]
33 [
Attribute(
"0",
desc:
"Maximum supplies this component can hold."),
RplProp(onRplName:
"OnSuppliesChanged")]
36 [
Attribute(
"0",
desc:
"Maximum distance from a supply depot a player can still (un)load their truck")]
39 [
Attribute(
"0",
UIWidgets.CheckBox,
"This component belongs to a supply depot without a parent base.",
"")]
45 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
48 array<int> loadingArray;
56 if(!loadingArray.IsEmpty())
57 return loadingArray[0];
64 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
78 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
99 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
112 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
123 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
132 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
140 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
148 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
162 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
168 return SUPPLY_TRUCK_UNLOAD_RADIUS;
173 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
181 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
189 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
202 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
216 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
226 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
246 [
Obsolete(
"Use SCR_ResourceComponent operations instead")]
267 campaign.GetBaseManager().RegisterRemnantSupplyDepot(
this);
274 super.OnPostInit(owner);
279 string err =
string.Format(
"SCR_CampaignSuppliesComponent on %1 carries more supplies (%2) than its maximum (%3)!", owner,
m_iSupplies,
m_iSuppliesMax);
292 if (suppliesComponent)
293 return suppliesComponent;
295 SlotManagerComponent slotManager = SlotManagerComponent.Cast(ent.FindComponent(SlotManagerComponent));
299 array<EntitySlotInfo> slots = {};
300 slotManager.GetSlotInfos(slots);
303 foreach (EntitySlotInfo slot: slots)
308 truckBed = slot.GetAttachedEntity();
314 if (suppliesComponent)
315 return suppliesComponent;
ArmaReforgerScripted GetGame()
SCR_BaseGameMode GetGameMode()
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
SCR_CampaignSuppliesComponent GetSuppliesComponent()
void OnPlayerKilled(notnull SCR_InstigatorContextData instigatorContextData)
SCR_CampaignSuppliesComponentClass m_LastLoadedAt
Makes a vehicle able to carry Conflict resources.
int GetLoadingPlayer(bool unloading=false)
ref array< int > m_aLoadingPlayerIDs
void AddSupplies(int supplies, bool replicate=true)
SCR_CampaignMilitaryBaseComponent m_LastXPAwardedAt
void SetSupplyLoadingPlayer(int playerID)
void SetSupplyUnloadingPlayer(int playerID)
bool GetIsPlayerInRange()
void SetLastLoadedAt(SCR_CampaignMilitaryBaseComponent base)
float GetOperationalRadius()
bool m_bIsStandaloneDepot
float m_fOperationalRadius
void ~SCR_CampaignSuppliesComponent()
void SCR_CampaignSuppliesComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
ref array< int > m_aUnloadingPlayerIDs
ref ScriptInvoker m_OnSuppliesChanged
void DeleteSupplyLoadingPlayer(int playerID)
void DeleteSupplyUnloadingPlayer(int playerID)
SCR_CampaignMilitaryBaseComponent m_LastUnloadedAt
ref ScriptInvoker m_OnSuppliesTruckDeleted
bool GetIsStandaloneDepot()
void SetLastUnloadedAt(SCR_CampaignMilitaryBaseComponent base)
void SetSuppliesMax(int suppliesMax)
void SetIsPlayerInRange(bool status)
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
void SCR_GameModeCampaign(IEntitySource src, IEntity parent)
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
enum EVehicleType IEntity
proto external int SetEventMask(notnull IEntity owner, int mask)
proto external Managed FindComponent(typename typeName)
ScriptInvokerBase< SCR_BaseGameMode_OnPlayerDisconnected > GetOnPlayerDisconnected()
ScriptInvokerBase< SCR_BaseGameMode_OnControllableDestroyed > GetOnPlayerKilled()
void EOnInit(IEntity owner)
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
EntityEvent
Various entity events.