Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_ResourceSystemSubscriptionListing.c
Go to the documentation of this file.
1
class
SCR_ResourceSystemSubscriptionListing
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
//------------------------------------------------------------------------------------------------
25
void
UnsubscribeListener
(
RplId
listener)
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
52
updateSystem.
RegisterSubscribedInteractor
(
m_Interactor
);
53
}
54
55
void
~SCR_ResourceSystemSubscriptionListing
()
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
71
updateSystem.
UnregisterSubscribedInteractor
(
m_Interactor
);
72
}
73
}
game
ref DSGameConfig game
Definition
DSConfig.c:81
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
ChimeraWorld
Definition
ChimeraWorld.c:13
RplId
Replication item identifier.
Definition
RplId.c:14
SCR_ResourceSystem
Definition
SCR_ResourceSystem.c:2
SCR_ResourceSystem::UnregisterSubscribedInteractor
void UnregisterSubscribedInteractor(notnull SCR_ResourceInteractor interactor)
Definition
SCR_ResourceSystem.c:110
SCR_ResourceSystem::RegisterSubscribedInteractor
void RegisterSubscribedInteractor(notnull SCR_ResourceInteractor interactor)
Definition
SCR_ResourceSystem.c:97
SCR_ResourceSystemSubscriptionListing::SCR_ResourceSystemSubscriptionListing
void SCR_ResourceSystemSubscriptionListing(notnull SCR_ResourceInteractor interactor)
Definition
SCR_ResourceSystemSubscriptionListing.c:38
SCR_ResourceSystemSubscriptionListing::Replicate
void Replicate()
Definition
SCR_ResourceSystemSubscriptionListing.c:31
SCR_ResourceSystemSubscriptionListing::UnsubscribeListener
void UnsubscribeListener(RplId listener)
Definition
SCR_ResourceSystemSubscriptionListing.c:25
SCR_ResourceSystemSubscriptionListing::GetInteractor
SCR_ResourceInteractor GetInteractor()
Definition
SCR_ResourceSystemSubscriptionListing.c:7
SCR_ResourceSystemSubscriptionListing::SubscribeListener
void SubscribeListener(RplId listener)
Definition
SCR_ResourceSystemSubscriptionListing.c:19
SCR_ResourceSystemSubscriptionListing::IsEmpty
bool IsEmpty()
Definition
SCR_ResourceSystemSubscriptionListing.c:13
SCR_ResourceSystemSubscriptionListing::~SCR_ResourceSystemSubscriptionListing
void ~SCR_ResourceSystemSubscriptionListing()
Definition
SCR_ResourceSystemSubscriptionListing.c:55
SCR_ResourceSystemSubscriptionListing::m_Interactor
SCR_ResourceInteractor m_Interactor
Definition
SCR_ResourceSystemSubscriptionListing.c:4
SCR_ResourceSystemSubscriptionListing::m_aListeners
ref set< RplId > m_aListeners
Definition
SCR_ResourceSystemSubscriptionListing.c:3
scripts
Game
Sandbox
Resources
Subscription
Listing
SCR_ResourceSystemSubscriptionListing.c
Generated by
1.17.0