Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ResourceSystemSubscriptionListing.c
Go to the documentation of this file.
2{
3 protected ref set<RplId> m_aListeners = new set<RplId>();
4 protected SCR_ResourceInteractor m_Interactor;
5
6 //------------------------------------------------------------------------------------------------
7 SCR_ResourceInteractor GetInteractor()
8 {
9 return m_Interactor;
10 }
11
12 //------------------------------------------------------------------------------------------------
13 bool IsEmpty()
14 {
15 return m_aListeners.IsEmpty();
16 }
17
18 //------------------------------------------------------------------------------------------------
19 void SubscribeListener(RplId listener)
20 {
21 m_aListeners.Insert(listener);
22 }
23
24 //------------------------------------------------------------------------------------------------
26 {
27 m_aListeners.RemoveItem(listener);
28 }
29
30 //------------------------------------------------------------------------------------------------
31 void Replicate()
32 {
33 if (m_Interactor)
34 m_Interactor.ReplicateEx();
35 }
36
37 //------------------------------------------------------------------------------------------------
38 void SCR_ResourceSystemSubscriptionListing(notnull SCR_ResourceInteractor interactor)
39 {
40 m_Interactor = interactor;
41
42 ChimeraWorld world = ChimeraWorld.CastFrom(GetGame().GetWorld());
43
44 if (!world)
45 return;
46
47 SCR_ResourceSystem updateSystem = SCR_ResourceSystem.Cast(world.FindSystem(SCR_ResourceSystem));
48
49 if (!updateSystem)
50 return;
51
53 }
54
56 {
57 ArmaReforgerScripted game = GetGame();
58 if (!game)
59 return;
60
61 ChimeraWorld world = ChimeraWorld.CastFrom(game.GetWorld());
62
63 if (!world)
64 return;
65
66 SCR_ResourceSystem updateSystem = SCR_ResourceSystem.Cast(world.FindSystem(SCR_ResourceSystem));
67
68 if (!updateSystem)
69 return;
70
72 }
73}
ref DSGameConfig game
Definition DSConfig.c:81
ArmaReforgerScripted GetGame()
Definition game.c:1398
Replication item identifier.
Definition RplId.c:14
void UnregisterSubscribedInteractor(notnull SCR_ResourceInteractor interactor)
void RegisterSubscribedInteractor(notnull SCR_ResourceInteractor interactor)
void SCR_ResourceSystemSubscriptionListing(notnull SCR_ResourceInteractor interactor)