Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CacheNoteComponent.c
Go to the documentation of this file.
1[ComponentEditorProps(category: "GameScripted/Inventory", description: "Item component that requests and displays cache locations")]
3
4class SCR_CacheNoteComponent : ScriptComponent
5{
6 [RplProp()]
7 protected ref array<string> m_aLines = {};
8
9 //------------------------------------------------------------------------------------------------
10 override void OnPostInit(IEntity owner)
11 {
12 super.OnPostInit(owner);
13 SetEventMask(owner, EntityEvent.INIT);
14 if (!Replication.IsServer())
15 return;
16
17 if (!m_aLines.IsEmpty())
18 return;
19
20 SCR_CacheManagerComponent manager = SCR_CacheManagerComponent.GetInstance();
21 if (!manager)
22 return;
23
24 manager.GetRandomCacheData(m_aLines);
25 Replication.BumpMe();
26 }
27
28 //------------------------------------------------------------------------------------------------
31 array<string> GetNoteLines()
32 {
33 return m_aLines;
34 }
35}
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
SCR_CacheNoteComponentClass ScriptComponentClass RplProp()] protected ref array< string > m_aLines
array< string > GetNoteLines()
ref array< ref MapLine > m_aLines
proto external int SetEventMask(notnull IEntity owner, int mask)
Main replication API.
Definition Replication.c:14
EntityEvent
Various entity events.
Definition EntityEvent.c:14