public static Def GetDefSilentFail(Type type, string targetDefName) { if (type == typeof(SoundDef)) { return(SoundDef.Named(targetDefName)); } return((Def)GenGeneric.InvokeStaticMethodOnGenericType(typeof(DefDatabase <>), type, "GetNamedSilentFail", targetDefName)); }
public override void Destroy(DestroyMode mode = DestroyMode.Vanish) { Map map = base.Map; base.Destroy(mode); InstallBlueprintUtility.CancelBlueprintsFor(this); if (mode == DestroyMode.Deconstruct) { SoundDef.Named("BuildingDeconstructed").PlayOneShot(new TargetInfo(base.Position, map, false)); } }
public static Def GetDefSilentFail(Type type, string targetDefName, bool specialCaseForSoundDefs = true) { if (specialCaseForSoundDefs && type == typeof(SoundDef)) { return(SoundDef.Named(targetDefName)); } return((Def)GenGeneric.InvokeStaticMethodOnGenericType(typeof(DefDatabase <>), type, "GetNamedSilentFail", new object[] { targetDefName })); }
private void Setup() { this.forcePause = true; this.closeOnEscapeKey = true; this.doCloseButton = true; this.doCloseX = true; this.absorbInputAroundWindow = true; this.soundAppear = SoundDef.Named("InfoCard_Open"); this.soundClose = SoundDef.Named("InfoCard_Close"); StatsReportUtility.Reset(); PlayerKnowledgeDatabase.KnowledgeDemonstrated(ConceptDefOf.InfoCard, KnowledgeAmount.Total); }
// Token: 0x06000008 RID: 8 RVA: 0x000022A8 File Offset: 0x000004A8 public override IEnumerable <Gizmo> CompGetGizmosExtra() { bool flag = Find.Selector.SingleSelectedThing == GetWearer; if (flag) { int num = 700000101; Command_Action command_Action = new Command_Action(); switch (this.lightMode) { case CompEquippableLight.LightMode.Automatic: command_Action.icon = ContentFinder <Texture2D> .Get("Ui/Commands/CommandButton_LigthModeAutomatic", true); command_Action.defaultLabel = "Ligth: automatic."; break; case CompEquippableLight.LightMode.ForcedOn: command_Action.icon = ContentFinder <Texture2D> .Get("Ui/Commands/CommandButton_LigthModeForcedOn", true); command_Action.defaultLabel = "Ligth: on."; break; case CompEquippableLight.LightMode.ForcedOff: command_Action.icon = ContentFinder <Texture2D> .Get("Ui/Commands/CommandButton_LigthModeForcedOff", true); command_Action.defaultLabel = "Ligth: off."; break; } command_Action.defaultDesc = "Switch mode."; command_Action.activateSound = SoundDef.Named("Click"); command_Action.action = new Action(this.SwitchLigthMode); command_Action.groupKey = num + 1; yield return(command_Action); } yield break; }