Esempio n. 1
0
 public override void PostMake()
 {
     base.PostMake();
     storageSettings = new StorageSettings(this);
     if (def.building.defaultStorageSettings != null)
     {
         storageSettings.CopyFrom(def.building.defaultStorageSettings);
     }
 }
 public override void Initialize(CompProperties props)
 {
     base.Initialize(props);
     allowedShellsSettings = new StorageSettings(this);
     if (parent.def.building.defaultStorageSettings != null)
     {
         allowedShellsSettings.CopyFrom(parent.def.building.defaultStorageSettings);
     }
 }
 public void ResolveReferencesSpecial()
 {
     if (soundDoorOpenPowered == null)
     {
         soundDoorOpenPowered = SoundDefOf.Door_OpenPowered;
     }
     if (soundDoorClosePowered == null)
     {
         soundDoorClosePowered = SoundDefOf.Door_ClosePowered;
     }
     if (soundDoorOpenManual == null)
     {
         soundDoorOpenManual = SoundDefOf.Door_OpenManual;
     }
     if (soundDoorCloseManual == null)
     {
         soundDoorCloseManual = SoundDefOf.Door_CloseManual;
     }
     if (turretGunDef != null)
     {
         LongEventHandler.ExecuteWhenFinished(delegate
         {
             turretTopMat = MaterialPool.MatFrom(turretGunDef.graphicData.texPath);
         });
     }
     if (fixedStorageSettings != null)
     {
         fixedStorageSettings.filter.ResolveReferences();
     }
     if (defaultStorageSettings == null && fixedStorageSettings != null)
     {
         defaultStorageSettings = new StorageSettings();
         defaultStorageSettings.CopyFrom(fixedStorageSettings);
     }
     if (defaultStorageSettings != null)
     {
         defaultStorageSettings.filter.ResolveReferences();
     }
 }
Esempio n. 4
0
 public static void PasteInto(StorageSettings s)
 {
     s.CopyFrom(StorageSettingsClipboard.clipboard);
 }
 public static void Copy(StorageSettings s)
 {
     clipboard.CopyFrom(s);
     copied = true;
 }