Updated serializer data fields (#2702)
This commit is contained in:
@@ -46,9 +46,9 @@ namespace Content.Server.GameObjects.Components.Markers
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
serializer.DataField(this, x => Prototypes, "prototypes", new List<string>());
|
||||
serializer.DataField(this, x => Chance, "chance", 1.0f);
|
||||
serializer.DataField(this, x => _gameRules, "gameRules", new List<string>());
|
||||
serializer.DataField(this, x => x.Prototypes, "prototypes", new List<string>());
|
||||
serializer.DataField(this, x => x.Chance, "chance", 1.0f);
|
||||
serializer.DataField(this, x => x._gameRules, "gameRules", new List<string>());
|
||||
}
|
||||
|
||||
private void RuleAdded(GameRuleAddedEventArgs obj)
|
||||
|
||||
@@ -53,11 +53,11 @@ namespace Content.Server.GameObjects.Components.Markers
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
|
||||
serializer.DataField(this, x => Prototypes, "prototypes", new List<string>());
|
||||
serializer.DataField(this, x => Chance, "chance", 1.0f);
|
||||
serializer.DataField(this, x => IntervalSeconds, "intervalSeconds", 60);
|
||||
serializer.DataField(this, x => MinimumEntitiesSpawned, "minimumEntitiesSpawned", 1);
|
||||
serializer.DataField(this, x => MaximumEntitiesSpawned, "maximumEntitiesSpawned", 1);
|
||||
serializer.DataField(this, x => x.Prototypes, "prototypes", new List<string>());
|
||||
serializer.DataField(this, x => x.Chance, "chance", 1.0f);
|
||||
serializer.DataField(this, x => x.IntervalSeconds, "intervalSeconds", 60);
|
||||
serializer.DataField(this, x => x.MinimumEntitiesSpawned, "minimumEntitiesSpawned", 1);
|
||||
serializer.DataField(this, x => x.MaximumEntitiesSpawned, "maximumEntitiesSpawned", 1);
|
||||
|
||||
if(MinimumEntitiesSpawned > MaximumEntitiesSpawned)
|
||||
throw new ArgumentException("MaximumEntitiesSpawned can't be lower than MinimumEntitiesSpawned!");
|
||||
|
||||
@@ -30,9 +30,9 @@ namespace Content.Server.GameObjects.Components.Markers
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
base.ExposeData(serializer);
|
||||
serializer.DataField(this, x => RarePrototypes, "rarePrototypes", new List<string>());
|
||||
serializer.DataField(this, x => RareChance, "rareChance", 0.05f);
|
||||
serializer.DataField(this, x => Offset, "offset", 0.2f);
|
||||
serializer.DataField(this, x => x.RarePrototypes, "rarePrototypes", new List<string>());
|
||||
serializer.DataField(this, x => x.RareChance, "rareChance", 0.05f);
|
||||
serializer.DataField(this, x => x.Offset, "offset", 0.2f);
|
||||
}
|
||||
public override void Spawn()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user