Пример #1
0
 //Subscribe listeners as needed
 protected override void OnSpawn()
 {
     base.OnSpawn();
     PressurizedModManager.SetVersion(this);
     Subscribe((int)GameHashes.RefreshUserMenu, OnRefreshUserMenuDelegate);
     Subscribe((int)GameHashes.StatusChange, OnRefreshUserMenuDelegate);
     Subscribe((int)GameHashes.DeconstructComplete, OnDeconstruct);
     if (isMarkedForWork)
     {
         if (!isInsulated)
         {
             if (!FetchComplete())
             {
                 SetFetchList();
             }
             else
             {
                 onFetchComplete();
             }
         }
         else
         {
             OnRemoveInsulate();
         }
     }
 }
Пример #2
0
 private void OnDeserialized()
 {
     //Deserialization occurs before OnSpawn, which is when the version is updated to the most recent version.
     //Check to see if the version has changed. If it has, the mod manager will call OnVersionChange, which should determine what to do depending on what the old version was.
     PressurizedModManager.VersionChangedCheck(this);
 }