fix(codegen): Adds manual dirty checking (#621)

- Adds `[ManualDirtyChecking]` for anyone that adds it themselves.
- Adds detection of `[Serializable]` and `[ManualDirtyChecking]` at startup to help identify scripts that need migration.
This commit is contained in:
Kamron Batman 2021-05-27 00:54:21 -07:00 • committed by GitHub
parent 90dc5e742c
commit 81e4087acc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 79 additions and 53 deletions

View file

@ -36,25 +36,24 @@ namespace Server
public class Entity : IEntity
{
public Entity(Serial serial, Point3D loc, Map map)
public Entity(Serial serial, Point3D loc, Map map) : this(serial)
{
Serial = serial;
Location = loc;
Map = map;
Deleted = false;
}
public Entity(Serial serial) => Serial = serial;
public void SetTypeRef(Type type)
{
}
bool ISerializable.UseDirtyChecking => false;
long ISerializable.SavePosition { get; set; } = -1;
BufferWriter ISerializable.SaveBuffer { get; set; }
public int TypeRef { get; } = -1;
public int TypeRef => -1;
public Serial Serial { get; }