Пример #1
0
        private void OnMapCreated(MapChangedEvent eventArgs)
        {
            if (eventArgs.Destroyed)
            {
                return;
            }

            if (eventArgs.Map == MapId.Nullspace)
            {
                return;
            }

            EntityManager.EnsureComponent <EntityLookupComponent>(_mapManager.GetMapEntityId(eventArgs.Map));
        }
Пример #2
0
        private void OnMapRemoved(EntityUid uid, MapComponent component, ComponentShutdown args)
        {
            var msg = new MapChangedEvent(component.WorldMap, false);

            EntityManager.EventBus.RaiseLocalEvent(uid, msg);
        }
Пример #3
0
        private void OnMapAdded(EntityUid uid, MapComponent component, ComponentInit args)
        {
            var msg = new MapChangedEvent(component.WorldMap, true);

            EntityManager.EventBus.RaiseLocalEvent(uid, msg);
        }