File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,16 +62,18 @@ public override void Init(ITorchBase torch)
6262 base . Init ( torch ) ;
6363 Settings = Persistent < Settings > . Load ( Path . Combine ( StoragePath , "Concealment.cfg" ) ) ;
6464 _concealedAabbTree = new MyDynamicAABBTreeD ( MyConstants . GAME_PRUNING_STRUCTURE_AABB_EXTENSION ) ;
65- torch . SessionUnloading += Torch_SessionUnloading ;
65+ //torch.SessionUnloading += Torch_SessionUnloading;
66+ RegisterEntityStorage ( "Concealment" , Id ) ;
67+ }
6668
67- //Init storage component.
69+ private void RegisterEntityStorage ( string name , Guid id )
70+ {
6871 var comp = new MyModStorageComponentDefinition
69- {
70- Id = new MyDefinitionId ( typeof ( MyObjectBuilder_ModStorageComponent ) , "Concealment" ) ,
71- RegisteredStorageGuids = new [ ] { Id }
72+ {
73+ Id = new MyDefinitionId ( typeof ( MyObjectBuilder_ModStorageComponent ) , name ) ,
74+ RegisteredStorageGuids = new [ ] { id }
7275 } ;
7376 MyDefinitionManager . Static . Definitions . AddDefinition ( comp ) ;
74-
7577 }
7678
7779 private void Torch_SessionUnloading ( )
You can’t perform that action at this time.
0 commit comments