public override IEnumerable <Gizmo> CompGetGizmosExtra() { foreach (var gizmo in base.CompGetGizmosExtra()) { yield return(gizmo); } if (OwnershipUtility.PlayerOwns(parent)) { yield return(new Command_Toggle { icon = Resources.BuildingClimateControlAirThermal, defaultDesc = "fd.heatsink.climate.net.connect.description".Translate(), defaultLabel = "fd.heatsink.climate.net.connect.label".Translate(), isActive = () => _connected, toggleAction = () => _connected = !_connected }); } }
public override IEnumerable <Gizmo> CompGetGizmosExtra() { foreach (var current in base.CompGetGizmosExtra()) { yield return(current); } if (OwnershipUtility.PlayerOwns(parent)) { yield return(new Command_Action { // icon = Resources.UiChargeBattery, defaultDesc = "charge_internal_battery.description".Translate(), defaultLabel = "charge_internal_battery.label".Translate(), activateSound = SoundDef.Named("Click"), action = ChargeInternalBattery }); } }
public override IEnumerable <Gizmo> CompGetGizmosExtra() { foreach (var current in base.CompGetGizmosExtra()) { yield return(current); } if (OwnershipUtility.PlayerOwns(parent)) { yield return(new Command_Action { defaultLabel = _useAirNet ? "Network" : "Room", defaultDesc = "Cycle between the duct network and the room", icon = _useAirNet ? ResourceBank.UINetwork : ResourceBank.UIRoom, activateSound = SoundDef.Named("DesignateMine"), hotKey = KeyBindingDefOf.Command_ColonistDraft, action = () => _useAirNet = !_useAirNet }); } }