Cache broadphases and container rejig (#3407)

This commit is contained in:
Leon Friedrich
2022-10-31 10:06:08 +11:00
committed by GitHub
parent cec14ae861
commit 2b594f6356
33 changed files with 851 additions and 720 deletions
@@ -1,9 +1,8 @@
using System;
using System.Collections.Generic;
using JetBrains.Annotations;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using System.Collections.Generic;
namespace Robust.Shared.GameObjects
{
@@ -16,6 +15,7 @@ namespace Robust.Shared.GameObjects
{
base.Initialize();
SubscribeLocalEvent<MapComponent, ComponentAdd>(OnMapAdd);
SubscribeLocalEvent<MapComponent, ComponentInit>(OnMapInit);
SubscribeLocalEvent<MapComponent, ComponentShutdown>(OnMapRemoved);
@@ -25,6 +25,8 @@ namespace Robust.Shared.GameObjects
SubscribeLocalEvent<MapGridComponent, ComponentShutdown>(OnGridRemove);
}
protected abstract void OnMapAdd(EntityUid uid, MapComponent component, ComponentAdd args);
private void OnMapInit(EntityUid uid, MapComponent component, ComponentInit args)
{
var msg = new MapChangedEvent(component.WorldMap, true);