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_SpawnPointSerializer.c
Go to the documentation of this file.
1
class
SCR_SpawnPointSerializer
:
GenericEntitySerializer
2
{
3
//------------------------------------------------------------------------------------------------
4
override
static
typename
GetTargetType
()
5
{
6
return
SCR_SpawnPoint
;
7
}
8
9
//------------------------------------------------------------------------------------------------
10
override
protected
ESerializeResult
Serialize
(notnull
IEntity
entity, notnull
SaveContext
context)
11
{
12
const
SCR_SpawnPoint
spawnPoint =
SCR_SpawnPoint
.Cast(entity);
13
const
BaseContainer
source = entity.GetPrefabData().GetPrefab();
14
15
const
bool
enabled = spawnPoint.
IsSpawnPointEnabled
();
16
bool
enabledDefault;
17
source.Get(
"m_bSpawnPointEnabled"
, enabledDefault);
18
19
if
(enabled == enabledDefault)
20
return
ESerializeResult
.DEFAULT;
21
22
context.WriteValue(
"version"
, 1);
23
context.WriteDefault(enabled, enabledDefault);
24
return
ESerializeResult
.OK;
25
}
26
27
//------------------------------------------------------------------------------------------------
28
override
protected
bool
Deserialize
(notnull
IEntity
entity, notnull
LoadContext
context)
29
{
30
SCR_SpawnPoint
spawnPoint =
SCR_SpawnPoint
.Cast(entity);
31
32
int
version;
33
context.ReadValue(
"version"
, version);
34
35
bool
enabled;
36
if
(context.Read(enabled))
37
spawnPoint.
SetSpawnPointEnabled_S
(enabled);
38
39
return
true
;
40
}
41
}
GetTargetType
class SCR_PersistentThreatSector GetTargetType()
Definition
AIControlComponentSerializer.c:12
BaseContainer
Definition
BaseContainer.c:13
GenericEntitySerializer
Definition
GenericEntitySerializer.c:13
IEntity
Definition
IEntity.c:13
LoadContext
Definition
LoadContext.c:17
SCR_SpawnPoint
Spawn point entity defines positions on which players can possibly spawn.
Definition
SCR_SpawnPoint.c:28
SCR_SpawnPoint::IsSpawnPointEnabled
bool IsSpawnPointEnabled()
Definition
SCR_SpawnPoint.c:111
SCR_SpawnPoint::SetSpawnPointEnabled_S
void SetSpawnPointEnabled_S(bool enabled)
Definition
SCR_SpawnPoint.c:117
SCR_SpawnPointSerializer
Definition
SCR_SpawnPointSerializer.c:2
SCR_SpawnPointSerializer::Deserialize
bool Deserialize(notnull IEntity entity, notnull LoadContext context)
Definition
SCR_SpawnPointSerializer.c:28
SCR_SpawnPointSerializer::Serialize
ESerializeResult Serialize(notnull IEntity entity, notnull SaveContext context)
Definition
SCR_SpawnPointSerializer.c:10
SaveContext
Definition
SaveContext.c:17
ESerializeResult
ESerializeResult
Definition
ESerializeResult.c:13
scripts
Game
Plugins
Persistence
System
Serializers
Entities
SCR_SpawnPointSerializer.c
Generated by
1.17.0