private void OnLaunch(object data) { KSelectable component = GetComponent <KSelectable>(); component.IsSelectable = false; if ((UnityEngine.Object)SelectTool.Instance.selected == (UnityEngine.Object)component) { SelectTool.Instance.Select(null, false); } ConduitConsumer component2 = GetComponent <ConduitConsumer>(); if ((bool)component2) { ConduitType conduitType = component2.conduitType; if (conduitType == ConduitType.Gas || conduitType == ConduitType.Liquid) { component2.consumptionRate = 0f; } } Deconstructable component3 = GetComponent <Deconstructable>(); if ((UnityEngine.Object)component3 != (UnityEngine.Object)null) { component3.SetAllowDeconstruction(false); } HandleVector <int> .Handle handle = GameComps.StructureTemperatures.GetHandle(base.gameObject); if (handle.IsValid()) { GameComps.StructureTemperatures.Disable(handle); } ToggleComponent(typeof(ManualDeliveryKG), false); ToggleComponent(typeof(ElementConsumer), false); ToggleComponent(typeof(ElementConverter), false); ToggleComponent(typeof(ConduitDispenser), false); ToggleComponent(typeof(SolidConduitDispenser), false); ToggleComponent(typeof(EnergyConsumer), false); }
private void OnLand(object data) { GetComponent <KSelectable>().IsSelectable = true; ConduitConsumer component = GetComponent <ConduitConsumer>(); if ((bool)component) { switch (component.conduitType) { case ConduitType.Gas: GetComponent <ConduitConsumer>().consumptionRate = 1f; break; case ConduitType.Liquid: GetComponent <ConduitConsumer>().consumptionRate = 10f; break; } } Deconstructable component2 = GetComponent <Deconstructable>(); if ((UnityEngine.Object)component2 != (UnityEngine.Object)null) { component2.SetAllowDeconstruction(true); } HandleVector <int> .Handle handle = GameComps.StructureTemperatures.GetHandle(base.gameObject); if (handle.IsValid()) { GameComps.StructureTemperatures.Enable(handle); } ToggleComponent(typeof(ManualDeliveryKG), true); ToggleComponent(typeof(ElementConsumer), true); ToggleComponent(typeof(ElementConverter), true); ToggleComponent(typeof(ConduitDispenser), true); ToggleComponent(typeof(SolidConduitDispenser), true); ToggleComponent(typeof(EnergyConsumer), true); }