private void OnGUI() { if (guiEnabled) { VolumeContainerGUI.updateGUI(); int len = containers.Length; bool update = false; for (int i = 0; i < len; i++) { if (containers[i].isDirty) { update = true; break; } } if (update) { for (int i = 0; i < len; i++) { containers[i].clearDirty(); } updateTankResources(); updatePersistentData(); VolumeContainerGUI.updateGuiData(); foreach (Part p in part.symmetryCounterparts) { SSTUVolumeContainer vc = p.GetComponent <SSTUVolumeContainer>(); vc.updateTankResources(); vc.updatePersistentData(); } } } }
private void OnGUI() { if (guiEnabled) { VolumeContainerGUI.updateGUI(); int len = containers.Length; bool update = false; for (int i = 0; i < len; i++) { if (containers[i].isDirty) { update = true; break; } } if (update) { for (int i = 0; i < len; i++) { containers[i].clearDirty(); } updateTankResources(); updatePersistentData(); VolumeContainerGUI.updateGuiData(); } } }
private void openGUI() { if (VolumeContainerGUI.module != null) { VolumeContainerGUI.closeGUI(); return; } VolumeContainerGUI.openGUI(this, containers); guiEnabled = true; EditorLogic editor = EditorLogic.fetch; if (editor != null) { editor.Lock(true, true, true, "SSTUVolumeContainerLock"); } }