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_PerceivedFactionManagerComponentSerializer.c
Go to the documentation of this file.
1
class
SCR_PerceivedFactionManagerComponentSerializer
:
ScriptedComponentSerializer
2
{
3
//------------------------------------------------------------------------------------------------
4
override
static
typename
GetTargetType
()
5
{
6
return
SCR_PerceivedFactionManagerComponent
;
7
}
8
9
//------------------------------------------------------------------------------------------------
10
override
protected
ESerializeResult
Serialize
(notnull
IEntity
owner, notnull
GenericComponent
component, notnull
SaveContext
context)
11
{
12
const
SCR_PerceivedFactionManagerComponent
perceivedFactionManager =
SCR_PerceivedFactionManagerComponent
.Cast(component);
13
const
BaseContainer
source = perceivedFactionManager.GetComponentSource(owner);
14
15
const
SCR_EPerceivedFactionOutfitType
characterPerceivedFactionOutfitType = perceivedFactionManager.GetCharacterPerceivedFactionOutfitType();
16
SCR_EPerceivedFactionOutfitType
characterPerceivedFactionOutfitTypeDefault =
SCR_EPerceivedFactionOutfitType
.DISABLED;
17
if
(source)
18
source.Get(
"m_eCharacterPerceivedFactionOutfitType"
, characterPerceivedFactionOutfitTypeDefault);
19
20
const
SCR_EDisguisedKillingPunishment punishmentKillingWhileDisguisedFlags = perceivedFactionManager.GetPunishmentKillingWhileDisguisedFlags();
21
SCR_EDisguisedKillingPunishment punishmentKillingWhileDisguisedFlagsDefault = 0;
22
if
(source)
23
source.Get(
"m_ePunishmentKillingWhileDisguised"
, punishmentKillingWhileDisguisedFlagsDefault);
24
25
if
(characterPerceivedFactionOutfitType == characterPerceivedFactionOutfitTypeDefault &&
26
punishmentKillingWhileDisguisedFlags == punishmentKillingWhileDisguisedFlagsDefault)
27
return
ESerializeResult
.DEFAULT;
28
29
context.WriteValue(
"version"
, 1);
30
context.WriteDefault(characterPerceivedFactionOutfitType, characterPerceivedFactionOutfitTypeDefault);
31
context.WriteDefault(punishmentKillingWhileDisguisedFlags, punishmentKillingWhileDisguisedFlagsDefault);
32
return
ESerializeResult
.OK;
33
}
34
35
//------------------------------------------------------------------------------------------------
36
override
protected
bool
Deserialize
(notnull
IEntity
owner, notnull
GenericComponent
component, notnull
LoadContext
context)
37
{
38
SCR_PerceivedFactionManagerComponent
perceivedFactionManager =
SCR_PerceivedFactionManagerComponent
.Cast(component);
39
40
int
version;
41
context.Read(version);
42
43
SCR_EDisguisedKillingPunishment characterPerceivedFactionOutfitType;
44
if
(context.Read(characterPerceivedFactionOutfitType))
45
perceivedFactionManager.SetCharacterPerceivedFactionOutfitType_S(characterPerceivedFactionOutfitType);
46
47
SCR_EDisguisedKillingPunishment punishmentKillingWhileDisguisedFlags;
48
if
(context.Read(punishmentKillingWhileDisguisedFlags))
49
perceivedFactionManager.SetPunishmentKillingWhileDisguisedFlags_S(punishmentKillingWhileDisguisedFlags);
50
51
return
true
;
52
}
53
}
54
GetTargetType
class SCR_PersistentThreatSector GetTargetType()
Definition
AIControlComponentSerializer.c:12
SCR_EPerceivedFactionOutfitType
SCR_EPerceivedFactionOutfitType
Definition
SCR_PerceivedFactionManagerComponent.c:445
SCR_PerceivedFactionManagerComponent
void SCR_PerceivedFactionManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_PerceivedFactionManagerComponent.c:269
BaseContainer
Definition
BaseContainer.c:13
GenericComponent
Definition
GenericComponent.c:13
IEntity
Definition
IEntity.c:13
LoadContext
Definition
LoadContext.c:17
SCR_PerceivedFactionManagerComponentSerializer
Definition
SCR_PerceivedFactionManagerComponentSerializer.c:2
SCR_PerceivedFactionManagerComponentSerializer::Serialize
ESerializeResult Serialize(notnull IEntity owner, notnull GenericComponent component, notnull SaveContext context)
Definition
SCR_PerceivedFactionManagerComponentSerializer.c:10
SCR_PerceivedFactionManagerComponentSerializer::Deserialize
bool Deserialize(notnull IEntity owner, notnull GenericComponent component, notnull LoadContext context)
Definition
SCR_PerceivedFactionManagerComponentSerializer.c:36
SaveContext
Definition
SaveContext.c:17
ScriptedComponentSerializer
Definition
ScriptedComponentSerializer.c:13
ESerializeResult
ESerializeResult
Definition
ESerializeResult.c:13
scripts
Game
Plugins
Persistence
System
Serializers
Components
GameMode
SCR_PerceivedFactionManagerComponentSerializer.c
Generated by
1.17.0