Add unit test asserting that saving, loading & saving the map produces identical output. (#348)
Also fixed PowerProvider violating this.
This commit is contained in:
committed by
GitHub
parent
6c97b63e59
commit
35e88ea62c
@@ -32,6 +32,8 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual bool SaveLoad => true;
|
||||
|
||||
/// <summary>
|
||||
/// The method of draw we will try to use to place our load set via component parameter, defaults to using power providers
|
||||
/// </summary>
|
||||
@@ -191,8 +193,12 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
base.ExposeData(serializer);
|
||||
|
||||
serializer.DataField(ref _drawType, "drawtype", DrawTypes.Provider);
|
||||
serializer.DataField(ref _load, "load", 100);
|
||||
serializer.DataField(ref _priority, "priority", Powernet.Priority.Medium);
|
||||
|
||||
if (SaveLoad)
|
||||
{
|
||||
serializer.DataField(ref _load, "load", 100);
|
||||
}
|
||||
}
|
||||
|
||||
void IExamine.Examine(FormattedMessage message)
|
||||
|
||||
Reference in New Issue
Block a user