Server Initialization and Serverside Galaxy/Zone Delivery

Made the master server connect to the database and now it's listening for and responding correctly to GalaxyRequestMessages and ZoneRequestMessages, generating the zone contents if they do not yet exist.
This commit is contained in:
hyperion51 2020-03-27 01:53:03 +00:00
commit f8a6582154
34 changed files with 845 additions and 115 deletions

View file

@ -76,7 +76,7 @@ public class DatabaseCache
return _types[typeof(T)].Values.Cast<T>();
}
public void Delete(DatabaseEntry entry)
public void Delete(DatabaseEntry entry, bool remote = false)
{
_entries.Remove(entry.ID);
foreach (var type in _types.Values)
@ -84,6 +84,7 @@ public class DatabaseCache
type.Remove(entry.ID);
}
OnDataDeleteLocal?.Invoke(entry);
if (!remote)
OnDataDeleteLocal?.Invoke(entry);
}
}